Coderja 1 week ago
Coderja #wordpress

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

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:
  • Go to Appearance > Theme Editor.
  • Locate the single.php file or the appropriate template file for your posts.
  1. Via FTP or File Manager:
  • Connect to your website using FTP or a file manager provided by your hosting service.
  • Navigate to wp-content/themes/your-theme-name/ and find the single.php file or the relevant template file.

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

  • If your theme uses template parts or custom functions to display the title and meta, you might need to adjust those instead.
  • If you're not comfortable editing PHP files, consider using a child theme or a custom plugin to ensure your changes are preserved during theme updates.
  • Be cautious while editing theme files. A small mistake in PHP syntax can break your site. Always have a backup ready.

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!

TMDB Movie Scraper

TMDB Movie Scraper

defaultuser.png
Coderja
3 weeks ago
Domain WHois

Domain WHois

defaultuser.png
Coderja
3 weeks ago
Extract email addresses from a text file using notepad++

Extract email addresses from a text file using notepad++

defaultuser.png
Coderja
3 weeks ago
Domain WHOIS by Python3

Domain WHOIS by Python3

defaultuser.png
Coderja
3 weeks ago
PHP script SRT to VTT Converter

PHP script SRT to VTT Converter

defaultuser.png
Coderja
3 days ago