How to move the post title below content wordpress

To move the post title and meta information to under the content in a WordPress single post

2024-11-11 04:48:33 - zdgtl

To move the post title and meta information to under the content in a WordPress single post, you will typically need to modify your theme's template files. This can usually be done by editing the single.php file or a similar template file that your theme uses for single posts. Here’s how you can do it:


Step 1: Backup Your Theme

Before making any changes, it’s crucial to back up your theme files. If you're using a child theme, ensure you work within that to avoid losing changes when the parent theme updates.


Step 2: Access Your Theme Files

  1. Via WordPress Dashboard:
  1. Via FTP or File Manager:

Step 3: Modify the Template

  1. Locate the Title and Meta Information: In the single.php file, look for the code that displays the post title and meta information. It usually looks something like this:
php

<h1><?php the_title(); ?></h1>
<div class="post-meta">
    <?php the_date(); ?> | <?php the_author(); ?>
</div>

Cut and Paste: Move this code to the position under the content. Look for the content display code, which typically looks like this:

php

<div class="post-content">
    <?php the_content(); ?>
</div>

You can move the title and meta code below the content like this:

php

<div class="post-content">
    <?php the_content(); ?>
</div>

<h1><?php the_title(); ?></h1>
<div class="post-meta">
    <?php the_date(); ?> | <?php the_author(); ?>
</div>

Step 4: Save Changes

After making the changes, save the file. If you are using the WordPress Theme Editor, click the "Update File" button.


Step 5: Check Your Site

Visit a single post on your site to ensure that the title and meta information now appear below the content as intended.


Additional Notes

Using a Page Builder or Custom Code

If your theme supports a page builder or custom hooks, you might be able to move the title and meta without directly editing code. Check your theme's documentation for options.

If you have any specific questions or run into issues, feel free to ask!

More Posts