Duplicate Sidebar Link

This topic contains 12 replies, has 3 voices, and was last updated by  Kiran 6 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #426362

    Joy
    Buyer
    Post count: 1076

    Hello, how would I duplicate the dynamic website link from the sidebar to also appear between the image slider and the profile tabs? I’ve tried to play around with the template files but it’s not working out. Any guidance would be appreciated.

    Thank you.

    #426388

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Joy,

    This would require the use of some hooks.
    GDv2 on the other hand it can be done very easily with just settings.

    If you need the code example now just let me know.

    Thanks,

    Stiofan

    #426392

    Joy
    Buyer
    Post count: 1076

    Hey Stiofan. Thank you for the response.

    Do you think GD2 is stable enough for a live site? I’m in the process of starting a site.

    Also, if GD2 isn’t ready yet, will it be an easy transition from GD1?

    Anyway, if you could give me a code example I would be grateful. I’m pretty weak in php.

    #426395

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    GDv2, not yet, probably in about 7-10 days it should be.
    Once its ready we will write a converter, all the data will convert and then you will need to do a bit of rearranging to get the layouts you want.

    Not tested but this should work, the main actions are out put in 10’s so 10,12,30,40, 35 will be between the slider and the taxonomy outputs, 45 would be between the taxonomies and the tabs.

    
    
    add_action('geodir_details_main_content', '_my_website_link_output', 35);
    function _my_website_link_output(){
        echo geodir_cf_url('','','geodir_website');
    }

    Thanks,

    Stiofan

    #426396

    Joy
    Buyer
    Post count: 1076

    Wow, that’s right around the corner. How exciting. I wish I had more time to invest in beta testing.

    Thank you so much for providing that info.I will give it a try. I appreciate it.

    #426414

    Joy
    Buyer
    Post count: 1076

    Tried this, but it didn’t work. The listing page won’t load if I have this code active. :-\

    #426612

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you can provide wp-admin i will take a look.

    Thanks,

    Stiofan

    #426718

    Joy
    Buyer
    Post count: 1076
    This reply has been marked as private.
    #426776

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    CHange to:
    add_action(‘geodir_details_main_content’, ‘_my_website_link_output’, 35);

    
    
    function _my_website_link_output(){
      global $post;
              $cf = (array)geodir_get_field_infoby('htmlvar_name', 'geodir_website', $post->post_type);
      if(!empty($cf)){
        echo geodir_cf_url('','detail',$cf );
      }
    }

    Stiofan

    #426987

    Joy
    Buyer
    Post count: 1076

    Thank you so much for your help! I really appreciate it.

    #427076

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome! 🙂

    #429450

    Joy
    Buyer
    Post count: 1076

    Hi again @stiofan. I have a bit of a dilemma.

    This snippet works perfect for my listings – but it breaks the preview page. Can you please have a look to see if maybe it can be disabled on that page? I’m not sure why it breaks the page – but it does. 🙁

    https://wpgeodirectory.com/support/topic/preview-page-trouble/

    #429467

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount