-
AuthorPosts
-
July 6, 2018 at 9:59 am #981941
Hello,
In previous versions of Enfold I had applied the indicated change on a next post to put a shortcode in the excerpt (currency converter) and it worked fine.
——————–
You need to modify /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/portfolio.php – open the file and replace$ output. =! empty ($ excerpt)? “<div class = ‘grid-entry-excerpt entry-content'” .avia_markup_helper (array (‘context’ => ‘entry_content’, ‘echo’ => false)). “>”. $ excerpt. “</ div > “: ”;
with
$ output. =! empty ($ excerpt)? “<div class = ‘grid-entry-excerpt entry-content'” .avia_markup_helper (array (‘context’ => ‘entry_content’, ‘echo’ => false)). “>”. do_shortcode ($ excerpt). ” </ div> “: ”;
——————–But now in the latest version of Enfold, I do not find this code to change it. What must be done now?
Thank you Enfold
July 6, 2018 at 10:38 am #981966Rikard, Ismael? Nobody can help me?
July 6, 2018 at 2:13 pm #982066I have the same problem
July 6, 2018 at 2:53 pm #982080SOLVED:
/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/portfolio/portfolio.php
Change line 652
$output .= !empty($excerpt) ? “<div class=’grid-entry-excerpt entry-content’ “.avia_markup_helper(array(‘context’=>’entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup)).”>”.$excerpt.”</div>” : ”;
in
$output .= !empty($excerpt) ? “<div class=’grid-entry-excerpt entry-content’ “.avia_markup_helper(array(‘context’=>’entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup)).”>”.do_shortcode($excerpt).”</div>” : ”;July 7, 2018 at 8:42 am #982332Hi manurimini,
Great, glad you found a solution and thanks for sharing. Did you try that out @kohlidays_kohsamui?
Best regards,
RikardJuly 7, 2018 at 12:03 pm #982420Thanks a lot Manurimini. It’s works like a charm. Perfect. Thanks Rikard. Have both a great day.
July 8, 2018 at 6:44 am #982636Hi,
Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardApril 10, 2019 at 4:25 pm #1089179Hello, I tryng to make the same, Need to read shortcode in the excerpt.. But I cannot find this:
$ output. =! Empty ($ excerpt)? “<Div class = ‘grid-entry-excerpt entry-content'” .avia_markup_helper (array (‘context’ => ‘entry_content’, ‘echo’ => false, ‘id’ => $ the_id, ‘custom_markup’ => $ custom_markup)). “>”. $ excerpt. “</ div>”: “;Help me please
April 11, 2019 at 6:18 pm #1089658Hi Sachasilvestri,
You should find it in wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/portfolio/portfolio.php (line 657 in Enfold 4.5.5).
Hope this helps.Best regards,
NikkoApril 16, 2019 at 12:25 am #1091137Hi Nikko!!
Thanks for your reply!
unfortunately no… the shortcodes does not work in excerpts … pherhaps something wrong or maybe I did not understand how I have to do …
I am interested in being able to put diversified excerpts for the same articles shown in more galleries and in more pages (they are pages that replace archive pages), so I need to be able to do more excerpts or to add a custom field to add content under the previews.
For this reason, if is possible make readable the shortcodes in the excerpt, I could use it to diversify ….
in my Portfolio.php file there is this code .. but it still doesn’t work:$output .= !empty($excerpt) ? “<div class=’grid-entry-excerpt entry-content’ “.avia_markup_helper(array(‘context’=>’entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup)).”>”.do_shortcode($excerpt).”</div>” : ”;
$output .= !empty($title) || !empty($excerpt) ? “</div>” : ”;
$output .= ‘<footer class=”entry-footer”></footer>’;
$output .= “</article>”;
$output .= “</div>”;
}
I hope in a prompt reply
Sincerly,
Sacha- This reply was modified 5 years, 7 months ago by Marco.
April 16, 2019 at 11:19 am #1091379Hi Sacha,
Can you give a sample content you added for your excerpt? so we can have more context.
Best regards,
NikkoApril 16, 2019 at 11:40 am #1091385Yess sure, I whrite in private
April 18, 2019 at 8:56 am #1092342Sorry Nikko, or someone…
There are no reply for this issue?
Sincerly
SachaApril 24, 2019 at 8:10 pm #1094150Hi,
Unfortunately no update for this yet.
Best regards,
BasilisJanuary 11, 2021 at 9:50 pm #1271698Same issue for Enfold version 4.7.6.4… can’t find the code to replace and what to replace it with.
January 13, 2021 at 8:16 am #1272058Hi teamvelocitymarketing,
It’s in portfolio.php line 1075:
$output .= ! empty( $excerpt ) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".$excerpt."</div>" : '';
replace it with:
$output .= ! empty( $excerpt ) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".do_shortcode($excerpt)."</div>" : '';
Best regards,
NikkoJanuary 13, 2021 at 4:05 pm #1272199That worked! Thank you! Also, just wanted to note for anyone else, when I updated the portfolio.php in the child theme, it still didn’t work. But when I updated in the main theme folders, it worked perfectly.
January 13, 2021 at 4:08 pm #1272200Hi teamvelocitymarketing,
Is it in this directory: Child Theme > shortcodes > portfolio > portfolio.php?
Best regards,
NikkoJanuary 13, 2021 at 4:11 pm #1272202The file path is enfold-child > config-templatebuilder > avia-shortcodes > portfolio > portfolio.php
I just duplicated the same file path as in the main theme folders.
January 13, 2021 at 5:12 pm #1272221Hi teamvelocitymarketing,
Please follow the instructions in our documentation: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
Then the file path should be enfold-child > shortcodes > portfolio > portfolio.phpBest regards,
NikkoJanuary 13, 2021 at 5:18 pm #1272223Ah ha! Thank you so much!
January 13, 2021 at 5:29 pm #1272227Hi teamvelocitymarketing,
We’re glad that we could help :)
Thanks for using Enfold and have a great day!Best regards,
NikkoFebruary 23, 2022 at 4:55 pm #1342021Nicco
I want to also add shortcodes to my excerpt but don’t see the code. I see this (below) in avia-shortcodes > portfolio > portfolio.php but not from your reply in #1272058 I am using enfold 4.8.2
Many thanks
if( ! empty( $excerpt ) )
{
$markup = avia_markup_helper( array( ‘context’ => ‘entry_content’, ‘echo’ => false, ‘id’ => $the_id, ‘custom_markup’ => $custom_markup ) );$output .= ‘<div class=”entry-content-wrapper”>’;
$output .= “<div class=’grid-entry-excerpt entry-content’ {$markup}>{$excerpt}</div>”;
$output .= ‘</div>’;February 25, 2022 at 1:52 am #1342203Hi,
For version 4.9 in avia-shortcodes > portfolio > portfolio.php find this in line 1128:
$output .= ! empty( $excerpt ) ? "<div class='grid-entry-excerpt entry-content' " . avia_markup_helper( array( 'context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup ) ) . ">{$excerpt}</div>" : '';
change to this:
$output .= ! empty( $excerpt ) ? "<div class='grid-entry-excerpt entry-content' " . avia_markup_helper( array( 'context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup ) ) . ">".do_shortcode($excerpt)."</div>" : '';
Best regards,
MikeMay 9, 2022 at 9:30 am #1351015Is there an update to this, I’ve just tried with the current version of Enfold an I am still unable to add shortcodes to the portfolio excerpt? Thanks
- This reply was modified 2 years, 6 months ago by finchkelsey.
May 10, 2022 at 10:30 am #1351138Hi finchkelsey,
I just tested this out on the latest version (4.9.2.3) and it still works.
Can you tell us if you have the following things on your child theme:
1. avia_include_shortcode_template function is added in your functions.php file, if not then grab the code here: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
2. Make sure that portfolio.php is located under this folder directory: enfold-child > shortcodes > portfolio
3. Make sure that portfolio.php in (line 1128) code is using this code:$output .= ! empty( $excerpt ) ? "<div class='grid-entry-excerpt entry-content' " . avia_markup_helper( array( 'context' => 'entry_content', 'echo' => false, 'id' => $the_id, 'custom_markup' => $custom_markup ) ) . ">".do_shortcode($excerpt)."</div>" : '';
If all of the things listed are already done and it’s still not working and the shortcode is verified to be working, then please create a new thread and give us temporary admin login credentials and put it in private content (since it is only visible to the moderators and thread creator) so we can check further on the issue.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.