Viewing 4 replies - 1 through 4 (of 4 total)
  • That code is for the page with content id = 42, so it will work for 1 page only.

    You can find out the id for a page or post by viewing source on the front and look at the CSS class in <body> tag, or look at the query string in url when editing that post/page in the backend.

    To make all the page titles center aligned, use this code

    .page .entry-header { text-align: center; }

    BTW, there is no sign of child theme stylesheet, as if the site is running on the theme, no child theme. This is okay, as long as all the changes in CSS is made via Custom CSS plugin only.
    https://www.ads-software.com/plugins/search.php?q=custom+css

    Thread Starter below7

    (@below7)

    Hi. The code I listed does not work for that page only. That’s was what I was trying to accomplish. I want to center the title on page id=42. but the code I listed in my post above doesn’t work. I was hoping to find a code that does work.

    Thread Starter below7

    (@below7)

    Perhaps it’s my procedure that’s wrong. using the code I listed, I simply placed it at the end of my child theme’s code, saved it and then uploaded it, overwriting the style sheet that was previously in my child theme.

    Did you click activate child theme?

    There is no sign of child theme in use in the site, no childtheme stylesheet, only main theme stylesheet.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Center page title in child theme’ is closed to new replies.