Forums

[resolved] Using another stylesheet for single.php (2 posts)

  1. pshoeg
    Member
    Posted 3 years ago #

    Hi there!
    I'd like to know if it's possible to make WordPress choose e.g. style2.css over style.css whenever a page is generated via single.php?

    Thanks!

  2. pshoeg
    Member
    Posted 3 years ago #

    Hi guys...

    I found a solution myself, but thought I would share it with you:

    In single.php, write

    <?php include ('header-single.php'); ?>

    instead of

    <?php get_header(); ?>

    Then, simply create a duplicate of header.php called header-single.php, and refer to the stylesheet there.

    I found the trick here.

Topic Closed

This topic has been closed to new replies.

About this Topic