Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1478278

    Situation: I’m using a child theme. I’m using the classic editor for most pages. I have thousands of pages so it needs to be automatic.

    It seems very simple.
    I want to have the title of the page moved from the header area to above the main content, so next to the sidebar, and I want to style it in a certain way (like on the screenshot)

    Screenshot

    • This topic was modified 1 month, 1 week ago by sudhafen. Reason: Added working screenshot
    • This topic was modified 1 month, 1 week ago by sudhafen.
    #1478313

    Hey sudhafen,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function custom_script() { ?>
      <script>
      (function($){
       $('.page .main-title.entry-title ').detach().insertBefore('.template-page.content .post-entry');
      })(jQuery);
      </script>
      <?php
    }
    add_action( 'wp_footer', 'custom_script', 99 );

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    Screen Shot 2025 03 01 at 6.55.25 AM

    Best regards,
    Mike

    #1478811

    Fantastic. It’s working. Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Move title from header to main content’ is closed to new replies.