Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Hi JeeBar,

    Not sure if you have resolved this for your site already.

    I too had the same issue trying to add multiple anchor links within a long text box (color section was not an option).
    After trying many different suggestions, I found the below code worked perfectly.
    I simply added this code before the heading I was wanting the anchor link to go to.
    <p style="position: relative;"><a style="position: absolute; top: -170px;" name="anchor-link-name"></a></p>
    Of course the -170px is tailor-made to my sticky header.

    Cheers, Aaron

    in reply to: Advanced Search Problem #454598

    Yes it is solved, thanks Rikard.

    The ajax window results are mirroring the on-page results with the addition of the code mentioned in #454205

    SearchEverything works to remove selected pages for the on-page results, but not the ajax window (it still displays unwanted pages).
    The code snippet fixes this. Voila!

    in reply to: Advanced Search Problem #454205

    I found a solution that worked for me on wordpress.org/support/topic/excluding-page-from-search (Thanks Todd!)
    For me I added this to function.php (where 1234 is your page ID)

    function mySearchFilter($query) {
    if ($query->is_search) {
    $excludeId = 1234;
    $query->set(‘post__not_in’, array($excludeId));
    }
    return $query;
    }
    add_filter(‘pre_get_posts’,’mySearchFilter’);

    • This reply was modified 9 years, 5 months ago by Aaron.
    in reply to: Advanced Search Problem #454204

    I too am using Search Everything, and wondering if there was a suggested code addition to function.php that worked.
    The search results displaying on the page after hitting enter are excluding set pages, but the ajax box is still displaying the pages.

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