The first step you’ll want to do is set up your child theme.
Making a child theme means your changes won’t be overwritten when you update the theme. If you’re new to child themes, you can explore these guides:
https://codex.www.ads-software.com/Child_Themes
https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/
Next, take all your earlier custom CSS and move it into your child theme’s style.css file, so you won’t have CSS in two places.
To hide the title on the featured image on pages (in addition to posts), you’ll want to modify what I gave you earlier:
.single #single-wrap {
visibility: hidden
}
Changing it to this:
.single #single-wrap, .page #single-wrap {
visibility: hidden
}
Next, make a copy of the file content-single.php
and place it in your child theme.
You’ll want to remove or comment out these lines:
13 – <?php if ( empty( $featuredimage )) : ?>
15 – <?php endif; ?>
57 – <?php if ( empty( $featuredimage ) ) : ?>
59 – <?php endif; ?>
To comment them out, put //
just after <?php
on each line. That deactivates that part of the code without needing to remove it.
Removing these two conditions displays both the post title and date on single posts whether or not the post has a featured image.
On pages, the post title is already output below the featured image on pages, so you won’t need to anything extra there.
Let me know it goes or if you have any questions!
-
This reply was modified 7 years, 7 months ago by Kathryn Presner. Reason: fixed typo