Tabs in single view

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

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #36248

    scabrera
    Buyer
    Post count: 13

    Hi i`m testing GD.
    I like to design the single view of the listings. I dont like the tabs, is it possible to change that? i like to have the description and above the comments.

    #36282

    Guust
    Moderator
    Post count: 29970

    Yes, it is possible and has been discussed in the forum before, but cannot quite find it for the moment. I’ll ask the others, you might just have to be a bit patient because of the Easter break.

    #36430

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    1st you need to remove the tabs completely:

    remove_action( 'geodir_details_main_content', 'geodir_show_detail_page_tabs',60);

    and add back what you need instead, creating a new function taking the corresponding parts from the function we just removed (geodir_show_detail_page_tabs).

    In this case:

    
    
    function my_cutom_detail_page () {
    
    do_action('geodir_before_description_on_listing_detail');
                                    if (geodir_is_page('detail')) {
                                        the_content();
                                    } else {
                                        /** This action is documented in geodirectory_template_actions.php */
                                        echo apply_filters('the_content', stripslashes($post->post_desc));
                                    }
    echo comments_template();
    }
    
    add_action( 'geodir_details_main_content', 'my_cutom_detail_page',60);

    Let us know how you went,

    Thanks

    #36431

    Paolo
    Site Admin
    Post count: 31206

    just FYI, that code would go into your active theme’s function.php file.

    Thanks

    #36547

    scabrera
    Buyer
    Post count: 13

    Ok. Thats great, thank you.
    and its possible now to put the description into a div, to style it better?

    #36581

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    with this you can wrap the_content in an extra div.

    
    
    remove_action( 'geodir_details_main_content', 'geodir_show_detail_page_tabs',60);
    
    function my_cutom_detail_page () {
    
    do_action('geodir_before_description_on_listing_detail');
    
                                    if (geodir_is_page('detail')) {
                                       ob_start();
    					the_content();
    					$content = ob_get_clean();
      					echo '<div class="myclass">'.$content.'</div>';
                                    } else {
                                        /** This action is documented in geodirectory_template_actions.php */
                                        echo apply_filters('the_content', stripslashes($post->post_desc));
                                    }
    echo comments_template();
    }
    
    add_action( 'geodir_details_main_content', 'my_cutom_detail_page',60);
    

    Just FYI, what you are asking is beyond support. We can point you in the right direction customizing your website, but we can’t do it for you.

    If editing php isn’t something you can do on your own, even simple edits like the above, you will need to hire a developer to do any other change on your website.

    Thanks

    #36599

    scabrera
    Buyer
    Post count: 13

    Ok, sorry for that.
    you helped me a lot, thank you!

    #36651

    scabrera
    Buyer
    Post count: 13

    Just one thing more: I have already The Description, Map, Gallery and the Comments without tabs, but i can´t find the way to do the same with the more info Tab…

    #36695

    Paolo
    Site Admin
    Post count: 31206
Viewing 9 posts - 1 through 9 (of 9 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