Different behavior of the title in pages and posts
-
Hello, I have a problem that I hope you can help me to solve.
For web design reasons, I need to insert the title of my pages and posts using the php function “the_title”.
On the title thus generated I then apply the css style.All this happens regularly in the pages.
But there is a problem with the posts.
Indeed wordpress automatically adds a title “H1” in the posts, corresponding to the title of the post.This is not the case for page titles.
This circumstance determines that two titles are loaded in my posts: the first through the php function “the_title”; the second automatically from wordpress.
I specify that I can’t solve by simply applying a “display: none”, via css, to the H1 element created by wordpress, because this would be applied to all the H1 elements present on the web site.
How can I solve this problem?
Is it possible to make the title of the posts in wordpress behave like the title of the pages?Thanks for the the help!
- The topic ‘Different behavior of the title in pages and posts’ is closed to new replies.