WordPress.org

Ready to get started?Download WordPress

Forums

set body id to page_name for Pages (3 posts)

  1. junap
    Member
    Posted 8 years ago #

    I'd like to assign the slug (page_name field from wp_posts) as an id parameter on the body tag on my Pages to allow more CSS control, but can't figure out a way to achieve it. Does anyone have any suggestions?

  2. moshu
    Member
    Posted 8 years ago #

    Why not just use WP's built-in feature to create and have as many Page templates as you need?

  3. junap
    Member
    Posted 8 years ago #

    Because it would be infinitely simpler to just have an ID paramter in the body tag of one Page template, rather than a unique Page template for every page that has to be kept in sync with all the others. There may be lots of pages ( >25 ).

Topic Closed

This topic has been closed to new replies.

About this Topic