Skip to content

Instantly share code, notes, and snippets.

@anythinggraphic
Forked from Deaner666/functions.php
Created November 16, 2016 22:34
Show Gist options
  • Select an option

  • Save anythinggraphic/6c0f7f650bad0f3f31915709cf1ba064 to your computer and use it in GitHub Desktop.

Select an option

Save anythinggraphic/6c0f7f650bad0f3f31915709cf1ba064 to your computer and use it in GitHub Desktop.

Revisions

  1. anythinggraphic revised this gist Nov 16, 2016. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,9 @@
    <?php

    // Add "Read More" link to hand-crafted excerpts
    add_filter('get_the_excerpt', 'wpm_manual_excerpt_read_more_link');
    function wpm_manual_excerpt_read_more_link($excerpt) {
    /* Add "Read More" link to hand-crafted excerpts
    ----------------------------------------------------------------------------------------*/
    add_filter('get_the_excerpt', 'ag_manual_excerpt_read_more_link');
    function ag_manual_excerpt_read_more_link($excerpt) {
    $excerpt_more = '';
    if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') {
    $excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>';
  2. anythinggraphic revised this gist Nov 16, 2016. No changes.
  3. @Deaner666 Deaner666 revised this gist Jul 22, 2015. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,9 @@
    // Add "Read More" link to hand-crafted excerpts
    add_filter('get_the_excerpt', 'wpm_manual_excerpt_read_more_link');
    function wpm_manual_excerpt_read_more_link($excerpt) {
    $excerpt_more = '';
    if( has_excerpt() ) {
    $excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading]</a>';
    }
    return $excerpt . $excerpt_more;
    $excerpt_more = '';
    if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') {
    $excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>';
    }
    return $excerpt . $excerpt_more;
    }
  4. @Deaner666 Deaner666 revised this gist Jan 20, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    // Add "Read More" link to hand-crafted excerpts
    add_filter('get_the_excerpt', 'wpm_manual_excerpt_read_more_link');
    function wpm_manual_excerpt_read_more_link($excerpt) {
  5. @Deaner666 Deaner666 created this gist Jan 20, 2015.
    9 changes: 9 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // Add "Read More" link to hand-crafted excerpts
    add_filter('get_the_excerpt', 'wpm_manual_excerpt_read_more_link');
    function wpm_manual_excerpt_read_more_link($excerpt) {
    $excerpt_more = '';
    if( has_excerpt() ) {
    $excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading]</a>';
    }
    return $excerpt . $excerpt_more;
    }