• Resolved dirkprop

    (@dirkprop)


    The links in the recent posts dont work on the front page. The link is not clickable. When the full post is opened by the read-more button, the links work properly.

    The links must work in the summary on the front page as well. How can I fix that?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • threadi

    (@threadi)

    This happens because WordPress removes all HTML code from excerpts by default. Not only links, but also formatting.

    You can change this behavior. Here is a detailed article on how to do this with individual programming: https://wordpress.stackexchange.com/questions/141125/allow-html-in-excerpt

    Plugins may also help with this: https://www.ads-software.com/plugins/tags/excerpt/

    Thread Starter dirkprop

    (@dirkprop)

    Thanks, your answer was very helpfull and gave good direction.

    However i had the idea that the proposed article was outdated.

    I have deleted the following line in formatting.php and that worked:

    $text = strip_tags( $text );

    • This reply was modified 3 months ago by dirkprop.

    I have deleted the following line in formatting.php and that worked:

    You don’t want to mess with WordPress’ core files at all. Even if you’re careful not to introduce any errors,

    1) Your theme or a plugin may be using the core function you edited, leading to errors (now or in the future)

    2) Any WordPress update will override your changes, and then you’re back to where you began.

    Thread Starter dirkprop

    (@dirkprop)

    Thanks for the warning, George, I ‘ll bear that in mind.

    But for the moment I keep this solution.

    It is dissapointing that the WordPress core doesnt support this rather basic functionality. There are several plugins that give addtional functionality for the formatting of excerpt but they are old and not tested for recent version of WordPress.

    threadi

    (@threadi)

    As already written, your adaptation is not a good idea at all. I would rather recommend working with hooks as described in the article above.

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