Echo functionality in first tab

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 5 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #168359

    awesomewebsiteguys
    Buyer
    Post count: 2

    Hello,

    I am looking to customize the details page and have been through tons of forum answers on this subject and have gotten everything to work however I can not figure out how to pull these 4 things into my first tab.

    1. Post address
    2. Add to favorite button
    3. Email/send to friend
    4. The image slider

    This is the code that I came across and I can echo text into my tab but can not get these to display.. https://wpgeodirectory.com/support/topic/change-layout-of-details-page/

    Here is the code I have that will echo the text but not the post functions..

    
    
    add_action('geodir_before_tab_content' ,'geodir_my_new_tab_content');
    function geodir_my_new_tab_content($tab_index)
    {
    	if($tab_index =='post_profile')
    	{
    		echo 'hello';
    		echo $post->geodir_email;
    	}
    }

    Thank you for any help on this..
    Attached is what I am looking to do.. Where the tabs are above the slider.

    #168947

    Paolo
    Site Admin
    Post count: 31205

    Hi,

    please try:

    
    
    remove_action( 'geodir_details_main_content','geodir_action_details_slider',30);
    add_action('geodir_before_tab_content' ,'geodir_my_new_tab_content');
    function geodir_my_new_tab_content($tab_index)
    {
    	if($tab_index =='post_profile')
    	{
    		global $post;
    		echo $post->post_address;
                  geodir_favourite_html($post->post_author, $post->ID);
    		echo '<a href="javascript:void(1);" class="b_send_inquiry2" onclick="jQuery('.b_send_inquiry').click();">Send Enquiry</a> | <a href="javascript:void(1);" class="b_sendtofriend2" onclick="jQuery('.b_sendtofriend').click();">Send To Friend</a>';
    		geodir_action_details_slider();
    
    	}
    }

    Thsi should bring all elements as you wanted them, obviously you’ll need some custom css too, to arrange everything exactly as desired.

    Let us know if that helped.

    Thanks,

    #168951

    awesomewebsiteguys
    Buyer
    Post count: 2

    Thats perfect! The CSS is no prop at all! Thank you very much!

    #168952

    Paolo
    Site Admin
    Post count: 31205

    You are very welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

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

Open Support Ticket