Viewing 1 replies (of 1 total)
  • Thread Starter ConCity

    (@concity)

    Dug into the functions and fixed it myself. Posting here incase anyone else wants to do the same.

    I commented out the returns on excerptmore line 191 and the morelink on line 196.
    Then added echo and the call to the permalinlink on line 212. Finished code is below.

    I also change the verbage from Read more. Read the remainder.

    function gamepress_excerptlength_teaser($length) {
        return 20;
    }
    function gamepress_excerptlength_default($length) {
        return 40;
    }
    function gamepress_excerptmore($more)
    {
    	global $post;
    	//return '... <br /><a  class="more" href="' . get_permalink($post->ID) . '">'.__('Read the remainder of this article', 'gamepress').' &raquo;</a>';
    }
    function gamepress_morelink($more)
    {
    	global $post;
    	//return '... <a class="more_link" href="' . get_permalink($post->ID) . '">'.__('Read the remainder of this article', 'gamepress').' &raquo;</a>';
    }
    
    function gamepress_excerpt($length_callback='', $more_callback='') {
        global $post;
        if(function_exists($length_callback)){
            add_filter('excerpt_length', $length_callback);
        }
        if(function_exists($more_callback)){
            add_filter('excerpt_more', $more_callback);
        }
        $output = get_the_excerpt();
        $output = apply_filters('wptexturize', $output);
        $output = apply_filters('convert_chars', $output);
        $output = '<p>'.$output.'</p>';
        echo $output;
    	echo '...&nbsp; <a  class="more" href="' . get_permalink($post->ID) . '">'.__('Read the remainder of this article', 'gamepress').' &raquo;</a>';
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: GamePress] Read More doesn't show up adding excerpt to post’ is closed to new replies.