Support » Plugin: Our Team by WooThemes » "Read More" Link – Solution

  • Resolved Amber

    (@syrehn)


    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() );

    to:

    $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

    http://wordpress.org/plugins/our-team-by-woothemes/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Roger Soto

    (@rogersotorivera)

    for those coming from http://wordpress.org/support/plugin/testimonials-by-woothemes

    works well for me

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

    rogersoto.com

    Thank you Roger Soto, for posting this. I found it helpful.

    And Amber Member, than you too

    Plugin Author James Koster

    (@jameskoster)

    FYI this will be fixed in the next release 🙂

    Roger Soto

    (@rogersotorivera)

    Thanks for the fit back 🙂
    jameskoster and hopefully solve it in its next update;

    Gracias por el fit back 🙂
    y espero que jameskoster lo solucione en su proxima actualizacion

    [sig moderated as per the Forum Rules]

    The most recent version of “Our Team” does appear to honour the “More” tag. However, there is no “Read More” link associated with it. The text appears to just cut off with […] as the ending.

    I tried using the above posted snippet and it doesn’t appear to work any longer either. :/

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