Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #852516

    Hey,
    I have added this link code to the excerpt here:
    http://www.newyorkhotellbokning.se/thelife-hotel/

    <span style=”text-decoration: underline; font-size: 14pt;”><span style=”font-family: abril; color: #ff0000; text-decoration: underline;”>➤ Läs mer…</span></span>

    but as you can see in the Masonry element here: http://www.newyorkhotellbokning.se/
    the font and color does not show

    What shall I do?

    Thanks
    Charlotte

    #852992

    Hey Charlotte,

    WordPress strips html tags from the excerpt by default, maybe this will help you out in changing that: https://premium.wpmudev.org/forums/topic/can-i-have-html-tags-in-excerpts

    Best regards,
    Rikard

    #853062

    Thanks Rikard.

    I added the code to the functions.php file but I can’t see any difference…

    #854122

    Hi,

    Thank you for the update. By default, the content are wrapped in a strip_tag function. Please add this filter in the functions.php file to use the original excerpt without stripping the tags.

    add_filter( 'avf_masonry_loop_prepare', 'avf_masonry_loop_prepare_mod_cat', 10, 2 );
    function avf_masonry_loop_prepare_mod_cat( $key, $entries )
    {
      foreach ($entries->posts as $arr => $entry) {
        $key['description'] = $entry->post_excerpt;
      }
    
      return $key;
    }

    Best regards,
    Ismael

    #854215

    Thanks but that does not work either
    functions

    #854241

    Hi,

    Please try to replace “description” with “content”. Did you apply the excerpt of the posts manually?

    Best regards,
    Ismael

    #854247

    Hi Ismael,

    Thanks for your reply.
    I tried to replace to content but I get the same error.

    Yes, I have apply it manually.

    Charlotte

    #854758

    Hi,

    There are no opening / closing php tags. Please add the opening and closing php tags.

    <?php
    
    // code here
    
    ?>
    

    Best regards,
    Ismael

    #854798

    Hi Ismael,

    Thanks but there is something wrong with the functions.php file. When I added your code I got this error and when I delete all code in the functions.php I get this now and can’t access the site

    Parse error: syntax error, unexpected ‘<‘ in /home/d8737/newyorkhotellbokning.se/wp-content/themes/enfold-child/functions.php on line 16

    Can you login ti the servers and see what happen, thanks
    Charlotte

    #855224

    Hi,

    Please revert the functions.php file back to default. Do you have a site backup?

    UPDATE: I can’t connect to the file server.

    Connecting to 62.20.1.160:21…
    Status: Connection established, waiting for welcome message…
    Response: 220 FTP service
    Command: AUTH TLS
    Error: Connection timed out after 20 seconds of inactivity
    Error: Could not connect to server

    Best regards,
    Ismael

    #855280

    Hi Ismael,

    Thanks for your reply.
    No I don’t have a back up … so what shall I do then?

    What default cod can I add?

    /Charlotte

    #855653

    Hi,

    Get a fresh copy of the child theme functions.php file then override the current one.

    Best regards,
    Ismael

    #855724

    Ok, thanks. I have done that now so I am good.

    #855868

    Hi charlotteraboff,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.