WordPress.org

Ready to get started?Download WordPress

Forums

Our Team by WooThemes
[resolved] "Read More" Link - Solution (6 posts)

  1. Amber
    Member
    Posted 6 months ago #

    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/

  2. Roger Soto
    Member
    Posted 4 months ago #

    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

  3. katiemurray
    Member
    Posted 3 months ago #

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

  4. katiemurray
    Member
    Posted 3 months ago #

    And Amber Member, than you too

  5. jameskoster
    Member
    Plugin Author

    Posted 3 months ago #

    FYI this will be fixed in the next release :-)

  6. Roger Soto
    Member
    Posted 3 months ago #

    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]

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.