How to change h2 to h1 in single.php?
-
Hello guys,
I’m trying to change the h2 tags (the tag which is used to wrap a single post title, single.php file) to h1 tag.
What I have done is edited single.php and changed :-
<h2><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
to
<h1 id="single_header"><a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h1>
In style.css, I changed :-
h2 { font-size: 1.6em; }
to
h2,h1#single_header { font-size: 1.6em; }
But the things does’t seem the work. The title comes pretty big and its color is white so It is not visible. I have done some experiment and I’m able to change the white color to black by modifying this in style.css but It chages it everwhere (as it is supposed to do)
h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description { text-decoration: none; color: white; }
If I change the color in black to above post It changes the color but It happens everywhere and I understand It will happen.
Can somebody help me changing ONLY the title of single post in h1 tags and leave everything else same?
Breif direction is ok, I’ll understand them.
- The topic ‘How to change h2 to h1 in single.php?’ is closed to new replies.