Support » Plugins and Hacks » [Resolved] "Read More" Link – Solution

[Resolved] "Read More" Link – Solution

  • This thread/post is not a support question. I saw this question asked in a few threads with no response so I thought I’d create this thread for anyone wondering how to achieve this.

    If you have a user with a really long biography in their team member content you don’t necessarily want all that text output on the page where you’re listing multiple team members (i.e via shortcode).

    Currently, if you attempt to break up a team members content using the <!--more--> tag it will be ignored when the content is displayed (i.e via shortcode); not ideal in all scenarios.

    There is a filter in the plugin, shown on line 196 of the woothemes-our-team-template.php file, that allows us to get around this called “woothemes_our_team_content”.

    If you want to display only part of the team member content, using the <!--more--> tag found in the team member content editor, add the following to your functions.php:

    add_filter( 'woothemes_our_team_content', function () {
        global $more;
        $real_more = $more;
        $more      = 0;
        $output    = wpautop( get_the_content() );
        $more      = $real_more;
        return $output;
    } );

    If you want to change the text of the “More” link to something custom you can modify the line above from:

    $output = wpautop( get_the_content() );


    $output = wpautop( get_the_content( 'Read Full Biography...' ) );

    Hopefully this will help others who are bumping into this problem using this plugin. 🙂

    * Solution courtesy of Rarst on WordPress StackExchange


Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] "Read More" Link – Solution’ is closed to new replies.