In your child theme, remove these lines in content-page.php
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
I am afraid my child theme is broken. First, my twenty-eleven child folder doesn’t have any page.php. So I went to twentyeleven folder and copied the existing twentyeleven page.php file to twentyeleven-child. this is what it has:
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other ‘pages’ on your WordPress site will use a
* different template.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<div id=”primary”>
<div id=”content” role=”main”>
<?php the_post(); ?>
<?php get_template_part( ‘content’, ‘page’ ); ?>
<?php comments_template( ”, true ); ?>
</div><!– #content –>
</div><!– #primary –>
<?php get_footer(); ?>
I am afraid my child theme is somthing wrong, isn’t it?
Also, I have been trying to create custom page template, that will include all my fonts and colors. I was unable to do so. Could you please guide me through?
Thank you so very much!
It might help to first read a few tutorials on how child themes work, and how custom templates work. Here are a couple I have bookmarked:
http://www.rvoodoo.com/projects/wordpress/wordpress-tip-stop-editing-twentyten-theme-use-a-child-theme/
http://voodoopress.com/2011/07/customizing-twentyeleven-lets-start-with-width-and-smaller-header/
http://www.wordpressmax.com/customize-wordpress/custom-page
It may also help to understand how get_template_part() function works. In your page.php file – this line:
<?php get_template_part( 'content', 'page' ); ?>
…is actually calling in an included file called content-page.php
It’s that page I was mentioning earlier where you’ll need to remove the page headings you don’t want. More about get_template_part():
http://codex.wordpress.org/Function_Reference/get_template_part
All the above information is correct – but I would advise against remove the code described… because it will be very bad for your SEO.
You always want the page title to be an H1 tag.
Good luck.
tom
@tom – Ah, well SEO is another issue entirely. I usually don’t give SEO adivce unless specifically asked by the poster as it opens entire cans of worms that the OP usually didn’t expect to open. 😉 But you’re right, of course – h1 tags are good for SEO.
Thank you both very very much!
The way I have figured was to create a .php files inside my twentyeleven-child folder for each page. So I have created different templates, where I don’t have any titles that I don’t need. Under page attributes, I go to “templates”, and ask to use specific template for specific page. I actually write the content using HTML inside every .php file.
May be this is not the best way, but it worked for me!
Hola folks,
I just came across this info — thank you so much, this helped me with a template I was working on.
Patrick