Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Flexform › Team member excerpt function issue
New Landing › How can we help? › Themeforest Theme Support › Flexform › Team member excerpt function issue
- This topic has 10 replies, 4 voices, and was last updated 11 years by Swift Ideas – Ed.
-
Posted in: Flexform
-
August 16, 2013 at 10:19 pm #16877
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:
Thanks in advance for any help!
August 17, 2013 at 6:43 pm #16920Hey,
The excerpt should be automatically generated by WordPress, so you would need to just add the description in the editor.
Regards,
————————————————————————————————————
Cosmin
Support AssistantAugust 17, 2013 at 10:43 pm #16940That’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?
August 18, 2013 at 5:20 pm #16998Is 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',
),
August 20, 2013 at 3:40 am #17227Have you deactivated the Excerpt field in the screen options in the upper right corner of the page/post edit view maybe?
August 20, 2013 at 4:56 pm #17410Definitely 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.
August 22, 2013 at 12:28 pm #17676Sorry, 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.August 22, 2013 at 5:20 pm #17757This reply has been marked as private.August 26, 2013 at 5:32 pm #18205@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
August 27, 2013 at 11:10 pm #18468I 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
August 28, 2013 at 5:28 pm #18652Thanks for posting your customisation solution!
– Ed
-
Posted in: Flexform
The topic ‘Team member excerpt function issue’ is closed to new replies.