Add search to no listings found page

This topic contains 8 replies, has 3 voices, and was last updated by  Kiran 6 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #430314

    Jeff Adams
    Free User
    Post count: 1780

    could someone please show me how to add a search bar to the no listing found page, that is the page shown in the image below?

    #430316

    Jeff Adams
    Free User
    Post count: 1780

    Or even better a search bar and then:

    show all results for that custom post type (or better category) that was searched with no results.

    It’s always a good idea to show at least something and give them a chance to do something right then and there then give them nothing and force them to have to go back where they started…

    #430317

    Jeff Adams
    Free User
    Post count: 1780

    The only other thing I can imagine having on this page, this no results page that is, would be a text field where I can enter a suggestion like “No listings in your area? Add yours now or become an affiliate and add someone else’s to get commission when they join!” And of course be able to link to the ad listing page.

    #430350

    Alex Rollin
    Moderator
    Post count: 27815
    #430481

    Jeff Adams
    Free User
    Post count: 1780

    Sorry, I started this post out all wrong. Thank you for sharing those links but as far as I can tell they do not address the “No Listings Found” page that I can tell.

    For this page, I would like to do 2 things:
    I want to change/add text to the “no listings found” page. Is there an easy way to modify that text? I also need to add a hyperlink in that text, link to my add listing page. I want to encourage people to add listings when there are none.

    Lastly, is there a way to show listings even when there are none? Then it could say “No Listings Found.” and below that show the listings for that CPT. It is better to at least show something whenever possible.

    Thanks!

    #430491

    Alex Rollin
    Moderator
    Post count: 27815

    For “No listings found which match your selection.” it is possible to use the translate method to change that text and provide more/better/contextual information.

    https://wpgeodirectory.com/docs/translate-core/

    Just as it is possible to add a search widget to the Search page, it is also possible to add other widgets like a GD Popular Post view widget.

    To add a link, perhaps add a text widget to the page with your text and a link.

    #430540

    Jeff Adams
    Free User
    Post count: 1780

    I didn’t add a search widget to the search page, not that I recall anyways. Supreme Theme only appears to have a top, right, and bottom widget area. There’s no “content section”. Where do I add widgets to the content area of the “No Listings Found Page”?

    #430572

    Alex Rollin
    Moderator
    Post count: 27815

    It is not possible to add a content section widget area without a customization, but I will flag your question in case the developers have an idea.

    #430607

    Kiran
    Moderator
    Post count: 7069

    Hi Jeff,

    Use can manage it via hook. Here is hook that you can use to filter “No listings found ….” https://wpgeodirectory.com/codex/codex/geodirectory_filters/geodir_message_listing_not_found/

    View file: https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/template_functions.php#L520

    Thanks,
    Kiran

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