Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #62852
    Patrick
    Participant

    Guys,

    I responded to another thread, but after research on forum practices, decided to post my own.

    I want to center the page title and also place a Google Adsense ad above the Page title.

    Would this work to center? #main .type-page .entry-title { text-align: center; }

    How do I place an ad above the entry title?

    #62857
    Sakin
    Keymaster

    @Patrick: If you want to center all the title of pages/posts then you can add the following css in “Appearance => Customize => Theme Options => Custom CSS Options” box:
    .entry-header { text-align: center; }

    But if you want to center only page title, then add the following css instead.
    .type-page .entry-header { text-align: center; }

    For Google Adsense above page title, I recommend you to search for plugin as it’s little complicated to do it from theme. To do it from theme, you need to build child theme, for child theme refer to http://catchthemes.com/blog/create-child-theme-wordpress/ and then add the code like below in your child theme functions.php file

    function catchresponsive_adsense_above_pagetitle() { ?>
    	add in your code here
    <?php
    }
    add_action( 'catchresponsive_before_page_container', 'catchresponsive_adsense_above_pagetitle', 20 );
    #62869
    Patrick
    Participant

    Thank you Sakin. I implemented the center only page title. I also decided to go with adding the ad below the title instead. Looks good. Enjoying the Pro-theme. Great work!

    #63411
    Sakin
    Keymaster

    @Patrick: Thanks for your appreciation.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Place an adsense ad above the page title’ is closed to new replies.