Return to Bug report

RSS short description displaying continue reading button

Home Forums Graphene WordPress theme Bug report RSS short description displaying continue reading button

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8630
    Anonymous

    Hello,

    We’re using the Graphene theme for our student newspaper website, but I’ve had to make a change to one of your functions. We were finding that in the RSS feed, the continue reading button was being displayed in the short description. This was causing us some issues.

    I have fixed the problem locally in includes/theme-loop.php function graphene_continue_reading_link where I have added a check for is_feed().

    Could the change can be put back into the Graphene template?

    function graphene_continue_reading_link() {
    global $graphene_in_slider;
    if ( ! is_page() && ! $graphene_in_slider && ! is_feed() ) {
    $more_link_text = __( 'Continue reading »', 'graphene' );
    return '</p><p><a href="' . get_permalink() . '">' . $more_link_text . '</a>';
    }
    }
    endif;

    Cheers

    #41668
    Prasanna SP
    Member

    You can add this to child-theme functions.php to override the parent theme continue reading link function.

    <?php
    function graphene_continue_reading_link() {
    global $graphene_in_slider;
    if ( ! is_page() && ! $graphene_in_slider && ! is_feed() ) {
    $more_link_text = __( 'Continue reading &raquo;', 'graphene' );
    return '</p><p><a class="more-link block-button" href="' . get_permalink() . '">' . $more_link_text . '</a>';
    }
    }

    Put code in between backtick (

    Code:
    `

    ) characters. It’s usually located above the Tab key on your keyboard.

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

You must be logged in to reply to this topic.