WordPress.org

Support

Support » How-To and Troubleshooting » remove link attribute from H2 entry title- TwentyTen theme

remove link attribute from H2 entry title- TwentyTen theme

  • I have a child theme based off of the TwentyTen theme. I want to remove the entry title link and just make it a static h2. I know I need to remove the <a href="">h2</a> in one of the files, but wasn’t sure which one or where. This is the entry title that appears above a post.

    [Please post code or markup snippets between backticks or use the code button.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    @alchymyth

    Forum Moderator

    have a look into content.php which generates the output for the main index page and the archives:

    <?php if ( is_sticky() ) : ?>
    				<hgroup>
    					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    					<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
    				</hgroup>
    			<?php else : ?>
    			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    			<?php endif; ?>

    considering this is the link that links to the single posts, how are you planning to reach the single posts after the link is removed?

    thanks. There will only be one post. I may leave it in, but wanted to know how to remove if needed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘remove link attribute from H2 entry title- TwentyTen theme’ is closed to new replies.
Skip to toolbar