WordPress.org

Ready to get started?Download WordPress

Forums

Custome Style for different parent pages (2 posts)

  1. MikeArt
    Member
    Posted 5 months ago #

    Hi all

    I'm looking for a solution, how I can Add custom styles (css) to different pages. I know there are plugins for that, and I also know you can use <body <?php body_class(); ?>> and then set different css for the different pages (ID).

    SOLUTION 1
    The site I'm working on is for a customer and he should be able to choose the style while he create or edits a page. For example on the right site should be a dropdown menu or something to choose which style should be loaded.

    SOLUTION 2
    I have 6 different parent menu items in the main navigation. Each parent page has losts of child pages. I want to load a different style for the 6 parent pages. Every child page should then have the same style like the parent page of that child.

    Is there a solutuin for 1 or 2?

    Thank you very much!

    Mike

  2. batharoy
    Member
    Posted 5 months ago #

    http://codex.wordpress.org/Page_Templates#Custom_Page_Template
    You could create multiple page templates with different descriptive titles.

    You cold then call a special page-name.css in the head tag so each could be styled differently.

Reply

You must log in to post.

About this Topic