New Landing How can we help? Themeforest Theme Support Neighborhood solution request: team members area

Viewing 7 posts - 1 through 7 (of 7 total)
  • #16931
    bpxF5Lae
    Member
    Post count: 37

    on my website in the team area we have a lot of text.
    and cut-line does not work.
    Is there a way to include the processing of the tag <! – more -> in this part of the site?

    or maybe there is some another way for this feature?

    #17207
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hi!

    The read more tag won’t work but I wrote you a custom code to shorten your team member content automatically.
    If you want to use it, open up the file neihgborhood > includes > swift-framework > page-builder > builder > shortcodes > team.php

    and replace the whole content with http://pastebin.com/F7UfZaF8

    What I did is I added a custom function called custom_content

    
    			function custom_content($limit) {
    			  $content = explode(' ', get_the_content(), $limit);
    			  if (count($content)>=$limit) {
    			    array_pop($content);
    			    $content = implode(" ",$content).'...';
    			  } else {
    			    $content = implode(" ",$content);
    			  }	
    			  $content = preg_replace('/\[.+\]/','', $content);
    			  $content = apply_filters('the_content', $content); 
    			  $content = str_replace(']]>', ']]>', $content);
    			  return $content;
    			}
    	

    which will allow you to cut your content for the member bio by calling custom_content(10) – where 10 stands for the number of words you want to display.

    Ideally we would place the function in the functions.php file, but we don’t want you to edit too many files 🙂

    Cheers

    #17208
    Melanie – SUPPORT
    Member
    Post count: 11032

    I will forward this to the developer, maybe he wants to consider to include it as well.

    #17454
    bpxF5Lae
    Member
    Post count: 37

    many thanks, I replace code in team.php but where and how I need use function custom_content() in WP-admin?

    I show team members at main page automatic by team carousel in Swift Page Builder
    and I don’t see possibility to paste new function in WP visual editor

    or everything had to happen by itself after code-replacing? so not occurred
    long long text
    http://2012th.ru/

    #17540
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    We’ll look at including this in the next theme update.

    You’ll want to use the team asset, not team carousel, then you can edit line 74 to change the length:

    $member_bio = custom_content(10);
    

    – Ed

    #18384
    bpxF5Lae
    Member
    Post count: 37

    team asset is worse than team carousel in my way…
    i will waiting for update

    #18603
    Melanie – SUPPORT
    Member
    Post count: 11032

    Okay, cheers

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register