• Have been working on this for awhile and can’t seem to find the right tutorial or css script to simply hide the title “shop” from my homepage of divesummit.com where I am already using a child theme.

    I am not sure if I need to change the content-page.php or the page.php or exactly how to create a separate template to basically have the title not displayed on the homepage.

    Seems like a simple enough thing to achieve but has not been easy.

    Any help would be appreciated!

Viewing 15 replies - 1 through 15 (of 15 total)
  • You need a custom version of content-page.php in your child theme.

    Thread Starter jmarc4312

    (@jmarc4312)

    But I am confused because content-page.php does not handle all the functions for the way the page is displayed nor does it even contain the title tag info that is displayed on page.php

    Yes it does.

    Thread Starter jmarc4312

    (@jmarc4312)

    Well I am not sure exactly what I have to do because I’ve read conflicting accounts so I am hoping someone can help walk be through it.

    content-page.php:

    <?php
    /**
     * The template used for displaying page content in page.php
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	</header><!-- .entry-header -->
    
    	<div class="entry-content">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->
    	<footer class="entry-meta">
    		<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    	</footer><!-- .entry-meta -->
    </article><!-- #post-<?php the_ID(); ?> -->

    Thread Starter jmarc4312

    (@jmarc4312)

    Ok esmi but sorry that doesn’t solve my problem..

    Which part are you having the problem with?

    <header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	</header><!-- .entry-header -->

    is the code for the page title/heading.

    try to add this to your custom styles:

    .home .page-title { display: none; }

    ps:

    the confusion might be because for some reason the css class of that title got changed in your site from .entry-title to .page-title – therefore you probably could not work with the default suggestions widely posted in the forum.

    pps:
    forget the ps, I just see, the front page is not a static page but some ‘woo-commerce page’.

    in any case, the CSS suggestion should work.

    Thread Starter jmarc4312

    (@jmarc4312)

    I would suggest reading the initial question asked by me where I state I want to “simply hide the title of the static page “shop” from my homepage of divesummit.com”

    Thread Starter jmarc4312

    (@jmarc4312)

    alchymyth, that will hide the title of all pages. This in effect would oppose my goal of only hiding the title page of my static homepage

    I would suggest reading the initial question asked by me where I state I want to “simply hide the title of the static page “shop” from my homepage of divesummit.com”

    you can fairly assume that at least those members with ‘moderator’ status do read the question.

    alchymyth, that will hide the title of all pages.

    in that case, something is wrong with the body_class() functions in your site.

    .home in the suggested CSS should make this specific to the home page.

    Thread Starter jmarc4312

    (@jmarc4312)

    where do I add “.home .page-title { display: none; }” in the style.css?

    where do I add “.home .page-title { display: none; }” in the style.css?

    I just see you have figured it out yourself – the custom CSS plugin is indeed the best place.

    Hi there,

    I’m having the same problem but with the twenty fourteen theme. I’ve inserted this CSS using the simple custom css plugin with no results.

    I’ve been trying to remove the page title and the space in which it’s contained from all pages on my site. https://www.eyethu.co.za for days now…

    Any suggestions would be appreciated. Thanks.

    ist4000

    (@ist4000)

    I added both

    .home .page-title { display: none; }
    .home .entry-title { display: none; }

    to the style.css of my 20-14 child theme and it work probably mostly due to the second line

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Removing Title on static page when used as homepage with Twenty Eleven theme’ is closed to new replies.