• Hey, so on my main blog page, I’d like to have the title for the posts come before the featured image. See this for what I’m trying to express: image

    I’m talkin about the page that displays the list of posts, not the single post page.

    So it would seem that this page of post previews are created by page.php, which calls the_content(); I would assume that the_content() is what decides the format of this, i.e. that it goes image, title, author, text, etc.

    So is there a way to change this without editing get_the_content() in the post_template.php file in the actual wordpress setup? Because it seems like a mighty simple change to require diving into that.

    Any advice here would be fantastic. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Unfortunately, it’s not that simple. the_content() displays the text of the post and any attached images in the body of the text. The featured image is treated separately from the content. Also, the page of post previews is controlled by archive.php or category.php or index.php. page.php controls how static pages are displayed.

    What theme are you using?

    Thread Starter JackjackIsLife

    (@jackjackislife)

    I’m using Divi. Well, a child theme of Divi. Should all themes have archive.php or category.php? Divi seems to be lacking those.

    So the_content() doesn’t change how these post previews are displayed, it just controls whatever the actual body of the post is?

    Check out the template hierarchy to get an idea of which files WordPress uses to generate your website. If your theme doesn’t include either archive.php or category.php, then WP falls back to using index.php to generate your posts archives.

    As for your second question, that’s correct. the_content() is just a function that gets the post content and displays it on the page. It’s up to the theme to decide how to display it (layout, fonts, colors, etc.). Unfortunately, as you are using a commercial theme, you should contact Elegant Themes for further help on this matter. After all, that’s part of what you paid for.

    Thread Starter JackjackIsLife

    (@jackjackislife)

    Ohhhh, sweet, the secret is index.php. Found the problem. Thanks, man. You are a hero to me and my people.

    To any future wonderers, Divi is bonkers and is a creature of its own. It extends into the realms of insanity far beyond normal wordpress. If you’re using the blog module on a page that’s not the designated page for posts, it will use page.php to create the page and I dunno, magically make your blog. I had to set this page to be the posts page in Settings -> Reading, and now it will make it with index.php, which you can edit. So that’s nice.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Move the featured image below title of posts?’ is closed to new replies.