Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6278

    Hello,

    I’m trying to figure out a way to remove the post title of some (if not all) of my fullwidth pages. I’d rather include any h1 titles in the editor for each page on my own.

    Ideally, I’d like to have a selectable page template called something like Fullwidth Page w/o title. Or I guess removing the title from every fullwidth would work for me as well, as I can manually add the title in the editor.

    I know there are workarounds such as creating a dynamic template for each page where I select to not show the title, but a more straightforward way to solve this issue would be appreciated. Any ideas?

    TIA

    Edit: I forgot to mention that any css hacks to hide the h1 is not what I’m looking for, as I want the outputed html code to be SEO friendly.

    #53583

    Hey,

    1) Open up template-fullwidth.php and replace:

    get_template_part( 'includes/loop', 'page' );

    with:

    get_template_part( 'includes/loop', 'pagefullwidth' );

    2) Make a copy of includes/loop-page.php and call it includes/loop-pagefullwidth.php.

    3) In includes/loop-pagefullwidth.php remove:

    <h1 class='post-title'>
    <?php the_title(); ?>
    </h1>

    #53584

    Worked great, even by doing the changes in a child theme :) Thanks a bunch!

    #53585

    Glad that I could help you :)

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Remove auto h1 post title from fullwidth pages’ is closed to new replies.