New Landing How can we help? Themeforest Theme Support Flexform Team member excerpt function issue

Viewing 11 posts - 1 through 11 (of 11 total)
  • Posted in: Flexform
  • #16877
    Tekguild
    Member
    Post count: 171

    Hello!

    I have a little problem that cropped up recently – I’m not sure if it’s due to updating to Flexform 1.5 or what, but here’s the situation.

    For the Team page I’ve edited the flexform/includes/page-builder/composer/lib/shortcodes/team.php file to use ‘get_the_excerpt’, as the client only wanted a short paragraph on the page with a ‘Read More’ link to go to the full team member bio.

    Here’s the code:

    $items .= ‘<div class=”team-member-bio”>’. get_the_excerpt ($member_bio) .’<br /><br />’;
    $items .= ‘Read More »</div>’;

    The problem I just discovered is that I went to change the excerpt for one of the team members, but I don’t see any excerpt area in the Team member editor. My memory of how it was added before is a bit hazy, so I’m hoping I might get a little insight.

    You can view the team member page at:

    http://grokbuilder.org/team/

    Thanks in advance for any help!

    #16920
    Cosmin – SUPPORT
    Member
    Post count: 3851

    Hey,

    The excerpt should be automatically generated by WordPress, so you would need to just add the description in the editor.

    Regards,

    ————————————————————————————————————

    Cosmin
    Support Assistant

    #16940
    Tekguild
    Member
    Post count: 171

    That’s the problem – I see no area in the editor for Description or Excerpt and changing the text in the editor does not change the text shown on the front-end.

    The client *does* recall there being an area for excerpt in the editor previously, which is why I’m wondering where it went after the update. For instance – if you look at the Team page and the text for Kenneth Mabbs, then click on the ‘Read More’, you’ll see the first sentence on the full bio is “This is a test of the Team excerpt function. It should pull this info in automagically. If it isn’t, then something is going wrong somewhere…” – that text is not shown in the excerpt on the Team page.

    What am I missing here?

    #16998
    Tekguild
    Member
    Post count: 171

    Is it possible to just add an excerpt meta box by copying the code used in meta-boxes.php from, say, the Post meta box section to the Team meta box section?

    // CUSTOM EXCERPT SECTION
    array (
    'name' => '',
    'title' => 'Custom Excerpt',
    'id' => "{$prefix}heading_custom_excerpt",
    'type' => 'section'
    ),

    // CUSTOM EXCERPT
    array(
    'name' => 'Custom excerpt',
    'desc' => "You can optionally write a custom excerpt here to display instead of the excerpt that is automatically generated.",
    'id' => "{$prefix}custom_excerpt",
    'type' => 'textarea',
    'std' => "",
    'cols' => '40',
    'rows' => '8',
    ),

    #17227
    Melanie – SUPPORT
    Member
    Post count: 11032

    Have you deactivated the Excerpt field in the screen options in the upper right corner of the page/post edit view maybe?

    #17410
    Tekguild
    Member
    Post count: 171

    Definitely not. I’m very familiar with WP and almost all it’s ‘gotchas’. The meta-boxes.php code doesn’t include the excerpt code I indicated for the Team section, which makes me think that’s why it’s no showing up. Something must have been there at some point because, on the Team page in WP Admin where it shows all the Team members, all of them have a description that matches their excerpt shown on the front end. There’s just no excerpt field in the individual team member admin area and the excerpt shown on the front end doesn’t change when I change the Team member text.

    #17676
    Melanie – SUPPORT
    Member
    Post count: 11032

    Sorry, we cannot possibly know your level of knowledge and need to suggest every possible solution.
    If you activate custo mfields, do you see some excerpt custom field which has your text in it?
    Feel free to let us know your wp-admin login details so we can check it out.

    #17757
    Tekguild
    Member
    Post count: 171
    This reply has been marked as private.
    #18205
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @grokism – that is possible (to add an extra meta box) however this isn’t something that is included by default. We weren’t planning on including a detail page for the team member, and just keeping it to be the index view.

    We may look at improving this for an update though.

    – Ed

    #18468
    Tekguild
    Member
    Post count: 171

    I figured this out. In case anyone else needs to do this, it’s relatively easy:

    Change line 60 of flexform/includes/page-builder/composer/lib/shortcodes/team.php to:

    $member_bio = get_post_meta($post->ID, ‘sf_team_custom_excerpt’, true);

    Line 86 was changed to:

    $items .= ‘<div class=”team-member-bio”>’. $member_bio .’ Read More >></div>’;

    To get the Custom Excerpt box to show up in the Team editor, add the code (in bold) starting with // Custom Excerpt Section to flexform/includes/meta-boxes.php directly after the Dribble code, making sure to add the comma after the closing ) in the Dribble section – the section should look like this after editing:

    // TEAM MEMBER DRIBBBLE
    array(
    ‘name’ => ‘Dribbble’,
    ‘id’ => $prefix . ‘team_member_dribbble’,
    ‘desc’ => “Enter the team member’s Dribbble username.”,
    ‘clone’ => false,
    ‘type’ => ‘text’,
    ‘std’ => ”,
    ),
    // CUSTOM EXCERPT SECTION
    array (
    ‘name’ => ”,
    ‘title’ => ‘Team Member Custom Excerpt’,
    ‘id’ => “{$prefix}team_custom_excerpt”,
    ‘type’ => ‘section’
    ),

    // CUSTOM EXCERPT
    array(
    ‘name’ => ‘Custom excerpt’,
    ‘desc’ => “You can optionally write a custom excerpt here to display instead of the excerpt that is automatically generated.”,
    ‘id’ => $prefix . ‘team_custom_excerpt’,
    ‘type’ => ‘textarea’,
    ‘std’ => “”,
    ‘cols’ => ’40’,
    ‘rows’ => ‘8’,
    )

    )
    );
    /* ==================================================

    Clients Meta Box

    #18652
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Thanks for posting your customisation solution!

    – Ed

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

The topic ‘Team member excerpt function issue’ is closed to new replies.