How to Center a WordPress Post Title

One of the benefits of using WordPress to manage the content of your website is the fact that you can install any of thousands of themes that are available to change the website's appearance. However, the customization options do not end there; if you find a theme that isn't quite what you are looking for, you can use the built-in editor in the WordPress dashboard to fine-tune the theme to your liking. If you would like to center the title at the top of a post, you can do so by adding a small bit of HTML code to your website's theme.

Instructions

    • 1

      Open the "Appearance" section on the left side of the WordPress dashboard, and select the "Editor" option. This displays the editor for your WordPress theme. Make sure that the theme name displayed in the upper-right corner of the window is your current WordPress theme before continuing. If it is not, select the theme and click the "Select" button.

    • 2

      Click "Single Post" in the list of your theme's files on the right side of the page. The code for the file "single.php" appears in the editor in the center of the window.

    • 3

      Locate the code "<?php the_title(); ?>" Move the cursor to the space immediately before this code. If you do not see this code in the editor, your WordPress theme uses a separate file called a "loop" to display posts. Click the "loop-single.php" link on the right side of the page to edit that file instead.

    • 4

      Type the code "<div align="center">" without quotation marks in the space before "<?php the_title(); ?>," and move the cursor to the first space after "<?php the_title(); ?>."

    • 5

      Type the code "</div>" without quotation marks. The full block of code should now read "<div align="center"><?php the_title(); ?></div>."

    • 6

      Click the "Update File" button below the editor.

Tips & Warnings

  • Before using the WordPress theme editor, back the files of your WordPress theme up to your local hard drive. If you make an error when editing the theme, upload the original file back to your Web server to return the website to its original state.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured