Forums

[resolved] Post and/or Page Specific Stylesheet (CSS) Link (4 posts)

  1. scottwallick
    Member
    Posted 3 years ago #

    I am looking for a plugin or some other way to have a post/page-specific link inserted into the <head> area as a <link rel="stylesheet" ... /> just for a single post. I've looked and looked and I just can't find anything that'll work effeciently—effeciently is a keyword—with WordPress 2.0.

    Help.

    Thanks,

    scott

  2. alphaoide
    Member
    Posted 3 years ago #

    You can try this off-the-top-of-my-head plugin

    <?php
    /*
    Plugin Name: Specific Stylesheet
    Version: 1.0
    Plugin URI: http://mysite.com
    Description: Do something--I guess.
    Author: Me
    */

    function ss_insert_stylesheet() {
    if (is_single()) { // needs to customize the condition
    echo '<link rel="stylesheet" ... />';
    }
    }

    add_action('wp_head', 'ss_insert_stylesheet');

    ?>

  3. Kafkaesqui
    Moderator
    Posted 3 years ago #

    Try this:

    http://wordpress.org/support/topic/31639#post-183318

    *Should* work in 2.0, but (obviously) let me know if it doesn't.

  4. scottwallick
    Member
    Posted 3 years ago #

    Thanks for the replies, fellows. Greatly appreciated. I'll let you know which one I go with.

    By the way, Kafkaesqui, I love your Head META Description and META Relationship Links plugins. Both do specific things and do them well. Good for you.

    scott

Topic Closed

This topic has been closed to new replies.

About this Topic