- This topic has 15 replies, 3 voices, and was last updated 5 years, 7 months ago by David.
-
AuthorPosts
-
September 16, 2018 at 9:54 pm #678891Mohit
Hi, I added a new element header and changed the post title container to full width. Now I want to change the font style of the post title which I can’t do as post title is <H1> tag and if I go to customize>typography>content and change from there my content <H1> tag also changes.
So, is there any way to change my post title only?Thanks π
GP Premium 1.7.2
September 16, 2018 at 11:11 pm #678905LeoStaffCustomer SupportHi there,
You can give h1 in page hero a class like:
<h1 class="page-hero">page hero title</h1>
Then target it with CSS:
h1.page-hero { font-size: 40px; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps π
September 17, 2018 at 10:28 pm #679791MohitHi,
Thanks, it worked but in mobile view how can I make my post title font size to be displayed differently to what is being displayed on a desktop? As by adding the above code the size of my font is still big in mobile view as I created a class?
Thanks
September 18, 2018 at 1:19 am #679866DavidStaffCustomer SupportHi there,
you can add this CSS in addition to what Leo provided:
@media (max-width: 768px) { h1.page-hero { font-size: 28px; } }
September 18, 2018 at 2:31 am #679926MohitThanks π
September 18, 2018 at 3:48 am #679982DavidStaffCustomer SupportGlad we could help.
September 18, 2018 at 9:53 am #680375LeoStaffCustomer SupportMore info here on media query if you need:
https://docs.generatepress.com/article/responsive-display/September 18, 2018 at 2:43 pm #680597MohitHey,
Thanks for all references but I am facing another problem!
My post title padding in mobile view is not displaying properly, as a result title is not looking what it is suppose to look. Same goes for meta info.Can you give me a code to fix this?
Thanks
September 18, 2018 at 4:22 pm #680639DavidStaffCustomer SupportHi there,
it looks like the adverts you have added are not responsive which is effecting the width of the device. You will need to fix this with the ad service provider.
September 18, 2018 at 4:56 pm #680649MohitHey,
I am using adsense responsive ad and it should adjust automatically. Also is there any other way to show the ad at exact same position using hooks instead of showing by page hero, the way I am showing!
September 18, 2018 at 5:28 pm #680657DavidStaffCustomer SupportUse the
after_entry_title
hook and set the Priority to 5September 18, 2018 at 6:15 pm #680675MohitHi David,
Thanks for letting me know about this. But even if I don’t show ad below title, title in mobile view is not displaying properly, as a result title is not looking what it is suppose to look. Same goes for meta info.
September 18, 2018 at 6:19 pm #680678DavidStaffCustomer SupportIn the Page Hero padding, there is a mobile icon, click that and then set your mobile padding. Currently its getting the same padding as the desktop.
September 18, 2018 at 6:30 pm #680690MohitYeah I fixed that, Thanks
But now when I add the ad via hook it doesn’t align itself below the title instead is floating somewhere and overlapping other things even on desktop. Have a look by yourself.
Thanks
September 18, 2018 at 10:42 pm #680801MohitGuess I figured it out by creating a separate class for ad in the page hero.
-
AuthorPosts
- You must be logged in to reply to this topic.