Category Page Description and Location Page Description

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

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

Open Support Ticket
  • Author
    Posts
  • #66364

    Hefin Dsouza
    Expired Member
    Post count: 48

    Now when I check the “Use description of default for all locations” under “CPT >> Categories >> Edit Category

    And use the variable %location% to prepare the description on the Direct Category Page the %location% shows as Everywhere.

    For example
    On the Category Page the Description shows as

    “All Places in Everywhere”

    and on a location page like “New Jersey” it says

    “All Places in New Jersey”

    How do I have a different Description for The Category Page and a Different Default Description for the location page?

    Note :
    Ive copied the default templates to my child theme and both the Location page and the Category Page use “geodir-listing.php”

    Even If you tell me how to check if the page is showing “All Listings” (Direct Category) or “Location Based Listings” (Location/Category) I can add a IF condition there to Manually enter the description for Direct Category…

    I hope ive explained myself clearly as to what I want…

    #66370

    Guust
    Moderator
    Post count: 29970

    The second page you refer to is not a location page but a category/listings page filtered for all Places in New Jersey.
    If you want different descriptions for different category pages, depending on location, untick the “Use description of default for all locations” box and enter other descriptions as required.

    Location descriptions are added with a widget and the Multilocations addon:
    https://wpgeodirectory.com/docs/location-manager-widgets/#desc
    [Note to self: updated images!]

    #66384

    Hefin Dsouza
    Expired Member
    Post count: 48

    Hey Guust thanks for the quick reply,

    Ok so what I want basically is for a way to have it such a way that when its without the Filters I want it to have a different description and when the location filter’s are applied it should have a different description what is the best way to do it?

    Im thinking that since im already using the geodir-listing.php in my child theme if I could get a way to check “IF” the page is displaying without a location filter and with a filter?

    #66399

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    there is a global variable geodir_location_geo_home_link

    You could try something like this:

    
    
    global $geodir_location_geo_home_link;
                if ($geodir_location_geo_home_link){//my custom description} else {//normal description}

    I haven’t tested it though.

    Let us know if it worked.

    Thanks

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