Forums

Adding CSS to static pages (8 posts)

  1. 7milesdown
    Member
    Posted 4 years ago #

    I've hollowed out the index. Everything looks great except it does not match the default theme. How do I add the default css to this?

  2. moshu
    Member
    Posted 4 years ago #

    Put the call in the head part of your index, like
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    </style>

    or something similar.

  3. 7milesdown
    Member
    Posted 4 years ago #

    thanks. I will try this!

  4. 7milesdown
    Member
    Posted 4 years ago #

    Im getting this error!

    @import url(
    Fatal error: Call to undefined function: bloginfo() in c:\hosting\*****\member\******\about.php on line 2

  5. moshu
    Member
    Posted 4 years ago #

    OK, so where is your "about.php" file located? Or better, which WP version are we talking about? Because in WP 1.5 you don't need any real static pages, just use the Pages feature!

  6. Ming
    Member
    Posted 4 years ago #

    Make sure you have this line at the top of page:

    <?php require('./wp-blog-header.php'); ?>

    That's where the WP functions like bloginfo() are defined.

  7. 7milesdown
    Member
    Posted 4 years ago #

    well im adding php content thats why. I know there is the built in static page. I'll try to add teh require at the top and see what comes out of it.

  8. 7milesdown
    Member
    Posted 4 years ago #

    Thanks Ming. that got it working!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.