Forums

Plugin for inserting css tags into the header? (3 posts)

  1. tactics
    Member
    Posted 5 years ago #

    I want to use a different background picture on each page in my site. Seems pretty silly to create a template for each page, when that's the only difference.

    Is there a plugin that will allow me to insert a single css tag into a page via the admin panel? I searched through the forums and plugins, but couldn't come up with anything.

    Thanks.

  2. Evita
    Member
    Posted 5 years ago #

    Not a plugin, but wordpress codex is your friend:
    http://codex.wordpress.org/Conditional_Tags

  3. tactics
    Member
    Posted 5 years ago #

    Just wanted to add to this post. I didn't like the response I got, so I set out to find a better solution.

    Thanks to a collaboration between Dirk and myself, there's no need to use conditional statements to accomplish this.

    Download and install this plugin

    Once it's installed you can specify a style for each individual page that will over-ride the style in the stylesheet. Let's say your template has div containing a background image you want to change on a specific page. Let's say it's called "#header".

    Go to the page you want to edit in the wp admin and in the "custom tag" field, enter something like this:

    <style type="text/css" media="Screen">#header { background-image: url(my_image.jpg); }</style>

    That'll do it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.