Tagged: 

Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #731190

    Hi all,

    For a travel agency site I have created a CPT “Tours” and am displaying tour lists with the Masonry component. To make the excerpt more striking for visitors, I am using html markup in excerpts. See here : https://ethiopiatropicaltours.com/ethiopia-tours-history-culture/

    I have just tried to upgrade to Enfold 3.8.4 and bad surprise…. The html markup has disappeared.
    See here (a copy of the live site, with just the theme upgraded) : https://test.ethiopiatropicaltours.com/ethiopia-tours-history-culture/

    For my customer it is not an option to lose this markup.

    Please help, thanks !
    Bérangère

    #732223

    Hey Christophe,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • The URL to the login screen.
    • A valid username (with full administration capabilities).
    • As well as a password for that username.
    • permission to deactivate plugins if necessary.

    Best regards,
    Andy

    #732263

    Here you are.
    It is a test site, feel free to perform any actions needed.

    FYI, I have tested on the parent theme, with all plugins disabled, unsing standard posts and not CPTs. Same issue.

    Thanks !

    • This reply was modified 7 years, 6 months ago by caudebert.
    #733912

    Hi,

    Thank you for the info.

    Please try to modify the config-templatebuilder > avia-shortcodes > av-helper-masonry.php file, look for this code around line 443:

    $this->loop[$key]['content'] 	= avia_backend_truncate($entry->post_content, apply_filters( 'avf_masonry_excerpt_length' , 60) , apply_filters( 'avf_masonry_excerpt_delimiter' , " "), "…", true, '');
    

    .. replace it with:

    $this->loop[$key]['content'] 	= $entry->post_content;
    

    Let us know if this fixes the issue. If not, please post the FTP details here so that we can test it further.

    Best regards,
    Ismael

    #734358

    Hello Ismael,
    I have opened “config-templatebuilder > avia-shortcodes > av-helper-masonry.php”, but dindn’t find the piece of code you are mentioning.
    I provide you an FTP access to the test environment so you can have a look, test and change whatever you need.
    Thanks
    Bérangère

    #734529

    Hi!

    Thank you for the info.

    We modified line 436 instead.

    $this->loop[$key]['content']		= strip_tags( $entry->post_excerpt );
    

    to..

    $this->loop[$key]['content']		= $entry->post_excerpt;
    

    The html tags are stripped because it causes a lot of markup issues on some installations, especially when they’re not careful with the tags.

    Best regards,
    Ismael

    #744869

    Hello,

    This workaround was working when you implemented it 3 weeks ago, but not any more. I have just updated WP and the theme to the latest versions in my test environment (where you made the change in the child theme) and html markup doesn’t show any more.

    I have copied the config-templatebuilder folder to the child theme and re-applied the change at line 436 in av-helper-masonry.php, but it still doesn’t work.

    More generally, having a custom version of the masonry shortcode is not a sustainable solution – it requires to test and potentially apply changes at each new version, even with a child theme.

    This site is totally dependant on html markup in masonry excerpts, which are used in dozens of pages. I have recommended Enfold to my customer because all its features made it possible to build the site without any changes in the theme’s templates, thus limiting maintenance effort. I have trained my customer to update the site on her own, I just can’t go back to her and tell her that it might not work well due to a custom template.

    I am extremely annoyed and hope you will find a solution to restore the previous functionality in the standard version of the theme.

    Thanks

    Bérangère

    #747320

    Hey!

    I’m sorry but you cannot override a shortcode template in a child theme. You need to do this modification in the parent theme folder.

    Best regards,
    Ismael

    #747401

    Hello Ismael,

    I a extremely frustrated and disappointed by this answer.

    Root cause of my issue : The Enfold team’s decision to remove a functionality : hmtl tags in Masonry excerpts.

    Unfortunately for me, I have just built for a customer a website which heavily relies on this fonctionality. Have a look at https://ethiopiatropicaltours.com and you’ll understand.

    Changing the shortcode in the parent theme is against all recommended WordPress practises and means that the customer will never be able to update the site on her own.

    As I mentioned in my previous message, this places me in a very difficult situation with my customer. I can’t leave her alone with that issue, and cannot also not perform additional maintenance or rebuild work for free.

    I hope you will be able to provide a workable and sustainable solution.

    Bérangère

    #747831

    Hey!

    Have you tried the following method?

    // http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Yes, I understand the issue fully and as frustrating as this may sound, the suggestion that we provided previously is the only solution to the problem. A lot of issues have been reported before regarding the masonry element and more often than not, it’s because of the html tags which is why it is disabled.

    Regards,
    Ismael

    #771093

    Hi guys,

    Reply #734529 by Ismael worked for me!

    Thanks very much for providing this edit.

    #771539

    Hi,

    Great, glad we could help and thanks for the feedback :-)

    Best regards,
    Rikard

    #773791

    Hello,
    first I try to change line 443, than I changed 436 as described. But both solution didn’t work for me with 4.0.5 :-(

    I want to set all photos and text in the same size. So I need to insert breaks to create 2 text line in every excerp. Do you have another workaround or a solution, now?

    Thanks for help
    Guido

    #775754

    Hi!

    Please revert the modifications back to default then follow this post.

    // https://kriesi.at/support/topic/html-markup-in-excerpt-has-been-lost/#post-734529

    Cheers!
    Ismael

    #776059

    Hi Ismael,
    I try this again and now it works. Thanks.

    Guido

    #776440

    Hi Guido,

    Great, glad you got it working.

    Best regards,
    Rikard

    #780085

    Hello Kriesi team,

    I have applied the method suggested by Ismael on Feb 16 and it worked. I have been able to apply the codes changes via a child theme.

    Unfortunately, I have issues again since I upgraded to Enfold 4.0. As I noticed that “av-helper-masonry.php” has been changed, I reapplied the code changes in my child theme based on the new version.

    And now, I have double line breaks, as visible here : https://test.ethiopiatropicaltours.com/ethiopia-tours-history-culture/

    It is not an option to remain with the previous version of “av-helper-masonry.php” because sooner of later I will have issues….

    Please help,
    Bérangère

    #780310

    Hey!

    Please remove the line break tags because there’s a margin on top and bottom of the paragraph tags by default.

    p {
        margin: 0.85em 0;
    }

    Regards,
    Ismael

    #780444

    Hi Ismael,

    I cannot remove these line breaks because are not in the HTML code of my excerpts. They are created by the new Enfold version. I have switched back to the former theme version and no <br> shows in the code.

    For example, here is the html code of the tour “Historic North Road”
    <p><u>Easy</u> – 10 days, 9 nights</p>
    <p>A classical tour of North Ethiopia. Visit the fabulous sites of Axum, Gondar and Lalibela. Enjoy sceneries, nature, endemic animals and the charming Ethiopian people.</p>

    and see the outcome here at the bottom of the page : https://test.ethiopiatropicaltours.com/

    I think that the code change that you have provided above needs to be adapted for the new release.

    Cheers
    Bérangère

    • This reply was modified 7 years, 3 months ago by caudebert. Reason: fix typos
    #780985

    Hi!

    Remove the spaces between the paragraph tags. Look at the excerpt box of the following post for example. ( see private field)

    Regards,
    Ismael

    #1173619

    I have same problem. Can’t add HTML tags to excerpt in masonry.
    Is Isamel tip still valid for 4.6.3.1 version?

    #1175359

    Hi,


    @MusicalFactory
    : Yes, you have to modify the enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php file as suggested previously.

    // https://kriesi.at/support/topic/html-markup-in-excerpt-has-been-lost/#post-734529

    Best regards,
    Ismael

    #1175393

    For information, I have sorted it out with the above solution but need to check the php file for each new release, whicn is really a hassle.

    • This reply was modified 4 years, 6 months ago by caudebert.
    #1175394

    Hey,

    You can add following code to bottom of Functions.php file in Appearance > Editor to use HTML in Masonry excerpt
    apply_filters( 'avf_masonry_slideshow_excerpt', strip_tags( $entry->post_excerpt ), $entry, $this->entries );

    Best regards,
    Yigit

    #1175434

    Hey Yigit,
    I have entered this code in functions.php of my child theme and it triggers a critical error.

    Berangere

    #1175441

    Hi,

    Sorry about that, that was a misunderstanding on my end.

    Could you please replace enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php file with this one – https://pastebin.com/Qb1FGEmu via FTP or in Appearance > Editor if WP dashboard is loading?

    If you would like us to update the file for you, please post FTP or WP admin logins here privately :)

    Best regards,
    Yigit

    #1175450

    Hi Yigit,
    I have already implemented this. Via a child theme and not in the parent theme.
    It works but requires to check the file for each now release.
    A robust solution, with a filter in the child theme would be much appreciated.

    Best regards
    Bérangère

    #1175453

    Hi,

    We are going to add a filter to use in a child theme in upcoming version :)

    Best regards,
    Yigit

    #1175470

    Great news. I will give you a feedback here.
    Bérangère

    #1175472

    Hi,

    Thanks! I am marking this thread as resolved for now. If you have any other questions or issues, please let us know and enjoy your weekend :)

    Best regards,
    Yigit

Viewing 30 posts - 1 through 30 (of 30 total)
  • The topic ‘HTML markup in excerpt has been lost’ is closed to new replies.