GD Search for single CPT.

This topic contains 10 replies, has 3 voices, and was last updated by  Guust 7 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #424144

    jotomas
    Buyer
    Post count: 802

    Hello,

    My GD site is a directory of single specific directories, each using an specific CPT.

    I use the standard GD Search form via shortcode to search in all directories, that is, with its first field allowing to select between the CPTs and showing in first place the CPT set in GD settings.

    But I would like to have different GD Search forms set to an specific CPT without showing the others. Is there some way to do this, even making the first field of the search form invisible if possible?

    I look forward to your reply.

    Thank you very much for your attention.

    Best regards.

    #424250

    Guust
    Moderator
    Post count: 29970

    https://wpgeodirectory.com/docs/gd-search/#cpt

    The CPT selector defaults to the current CPT of a Listings, detail or search page. For example on an Events category page, Events will be listed first in the selector.

    You can hide the CPT selector with CSS: https://wpgeodirectory.com/docs/common-styling-examples/#cpt-selector

    Thanks

    #424297

    jotomas
    Buyer
    Post count: 802

    Hi Guust,

    Thank you very much for your response.

    I read the documentation before posting this support ticket. Maybe I am missing something.

    Then, a couple of questions arise:

    1) How an specific CPT Listings page could be linked?

    2) How to hide the CPT selector with CSS only in specific CPT Listings pages?

    However, what I would really like is to be able to arrange the CPT selector as I like on any location or standard WP page or post.

    But I read that this is a general setting:


    On a location page or any standard WP page or post, the order of the CPTs in the selector can be determined by changing the order at GD > Custom Post Types > Choose a CPT > Advance Mode tab > Order in post type list (Custom Post Types addon required).

    And I would like it to be configurable for each use, also in shortcodes.

    Is there some workaround to get this?

    Will GD V.2 have this functionality?

    I look forward to your reply.

    Thanks once again for your attention.

    Best regards.

    #424303

    Guust
    Moderator
    Post count: 29970

    1) How an specific CPT Listings page could be linked?
    Add the CPT Categories widget on a test page, and you will get all links to all CPT and categories pages:
    https://wpgeodirectory.com/docs/widgets/#cpt-cats
    https://wpgeodirectory.com/docs/core-shortcodes/#ctp-cats

    2) How to hide the CPT selector with CSS only in specific CPT Listings pages?
    Look for the special class added and target the CSS, see image.

    The search widget or shortcode is always the same, there are no options like that. That will not change in V2.

    Thanks

    #426823

    jotomas
    Buyer
    Post count: 802

    Hi Guust,

    Thank you very much for your reply.

    Now I have specific CPT Listing pages but how I could make different content appear on widgets depending of the specific CPT?

    I look forward to your reply.

    Thank you very much once again for your attention.

    Best regards.

    #426854

    Alex Rollin
    Moderator
    Post count: 27815

    To adjust which custom fields appear on listings and detail page tabs, visit the custom fields settings for each page and adjust the values in the field “Show in what locations” for each custom field.

    https://wpgeodirectory.com/docs/core-place-settings/#custom

    #426864

    Guust
    Moderator
    Post count: 29970
    #426893

    jotomas
    Buyer
    Post count: 802

    Hi Guust,

    Thank you very much for your response.

    It may be very simple, but my tech knowledge is very basic and I admit that I have been quite overwhelmed after reading the docs you linked.

    Could you help me to find the GD specific code for displaying specific widgets in GD Listings and GD Search pages, depending of GD CPT?

    I look forward to your reply.

    Thank you very much once again for your attention.

    Best regards.

    #426902

    Guust
    Moderator
    Post count: 29970

    1. Get the Widget logic plugin: https://wordpress.org/plugins/widget-logic/ and activate
    2. In a widget that you only want to show for the gd_place CPT you would add

    geodir_get_current_posttype()=='gd_place'

    2. In a widget that you only want to show for the gd_event CPT you would add

    geodir_get_current_posttype()=='gd_event'

    Thanks

    #427575

    jotomas
    Buyer
    Post count: 802

    Hi Guust,

    Thanks a lot!

    Best regards.

    #427577

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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