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-
AuthorPosts
-
March 30, 2018 at 8:17 am #424144
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.
March 31, 2018 at 1:03 am #424250https://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
March 31, 2018 at 9:08 am #424297Hi 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.
March 31, 2018 at 11:35 am #4243031) 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-cats2) 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
April 16, 2018 at 3:56 pm #426823Hi 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.
April 16, 2018 at 9:13 pm #426854To 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.
April 17, 2018 at 12:19 am #426864Please review https://wpgeodirectory.com/docs/useful-plugins/#logic
Thanks
April 17, 2018 at 6:22 am #426893Hi 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.
April 17, 2018 at 8:05 am #4269021. 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 addgeodir_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
April 22, 2018 at 8:57 pm #427575Hi Guust,
Thanks a lot!
Best regards.
April 22, 2018 at 9:24 pm #427577You’re welcome 🙂
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket