This topic has 11 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #157523
     korym
    Participant

    Hello, All.  I’m successfully receiving search results from my various CPTs when typing in a keyword in the Ajax search form, however, when I click “view all results,” I don’t get any results; just this link:

    https://www.cheersva.org/?s=cider&post_type%5B%5D=gd_event,gd_region_central_va,gd_region_hamp_roads,gd_region_north_va,gd_region_shen_val

    However, from that page, if I click the search icon, I successfully retrieve results:

    https://www.cheersva.org/?s=cider

    I would prefer keeping the CPTs enabled as I like how the results dynamically appear under the search field.  Can you tell me if there’s a way to disable the CPTs from the “view all results” link at the bottom?

    Thanks, in advance!

    Regards,

    Kory

    #157616
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #157903
     Radu
    Moderator

    You want to hide the button “view all results” ? or how to disable CPT from the button? You mean to have default search, without CPT’s in it ?

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #157906
     korym
    Participant

    Hi, Radu. I’d actually prefer to keep using the CPTs in the search. If I can’t use both the CPTs and have the “view all results” button view results instead of blank results, is there a way I can hide that button via a CSS entry?

    Thanks much!

    Regards,
    Kory

    #158118
     Radu
    Moderator

    Hi

    This it’s the css for hiding view all button

    COPY CODE
    
    #header .kleo_ajax_results a.ajax_view_all {
        display: none;
    }
    

    The CSS will be added to wp-admin -> theme options -> general settings -> quick CSS

    NOTE : Child theme needs to be installed and activated.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #158597
     korym
    Participant

    Works great, Radu, thanks much! I appreciate it! Please feel free to mark as resolved.

    Regards,
    Kory

    #158832
     Radu
    Moderator

    Great
    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #158996
     korym
    Participant

    Hello, Radu. My apologies for opening this back up, however, I’m also using a search field on the home page via a Visual Composer insert. I attempted to attach an extra class name to that VC insert called “homepageSearch.” Over in the quick CSS, I attempted to add the following code:

    COPY CODE
    /* This hides the "view all results" from the homepage search field */
    #homepageSearch .kleo_ajax_results a.ajax_view_all {
        display: none;
    }

    I cleared the cache and the “view all results” still show up on that field.

    Can you tell me what I might be doing wrong?

    Thanks much.

    Regards,
    Kory

    #159252
     Radu
    Moderator

    Hi,

    Try with important

    display: none !important;

    Or you can use this rule

    .kleo_ajax_results a.ajax_view_all {
    display: none !important;
    }

    And view all button will be hidden site-wide

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #159257
     korym
    Participant

    Hmmmmm, I tried replacing the former CSS rule with the following and it’s not showing up in the header menu as it previously wasn’t but still shows up on the site’s homepage:

    COPY CODE
    /* This hides the "view all results" from the search results */
    .kleo_ajax_results a.ajax_view_all {
        display: none !important;
    }

    I also cleared both my browser cache and server cache to make sure I’m receiving the latest page.

    Any other suggestions, Radu?

    Thanks much.

    Regards,
    Kory

    #159430
     korym
    Participant

    Hi, Radu. I checked my site this morning and it looked like that change did, in fact, successfully work. I’m no longer seeing “view all results” on either search fields.

    I’ll go ahead and mark this as resolved.

    Thanks much!

    Regards,
    Kory

    #159540
     Radu
    Moderator

    Great

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 12 posts - 1 through 12 (of 12 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?