Hello, I have been trying to figure this out for days and I can’t.
I would like to add a custom field when editing a post similar to how the title and content have separate fields to add custom content inside of a div above the title and outside of the_content.
This is so I can have custom content depending on the post such as an image or YouTube video, and style it like I have for the featured posts on my homepage: http://stevenknight.info/blog.
I have been able to do it on the homepage because it relies on the post thumbnail output, something I can’t do for single posts because not all will have images (but they all will have a featured image on the homepage) I want above the title, sometimes it will be text or a YouTube video for example.
Essentially I want a single post to be “split” up like so:
– Custom div content
Crucially, only the last 10 or so posts will need the custom div as it’s a new thing I’m doing, older posts will ignore the content div because it will be empty (or I can use some PHP to only display it on certain post IDs and above).
I have been trying for *days* and cannot create a field to publish custom content outside of the the_content tag.
Any help would be wonderful,
- The topic ‘Custom content above title outside the_content’ is closed to new replies.