I try to deal with the h1/h2/h3, heading and subheadings, because they are missing from my site. I have read many articles about the importance and the correct placement but a coding problem is drive me crazy!
Example: On page.php, I want to change the atribute <h1>, from the title to content and I wrote:
<h1><?php the_content(); ?></h1>
When I looked to my page I saw that I increase the font not the Google accesibility 🙂 Screenshot: http://imageshack.us/a/img202/4223/31016851.jpg The original page is this.
What is wrong with this tags? When I write “<h1></h1>” WordPress understand to increase the font not to deal with Google?
Second question – This is the homepage. I try to make some changes in index.php in order to place the title of the blog under h1 tags, and the meta description under the h2 tags. But when I look on Source I see no changes or some errors. Where to place this tags in order to have h1 for blog title and h2 for meta description?
Here is the code for index.php.
I found on my css this lines for h1/h2 tags:
Maybe this is the key, decrease the font-size, from 23px to 11px?
wrapping ‘the_content()’ into h tags is not the right approach to increase the font size of the content, or to introduce h1, h2, or h3 tags;
try to use a browser inspection tool such as Firebug to find out what styles are responsible for formatting the size of the font; then edit style.css accordingly.
as helping with general formatting is not within the main scope of this forum, you might want to try asking at a css forum http://csscreator.com/forum
But for homepage, where to place exactly the h1 tags? I don’t find the code for blog title on index.php I try to look on header.php to place the h1/h2 tags under the title and meta description but I don’t find the correct lines.
Looks like you’ve create a lot of errors on your site:
So you’ll need to fix those before doing anything else.
Have you tried posting on the theme developer’s forums?
The developer forum seems to be spamed some times, and with no official support for my theme. But I will try again…
Next job will be the errors correction.
And my next dumb question – how to access the html lines from source code, in order to correct the W3 errors? All my files are css and php!
You have to track down where the errors are — if you edited any php files — that’s probably where they are. If they are really messed up, it may be easier for you to just download a new copy of that file and replace it using FTP. For future reference, you should never edit theme files — use a Child Theme for that. There may also be errors in your content. When you look at the validator results — it tells you where the error is and then you have to sleuth it out.
As for the CSS, you should also validate the CSS code — it’s a different validator here:
For WordPress, I found this type of plugins – http://wordpress.org/extend/plugins/tidy-up/ Can help the newbies?
Ok, I was able to edit the size of my h1/h2/h3 tags into the css and put some heading and subheadings tags on single posts and pages. But the homepage seems to be very tricky!
So, I want to put the title of my blog under h1 tags and the meta desription under the h2 tags. I mean this section – http://img831.imageshack.us/img831/2594/taglj.jpg Editing the header.php or index.php (title section) nothing happens, probably because my site is managed by Yoast SEO plugin.
Where to place de h1 tags in order to have the title of my blog tagged correctly? I search for the exact location and code.
- The topic ‘Crazy Increase of font after adding the h1 code’ is closed to new replies.