• Resolved kannued

    (@kannued)


    I have successfully integrated WP within my design. The blog works. But when I go to validate it at w3, the validator has problems with the WP’s doctype inside the design.

    DocTypes are usually at the beginning of the page. That validates fine. But then where I have included the WP, it has a problem with its DocType that appears in the middle of the file. Unfortunately, I can’t give you a link because it is considered Google Juicing. So I don’t know how this can be solved if a person can’t see the problem.

    Gayle

Viewing 15 replies - 1 through 15 (of 28 total)
  • Yes, you can provide a link.

    Google juicing? I’m kinda new around here, but I think if you’re posting the link for other’s to see – so they can help, I don’t see the problem with it… don’t think anyone can answer your question unless you post the link.

    Congrats on trying to get it to validate – now let’s see your stellar site, I bet it rocks

    Thread Starter kannued

    (@kannued)

    Your defining the doctype twice. This is the problem. This is giving you duplicates of the head and body tags. You need to integrate WP in without all of the duplication.

    Thread Starter kannued

    (@kannued)

    So then I have to go into the header.php in the wp-content of my theme, and removed the DocType, head and body?

    What about style type and all the link rel within the head? Then I have to transfer that to my main design?

    Quickly thinking about it, what you would need to do is take all of the contents of header.php and integrate them into the main head elament of your site, get rid of the call to the header.php in all of the templates. Then get rid of the duplicate body tags.

    Thread Starter kannued

    (@kannued)

    I tried pulling the code into the main design. But my paths are now all mixed up. The problem is because the paths are coded not in html, but dependent on php files. And I am still waiting for my Ullman’s PHP book.

    <meta http-equiv=”Content-Type” content=”text/html; charset=<?php bloginfo(‘charset’); ?>” />
    <style type=”text/css” media=”screen”>
    @import url( <?php bloginfo(‘stylesheet_url’); ?> );
    </style>

    <link rel=”stylesheet” type=”text/css” media=”print” href=”<?php echo get_settings(‘siteurl’); ?>/print.css” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />

    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>

    Thread Starter kannued

    (@kannued)

    These links are moving down to my root directory. I don’t know how to begin to recode for a root directory in php.

    Well, my only suggestion would be to use an <iframe> until the book comes. Although, I am halfway through this book and I don’t think it will help on this problem. Your trying to push a square peg (WP) into a round hole (your existing site). It would be a lot easier to just alter a theme to have the look of your current site. Good luck.

    You could just put this at the top of your main page:
    <?php require('pathtoyourwordpressinstall/wp-config.php'); ?>

    You can use WordPress functions on any page as long as the page knows where to find that config file. So you can build your own static page and pull content from your WP database to display on that page. This means that you don’t have to worry about WP writing headers for you. You can just use WP functions to display content you want. This might help:
    http://wordpress.org/support/topic/83086?replies=2

    Thread Starter kannued

    (@kannued)

    Ryan,

    I couldn’t find a three column theme that just had images in its left and right columns. All three columns were filled with code that I needed in the centre column, or in the footer.

    I tried the iframe which works but confines the grey background only to the center piece.

    tsguitar,
    my wp-config.php is in my root directory. when I call <?php require(‘wp-config.php’); ?> in the center column, nothing appears.

    http://www.kiplingcitizen.com/temp-require.html

    When I put it at the top of the page, nothing appears.

    Because tsguitar gave you the wrong code πŸ™‚
    To be able to use any WP function in another (non-WP) file, you need to add this:
    <?php require('./path-to-your-blog/wp-blog-header.php'); ?>
    at the top of that file, before anything else!

    moshu: I’ve been able to get it working with wp-config… Huh… I must be completely mistaken. Well that means I need to go around to a few posts and fix my mistake! Glad we got it working, though.

    Yup, HAS to be wp-blog-header.php – depending on host, the other can throw some TRULY AMAZING results! Been there done that…. wasn’t pretty.

    Thread Starter kannued

    (@kannued)

    The wp-blog-header.php is in my root directory. http://www.kiplingcitizen.com/temp.html

    I have tried many variations. Either I get nothing, in the center column with my required code missing too.

    Or I get these two faults.
    Warning: require(./townofkipling.com/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /u/k/kcit0806/www.kiplingcitizen.com/temp.html on line 63

    Fatal error: require() [function.require]: Failed opening required ‘./townofkipling.com/wp-blog-header.php’ (include_path=’.:’) in /u/k/kcit0806/www.kiplingcitizen.com/temp.html on line 63

    I have tried the whole path using the absolute path (without the dot) and using the relative path. Then I get nothing in the center column nor in that section of view source.
    ?php require(‘/u/k/kcit0806/www.kiplingcitizen.com/wp-blog-header.php’); ?>

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Validating Integrated WP within design’ is closed to new replies.