Tag Info

New answers tagged

2

Add another preg_replace. Something like: $text = preg_replace('/<a href=\"(.*?)\">(.*?)<\/a>/', "", $text);


0

If it helps, this is what I'm using: You can edit it the way you need it. /** * Sets the post excerpt length to number of words, except for some pages. * * @param int $length The current excerpt length. * @return int The new excerpt length in words. --------------------------------------------------------------------- */ function ...


0

It was ofc me who misunderstood how it all works. The WP_Post instance will not generate the excerpt for you, witch makes sense, less overhead when not using it. I had to loop through it, sense I don't have access to this logic in the view because of timber. $context['blog_posts'] = get_posts( [ 'suppress_filters' => 0, 'numberposts' => ...


0

You can get the diff between your 2 contents and then add to the first one a given number of words like this (not sure, but give it a try ;) ) : global $more; $more = 0; $content_cut = get_the_content( '' ); $more = 1; $content_full = get_the_content(); // Get the diff $content_diff = str_replace( $content_cut, '', $content_full ); // Get 10 first words ...


0

The "PressRoom by Newswire" (a free plugin that I authored) creates a press room page on the user's website. It will also helps the user publish and distribute press releases. PressRoom by Newswire allows the user to create "pin style" content blocks for the new press room page. Control over the style of these blocks is provided through an interface that ...



Top 50 recent answers are included