Hide CPT on selection box of search in MacOS and iOS
This topic contains 15 replies, has 2 voices, and was last updated by Kor 6 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 2, 2018 at 7:36 pm #441024
Hi,
I use this CSS that I found somewhere or that GD tech support team supplied in one of my previous support ticket to hide specific CPT in the search form.
.search_by_post option[value=gd_place]
{display: none!important;}I checked with the Windows and Android devices I use and it worked.
However, today I noticed that MacOS and iOS users still show the CPT hidden in the form in a selection windows that appears when clicking on the CPT field of the search form.
Is there some way to hide too the CPT in that selection window?
I look forward to your reply.
Thank you very much once again for your help.
Best regards.
August 3, 2018 at 1:44 am #441040Hi Jotomas,
Thanks for your post. I’ve just tested it on my mobile IOS and I’m able to see the issue you’re referring to. This looks like a cache related and could try deactivating/clearing all cache plugins temporarily and see if it helps?
Thanks!
August 3, 2018 at 5:01 am #441052Hi Kor,
Thank you for your reply.
There are only two cache active, Cloudways Breeze plugin and Cloudflare CDN.
I will try what you suggest, but I do not understand how the issue could be cache related, since the CSS code to hide the CPT in the search form has been there for months although it is only now that I realized the issue because it has been casually reported by a MacOS / iOS user.
I will let you know if it works.
Best regards.
August 6, 2018 at 1:54 am #441316Hi Jotomas,
Thanks for your reply. Are you able to isolate the issue to only MAC OS users? If you are not so sure, create a test page and insert the search form using a shortcode. Then test it out again for both Windows and MAC browsers.
Thanks!
August 6, 2018 at 3:38 pm #441384Hi Kor,
Yes, I am sure that the issue is only with MacOS and iOS users.
I temporarily sorted it out using this CCS code, that I have found in some thread here, to hide the CPT field of the Search form, since by now I have only one active CPT.
/* Hide CPT Selector from Search */
.home .gd-search-field-cpt,
.archive .gd-search-field-cpt,
.search .gd-search-field-cpt {display: none;}
.home .gd-search-field-taxonomy,
.archive .gd-search-field-taxonomy,
.search .gd-search-field-taxonomy {display: initial !important;}But I will soon activate other CPTs and then I will need another solution.
I look forward to your news.
Thank you very much once again for your help.
Best regards.
August 6, 2018 at 5:23 pm #441405Hi Jotomas,
Thanks for your reply. Could you please update your credentials? I’d like to check further. Please use the private reply option below.
Thanks!
August 6, 2018 at 5:31 pm #441407This reply has been marked as private.August 7, 2018 at 1:57 am #441455Hi jotomas,
Thanks for your reply. Could you tell us what you need now? Do you still need to “hide specific CPT in the search form”?
Thanks
August 7, 2018 at 6:22 am #441488Hi Kor,
Thank you for your reply.
I think I may have confused you.
The CSS code not working with MacOS and iOS was this:
/* Hide gd_place CPT from Search by CPT option */
.search_by_post option[value=gd_place] {display: none!important;}
Since currently my GD site works only with a single post type and, therefore, it does not make much sense to keep the post type field in the search form, I temporarily replaced that CSS code by this other that hides the post type field in the search form:
/* Hide CPT Selector from Search */
.home .gd-search-field-cpt,
.archive .gd-search-field-cpt,
.search .gd-search-field-cpt {display: none;}
.home .gd-search-field-taxonomy,
.archive .gd-search-field-taxonomy,
.search .gd-search-field-taxonomy {display: initial !important;}However, this is only a temporary solution, simple I will activate new CPTs soon. Then, I still need a solution to hide the CPT field in the search form that works with MacOS and iOS too.
I look forward to your news.
Thank you very much once again for your help.
Best regards.
August 7, 2018 at 7:54 am #441495Hi Jotomas,
I’d need you to activate some CPT’s for this test. Do you think you do that so that I could test some custom CSS code? Or you want me to work on the existing CPT’s which you have two at the moment.
Thanks!
August 7, 2018 at 2:22 pm #441547Hi Kor,
Thank you very much for your response.
You can work on the existing CPT’s which I have two at the moment.
I look forward to your news.
Thank you very much once again for your help.
Best regards.
August 8, 2018 at 3:21 pm #441690This reply has been marked as private.August 8, 2018 at 3:56 pm #441700Hi Kor,
No, I did not remove any CPT. In fact, I can see both them “Menjar i beure” and “Negocis de Roses” in the CPT selector of the search form in the page https://inforoses.com/gd-test/
I look forward to your news.
Thank you very much once again for your help.
Best regards.
August 9, 2018 at 6:07 am #441789Hi Kor,
Due to problems as per this support ticket:
https://wpgeodirectory.com/support/topic/theme-compatibility-problems-2/
I need to restore a backup from yesterday morning before you asked to test some custom CSS code.
Best regards.
August 9, 2018 at 6:52 am #441797Hi Jotomas,
Thanks for your update. Will recreate the test page and test the custom CSS code again on my mobile. I will come back to you asap!
Thanks!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket