• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Metro Pro – Inserting a tag around "Next / Previous"

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Metro Pro – Inserting a tag around "Next / Previous"

This topic is: not resolved

Tagged: exclude tags, next previous

  • This topic has 2 replies, 2 voices, and was last updated 4 years, 2 months ago by Tribulatio.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 20, 2019 at 5:10 am #490153
    Tribulatio
    Participant

    On one of my sites, built with Metro Pro, I have the snippet showing the title of the previous and of the next article at the bottom of each post.

    On that specific site, I am not using WP's own search tool, but the paid version of an external search tool, FreeFind, that is more adequate for my needs (moreover, it allows the search results to appear in a nice way as overlay).

    However, I have realized that FreeFind also indexes the "next / previous" titles at the bottom of each post, which is misleading for visitors, since those are only titles, and not content.

    FreeFind provides exclude tags for such cases:
    <!-- FreeFind Begin No Index -->
    <!-- FreeFind End No Index -->

    My problem is: where to insert those tags in order to make them work? In which file in the child theme folder? (I would also like to insert one or two empty lines with <br> below the next / previous links.)

    I had the same issue with the sidebar, since its content got indexed as well. However, I managed to solve the issue by inserting the exclude tags at the beginning of the first and at the end of the last widget (fortunately, both were HTML widget) — although it would be cleaner to insert those tags in the appropriate child theme file, but here again, I have not managed to find where.

    https://www.terrorisme.net
    March 20, 2019 at 5:34 am #490154
    Victor Font
    Moderator

    The adjacent-entry-pagination content is built using genesis_markup. This means when the content is created, two apply_filters are also created. They are:

    genesis_markup_adjacent-entry-pagination
    genesis_markup_adjacent-entry-pagination_output

    You can probably use either one to add your comments, but I would use the genesis_markup_adjacent-entry-pagination_output filter.

    You may need to adjust this for your purposes, but adding this to functions.php should work for you:

    add_filter('genesis_markup_adjacent-entry-pagination_output', 'add_freefind_exclude_tags');
    function add_freefind_exclude_tags( $tag ) {
        return "<!-- FreeFind Begin No Index -->" . $tag . "<!-- FreeFind End No Index -->";
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 31, 2019 at 9:26 am #490384
    Tribulatio
    Participant

    I apologize for not having acknowledged receipt of your answer earlier.

    Many thanks for your answer and for this very useful information. I would not have been able to find it by myself. I will test it soon, when I do the next reindexing of the website: I assume that it will work fine, and otherwise I will let you know.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble