Change default listing details layout.

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

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

Open Support Ticket
  • Author
    Posts
  • #213773

    Egor Shvetsov
    Expired Member
    Post count: 24

    Hi everyone,
    it seems that the plugin uses by default single post layout for listing details page. Is it possible to change? Becuase in my case it looks a bit messy: http://thaiscript.ru/places/thailand/phuket-1/phuket-1/attractions/test/

    Thank you.

    #213978

    Kor
    Moderator
    Post count: 16516

    Hi Egor,

    I’d like you to check out this section of the documentation and see if it helps. https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    Thanks!

    #214104

    Egor Shvetsov
    Expired Member
    Post count: 24

    Hi Kor Chung, thank you for your reply!

    I tried to look into listing-detail.php. However, I still can’t figure it out. I suppose there is some conflict between my theme and the plugin, I am using Hueman theme which supports custom layouts for different pages, the problem might be in it.

    Thank You,
    Egor.

    #214183

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    you cannot use theme templates for any of the plugin page.

    If you tell us what you want to achieve, we can point you in the right direction.

    Thanks

    #214362

    Egor Shvetsov
    Expired Member
    Post count: 24

    Hi Paolo, thank you for your attention.

    The problem:
    My theme (Hueman) uses three columns layout for single posts, with about 280 px sidebars on both sides.
    Listing details post was inherited this style and it occurred that listing details were squeezed in between, into a column in the middle, wich is about 600 px or less. It didn’t look pretty.

    In addition, sidebars were not shown on the listing details post.

    I found the solution for it. If you allow I post it here, perhaps it will help someone.

    The code below allows choosing a body class for posts with a specific slug. Body classes should exist in the theme or can be added into custom CSS. In my case, my theme had the class I needed.

    In this code all posts with the slug ‘places’ will have body class=”page-template-default”. Only these two parameters should be changed.

    The code should be added to function.php.

    add_filter(‘body_class’,’wpsites_specific_page_body_class’);

    function wpsites_specific_page_body_class($classes) {
    if ( is_category( ‘places’ ) )
    {
    $classes[] = ‘page-template-default’;
    return $classes;
    }
    }

    Thank you.

    #214374

    Egor Shvetsov
    Expired Member
    Post count: 24
    #214761

    Paolo
    Site Admin
    Post count: 31211

    Ok now that you explained it makes more sense and I’m glad you were able to find the solution on your own.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 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