How to Filter the Genesis Post Navigation Text

Sometimes your site may focus on reviews of Academy award winning films, or great recipes from around the world and the word “post” is no longer relevant to your site. What you are writing and your viewers reading aren’t posts, but reviews or recipes, and the post navigation at the bottom of an index page may be a little misleading. To change this text is simple, in the latest release of Genesis (v1.6) the older/newer and next/previous text in the post navigation are now filterable.

Older / Newer Post Navigation Filter

This filter runs when in Genesis Theme Settings, under Content Archives, “Select Post Navigation Technique:” is set Older / Newer. The default output Is “« Older Posts” and “Newer Posts »” to filter this simply add the code below to your child theme’s functions.php. In this example we change it to read Older and Newer Reviews.

add_filter( 'genesis_older_link_text', 'gt_review_older_link_text' );
function gt_review_older_link_text() {
        $olderlink = '« Older Reviews';
        return $olderlink;
}
add_filter( 'genesis_newer_link_text', 'gt_review_newer_link_text' );
function gt_review_newer_link_text() {
        $newerlink = 'Newer Reviews »';
        return $newerlink;
}

Previous / Next Post Navigation Filter

This filter runs when in Genesis Theme Settings, under Content Archives, “Select Post Navigation Technique:” is set Previous / Next. The default output is “« Previous Posts” and “Next Posts »” to filter this simply add the code below to your child theme’s functions.php. In this example we change it to read Previous and Next Reviews.

add_filter( 'genesis_prev_link_text', 'gt_review_prev_link_text' );
function gt_review_prev_link_text() {
        $prevlink = '« Previous Reviews';
        return $prevlink;
}
add_filter( 'genesis_next_link_text', 'gt_review_next_link_text' );
function gt_review_next_link_text() {
        $nextlink = 'Next Reviews »';
        return $nextlink;
}

Attention to detail is very important when building a site for a client or yourself. Taking the extra time to polish up a product is really what makes a great site or theme. This is minor customization, but when you take the time to add little touches like this to a site is really what starts separating yours from the others.

Comments

  1. says

    Hello, Chris. I read your tutorial, I’m still having trouble adding an “older post” option at the bottom of my site.

    As of now, nothing is appearing. I included my e-mail address, if you have time, some help would be greatly appreciated.

    Thanks.

  2. says

    Is there a way – when someone’s entered into content part i.e. post. Only post part displays and header including logo get removed?

    Regards,
    Irfan

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>