Remove images from get_the_excerpt
I’m using a custom function to create a shortcode that displays the latest blog post on the home page of a template. But I’m trying to NOT have it display any images.
I’m using a custom function to create a shortcode that displays the latest blog post on the home page of a template. But I’m trying to NOT have it display any images.
I’m using the_excerpt();
on an archive page; my problem: manual excerpts display, but automatic excerpts do not (just for clarification: an automatic excerpt meaning a snippet generated from the_content();
when a manual excerpt isn’t present)
By default in the admin the Excerpt is hidden. See below.
I’m not sure how to word my question and I have been searching all day, to no avail.
I have made a page template which shows linked subpages using this bit of code:
Auto-generated excerpts just take the first x characters from the post content and cut that off at a certain point.
The excerpt panel in the Gutenberg block editor has the label text “Write an excerpt (optional)”
For most of the posts on my WordPress site, I leave the manual excerpt box empty & let WordPress generate the excerpt based on the content of my post. Until now, this has been working fine — I get the first 80 words of the post as I would expect based on my settings.
I’m facing a problem I can’t solve.
I’d like to get the excerpt, title and link of the last post containing a particular meta-box button status.
Let’s consider this code: