Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Remove lead post from rich text body if featured image is being used #17

Closed
wants to merge 3 commits into from

Conversation

bdivver
Copy link

@bdivver bdivver commented Apr 13, 2022

No need for duplicate images

@jwcounts
Copy link

Finally got some time to look at this, and I think I've found a different way to remove the image. Instead of running a regex on the computed layout, I modified get_body_with_layout() to ignore images that are tagged as 'primary' when the dp_npr_query_use_featured option is set to 'true'.

I'm including your updates in the settings.php file, though I did add a check to disable the "theme uses featured images" checkbox if "use layout" is not enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants