Forums

[resolved] add wp_head() in header then style breaks (4 posts)

  1. christineteddy
    Member
    Posted 1 year ago #

    Hi,
    I added wp_head() in the header and then it broke things. I tried to fix the style sheet here and there but still couldn't figure out what's wrong. I really want wp_head() to work out because without it some plug-ins give me problems.

    ===================================
    <head>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <style type="text/css">
    .story .details .read-on{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/readon_black.gif) 100% 60% no-repeat; }
    #comments .pingback cite .author{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/trackback_pingback.gif) 100% 0 no-repeat; }
    #footer .inside{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/footer_black.gif) 50% 0 repeat-x; ?>
    </style>
    <?php wp_head(); ?>
    </head>

    ======================================

    Here is before and after:
    http://www.wangentz.org/pic/before.tiff
    http://www.wangentz.org/pic/after.tiff

    Any help will be greatly appreciated. Thanks.

  2. chaoskaizer
    Member
    Posted 1 year ago #

    not sure what when wrong with your theme but there is some minor typo-error with your embed-css inside header.php.

    find

    <style type="text/css">
    .story .details .read-on{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/readon_black.gif) 100% 60% no-repeat; }
    #comments .pingback cite .author{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/trackback_pingback.gif) 100% 0 no-repeat; }
    #footer .inside{ background:url(<?php bloginfo('stylesheet_directory'); ?>/images/footer_black.gif) 50% 0 repeat-x; ?>
    </style>

    replace with

    <style type="text/css">
    .story .details .read-on{
     background:url(<?php bloginfo('stylesheet_directory'); ?>/images/readon_black.gif) 100% 60% no-repeat;
    }
    
    #comments .pingback cite .author{
     background:url(<?php bloginfo('stylesheet_directory'); ?>/images/trackback_pingback.gif) 100% 0 no-repeat;
    }
    
    #footer .inside{
     background:url(<?php bloginfo('stylesheet_directory'); ?>/images/footer_black.gif) 50% 0 repeat-x;
    }
    
    </style>

    Anyway I think its pretty hard to troubleshoot this issue without seeing the HTML sources.

    follow this step :

    find

    <?php wp_head(); ?>

    replace with

    <!-- WP_HEAD_START
    <?php wp_head(); ?>
     WP_HEAD_END -->

    the view the page source and post the results starting from "<!-- WP_HEAD_START " to " WP_HEAD_END --> " in this threads.

  3. christineteddy
    Member
    Posted 1 year ago #

    Hi chaoskaizer,
    Thanks so much for your help. I replaced the embed-css according to your instruction and added wp_head().

    Here is the source for wp_head:
    `
    <!-- WP_HEAD_START
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.wangentz.org/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.wangentz.org/wp-includes/wlwmanifest.xml" />
    <script type='text/javascript' src='http://www.wangentz.org/wp-includes/js/jquery/jquery.js?ver=1.2.6'></script>
    <script type='text/javascript' src='http://www.wangentz.org/wp-content/plugins/wordpress-flickr-manager/js/highslide.packed.js?ver=2.6'></script>
    <script type='text/javascript' src='http://www.wangentz.org/wp-content/plugins/wordpress-flickr-manager/js/wfm-hs.php?ver=2.6'></script>
    <meta name="generator" content="WordPress 2.6" />

    <script language="javascript1.4" type="text/javascript" src="http://www.wangentz.org/wp-content/plugins/audio-player/audio-player.js"></script>

    <!-- WFM INSERT HIGHSLIDE FILES -->
    <link rel="stylesheet" href="http://www.wangentz.org/wp-content/plugins/wordpress-flickr-manager/css/highslide.css" type="text/css" />
    <!-- WFM END INSERT -->

    <style type="text/css" media="screen,projection">
    /*<![CDATA[*/
    /* CSS inserted by theme options */
    body{font-family:verdana, geneva, sans-serif;font-size:75%;}
    body div#wrapper{width:45em;}
    div#header,div.hentry .entry-title,div#content .page-title,div.entry-content h2,div.entry-content h3,div.entry-content h4,div.entry-content h5,div.entry-content h6{font-family:arial, helvetica, sans-serif;}
    div.hentry div.entry-content{text-align:left;}
    body div#primary{clear:both;float:left;}
    body div#secondary{float:right;}body div.banner div.access{display:block;background:#cbd3db;color:#0c141c;font-size:0.8em;font-style:italic;letter-spacing:1px;line-height:100%;padding:0.6em 0;text-transform:uppercase;}
    /*]]>*/
    </style>
    WP_HEAD_END -->
    '

    Thanks!

  4. christineteddy
    Member
    Posted 1 year ago #

    Oh the extra css-insertion is generated by another function in function.php (that i borrowed from another theme). Now I emptied the functions that caused the problem. And everything is okay! Thanks so much!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags