-
Author
-
April 24, 2018 at 13:56 #195900
Grant
ParticipantHi Guys,
How can I remove the ‘Page Title’ from Pages only – but not Posts?
The navigation I have on the site is pretty intuitive. I’ve already removed the breadcrumb. There is also just no need to display the page title. It takes up unnecessary visual space on mobiles.
I know I can go from page to page and edit the ‘Title’ settings on every page but that does not remove the page titles for pages like Archives, Catagoriies, Tags, etc.
I’m sure there’s probably a bit of php code there somewhere in the Theme which can just be removed.
Cheers,
Grant
April 25, 2018 at 03:21 #195966Laura
ModeratorHello, please add this to style.css of child theme 🙂
COPY CODE.page .page-title { display: none !important; }Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 25, 2018 at 12:25 #195992Grant
ParticipantHi Laura,
Thanks for your reply. However, that option won’t work. Using it removes BOTH the tag and post headings. Notice in the attached files that the CSS path names are effectively the same.
The only way I can see that it will be possible to remove the ‘Tag Heading’ but without touching the ‘Post Heading’ is to remove the relevant php code from the appropriate file and place that file in the Child theme location. Unless you can think of a different workaround?
Do you know which file generates the Tag and Catagory headings?
Cheers,
Grant
April 25, 2018 at 18:38 #196036Laura
ModeratorHello, yes i can find a workaround with css, can you share access so i can test it? 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 25, 2018 at 19:13 #196045Grant
ParticipantSure Laura,
By all means, please give your idea a shot.
I’d prefer to implement a CSS workaround rather than have to implement an unnecessary php code hack or a new custom field. I always try to avoid changing core files where possible.
If your idea works, the Post Title below should still display BUT the tag archive ‘Tag Archive for: Global Cooperation’ and category archive ‘Archive for category: Unity’ page titles should both be hidden from display.
You can use this draft post for testing.
Draft Post
https://www.ihoearth.com/?p=6153&preview=true
You can use this temp account and password to access the site.
email – itxp@hotmail.com
password – a1$23h62ba%Thanks Laura – Your support is appreciated. I’m usually pretty good at finding some kind of workaround (even if it takes hours), but due to the CSS hierarchy for the Post, Category and Tag titles being the same here, this one has me stumped. I can’t see how to differentiate one title from the other in this case.
Cheers,
Grant
April 26, 2018 at 14:54 #196136Laura
ModeratorHello, here is the idea, let me know if it works
COPY CODE.category h1.page-title { display: block !important; } .tag h1.page-title { display: block !important; } h1.page-title { display: none; }Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 26, 2018 at 17:25 #196161Grant
ParticipantHi Laura,
Thanks so much for your efforts.
The code above was not quite what I was after however it gave me the necessary info that I needed to tweak it to achieve the result. So THANK YOU!
I wanted to remove the category and tag titles ONLY while leaving the Post Title. A little tweak of the above and that worked!
THANKS,
Grant
April 26, 2018 at 19:55 #196184Laura
ModeratorGlad you could resolve it 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.