Insert "Popular Categories" and search bar at the top of a page

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

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

Open Support Ticket
  • Author
    Posts
  • #53739

    amandacooper
    Expired Member
    Post count: 7

    We would like to add some content to the top of our post type listing pages. So we would like to use WordPress pages and the shortcode to display the listings. We have been able to do that. but on those pages we would like the “popular categories” and “search” bars to appear above the content.

    What would be the best way to insert the two bars that are in the geodirectory template (“popular categories” and “search”)?

    Please see the screenshot for clarification 🙂

    #53762

    Guust
    Moderator
    Post count: 29970

    Either as widgets if you have or create a widget area there or by shortcodes:
    [gd_popular_post_category]
    [gd_advanced_search]
    https://wpgeodirectory.com/docs/core-shortcodes/#search
    https://wpgeodirectory.com/docs/core-shortcodes/#popcats

    Tip: You can also use the “category description” to add content to your listings pages, using the GD template instead of creating different pages.
    Have a look at Places > categories and edit one of your categories.

    #53976

    amandacooper
    Expired Member
    Post count: 7

    Thanks again for great support.

    If I use [gd_popular_post_category] in a page, all categories show up. Our “Member Profiles” page is showing categories that are from the events/calendar. Obviously we only want categories that pertain to the post type “Member Profiles” 🙂

    The widget allows you to select a post type (see screenshot). I have searched the documentation for specifying the post type when using the shortcode but the only parameters are “category_limit” and “title.”

    If there are no other parameters, we may go ahead and build the list of categories on our own at the top of the page. Unfortunately that will not show the post count for each category.

    #54003

    amandacooper
    Expired Member
    Post count: 7

    As well, when viewing the GD default post type page, the “correct, correlating” post type is the first option in the dropdown for the search. In other words, by default, the correlating post type is shown in the dropdown without having to even touch the dropdown.

    When I use the shortcode [gd_advanced_search] the first post type is always “Member Profiles” (in order listed in the GD “order” settings). See the screenshot.

    I don’t expect a solution for this. We are going to have to leave it “as is.”

    What would solve both of our problems though is the ability to add content to some section of the default post type page created by GD.

    #54074

    Guust
    Moderator
    Post count: 29970

    You can add widgets to the listings page that only show on particular CPT pages and not others using https://wordpress.org/plugins/widget-logic/ That is the easiest way to customize category pages.
    You can also use the category description to differentiate between category pages.

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

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

Open Support Ticket