[Resolved] Changing Post Title

Home Forums Support [Resolved] Changing Post Title

Home Forums Support Changing Post Title

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #678891
    Mohit

    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

    #678905
    Leo
    Staff
    Customer Support

    Hi 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 πŸ™‚

    #679791
    Mohit

    Hi,

    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

    #679866
    David
    Staff
    Customer Support

    Hi there,

    you can add this CSS in addition to what Leo provided:

    @media (max-width: 768px) {
        h1.page-hero {
            font-size: 28px;
        }
    }
    #679926
    Mohit

    Thanks πŸ™‚

    #679982
    David
    Staff
    Customer Support

    Glad we could help.

    #680375
    Leo
    Staff
    Customer Support

    More info here on media query if you need:
    https://docs.generatepress.com/article/responsive-display/

    #680597
    Mohit

    Hey,
    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

    #680639
    David
    Staff
    Customer Support

    Hi 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.

    #680649
    Mohit

    Hey,

    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!

    #680657
    David
    Staff
    Customer Support

    Use the after_entry_title hook and set the Priority to 5

    #680675
    Mohit

    Hi 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.

    #680678
    David
    Staff
    Customer Support

    In 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.

    #680690
    Mohit

    Yeah 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

    #680801
    Mohit

    Guess I figured it out by creating a separate class for ad in the page hero.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.