• Resolved portermonkey

    (@portermonkey)


    I have removed all my entry titles on each page. But when I run a check for the use of tags (<title>, <h1>, <h2> etc) the entry title which i am not displaying gets the h1 tag. I would like to remove this.
    How is the h1 designated? is it by the font size given in the css?
    thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • How is the h1 designated? is it by the font size given in the css?

    No, heading tags like <h1> and <h2> are in the HTML contained in your theme files – index.php, single.php, loop.php, etc.

    I’m not clear exactly what you’re trying to remove where. Can you give a specific URL with a specific example?

    p.s. this is unrelated but I strongly recommend not underlining text in your site that is not clickable. It confuses people since we are used to thinking of underlined text as links.

    Thread Starter portermonkey

    (@portermonkey)

    check out my “testimonials” page for example. I removed the .entry-title (by not displaying it) for the page. but when i check the tags on that page the entry title is an h1 tag, so my h1 tag for that page is basically hidden text.

    OK, now I understand – thanks for clarifying.

    You need to go into page.php in your theme folder and remove the line that references the_title() – it may look something like this:

    <?php the_title('<h1 class="entry-title">', '</h1>'); ?>

    If you copy your page.php code into a Pastebin – https://pastebin.com/ – I can more easily tell you what to remove.

    Thread Starter portermonkey

    (@portermonkey)

    there is nothing like that in my page.php.

    here is all of it (it is small so i post)

    <?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_Ten
     * @since Twenty Ten 1.0
     */
    
    get_header(); ?>
    
    		<div id="container">
    			<div id="content" role="main">
    
    			<?php
    			/* Run the loop to output the page.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-page.php and that will be used instead.
    			 */
    			get_template_part( 'loop', 'page' );
    			?>
    
    			</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    OK, then you should find it in loop.php but it gets more complicated because loop applies to both pages & posts, and I see you also have a blog.

    May I ask why you don’t want to display the page title? There might be a better solution.

    Thread Starter portermonkey

    (@portermonkey)

    I already am not displaying the page titles. And they are being given an h1 tag. I want to apply h1 tag elsewhere and i do not think it is good to use it more than once on a page. Nor can it be good to use it for hidden text

    Actually, my mistake – if you see a file called loop-page.php in your theme it should be there.

    Yes, in loop-page.php

    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php if ( is_front_page() ) { ?>
    <h2 class="entry-title"><?php the_title(); ?></h2>
    <?php } else { ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <?php } ?>

    Also in loop-single.php

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

    Thread Starter portermonkey

    (@portermonkey)

    thank you

    You are welcome, <h1> tags are very common in the theme, not only in loop-page.php and loop-single.php. Like zoonini said

    heading tags like <h1> and <h2> are in the HTML contained in your theme files – index.php, single.php, loop.php, etc.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘I rremoved "entry-titles" but they still get credit’ is closed to new replies.