Technology Networking & Internet

How to Center a WordPress Post Title

    • 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.



Leave a reply