• Okay, I’m no good with WordPress. Lets just get that out in the open. However, you would think after going through the whole integration for the last version in January, I would be able to handle simply upgrading half a year later. Not quite.

    I already have layouts for my website. (http://www.pink-starr.com/wordpress) All I want to do, is use The Loop to put wordpress inside the page. However, the new version has new Loops, and I don’t exactly know how to use them.

    Lets start with my old code:
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <?php include ("/home/stpink/public_html/skins/cookiecheck.php");?> <? include($headervar.$extension); ?>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <style type="css/text">
    .meta {
    font-size: .75em;
    }
    .meta li, ul.post-meta li {
    display: inline;
    }
    .meta ul {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
    }
    .meta, .meta a {
    color: #808080;
    font-weight: normal;
    letter-spacing: 0;
    }
    </style>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> � <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <? include($footervar.$extension); ?>

    It has the header, footer, cookie check needed for my layout, and the other things needed for wordpress. When used, it has a bit of a problem.

    So I tried taking out the old loop and puttin in a new one. I would post those up here, but I tried just about every loop on the site about the loop, and none seemed to work. I don’t know which loop to use. And I’m not sure if I’m even taking out the right things and putting the new things in the right place? Ahh, it’s a disaster.

    I told you I was no good at this. :-/

    Thanks for any help. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey,

    Can you provide a link? I would love to help you, but I would like a link to check out the problem 1st.

    And btw, I’m no PHP master but this here:

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php endforeach; else: ?>

    I think you should check a template out and add the code where it has stuff like:

    <div class="entry"><?php the_title(); ?></div>
    posted by <?php the_author

    That should be included I think. I dont know, since Im no expert.

    Thread Starter Lauren

    (@xxlauren)

    Thread Starter Lauren

    (@xxlauren)

    That is using my old index file, which uses the 1.2 loop.

    Ahh, page…mm, don’t really know how I would do that stuff. Sorry ;\

    Thread Starter Lauren

    (@xxlauren)

    It’s okay.

    Thread Starter Lauren

    (@xxlauren)

    Okay, lets see if I can help you help me anymore…? So, I took the file above, and found exactly was for the layout and what wasn’t. I kept only the things needed for the layout. Then, I took the default loop from the loop site, and stuck it in there. I came up with an error.

    Parse error: parse error, unexpected $ in /home/stpink/public_html/wordpress/index.php on line 23

    The code that produced that error is as follows.

    <?php /* Don't remove this line.

    */
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');

    ?>

    <?php include

    ("/home/stpink/public_html/skins/c

    ookiecheck.php");?> <?

    include($headervar.$extension); ?>

    <?php if (have_posts()) : ?><br />
    <?php while (have_posts()) :

    the_post(); ?>
    <h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>"

    rel="bookmark" title="Permanent

    Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y')

    ?> <!-- by <?php the_author() ?>

    --></small>
    <div class="entry">
    <?php the_content('Read the rest

    of this entry »'); ?>
    </div>
    <p class="postmetadata">
    Posted in <?php the_category(', ')

    ?>
    <strong>|</strong>
    <?php

    edit_post_link('Edit','','<strong>

    |</strong>'); ?>
    <?php comments_popup_link('No

    Comments »', '1 Comment »', '%

    Comments »'); ?></p>
    <?php endwhile; ?>

    <? include($footervar.$extension);

    ?>

    I hope that helps you to help me…

    Thread Starter Lauren

    (@xxlauren)

    Well, I’ve been messing around with it, and it works fine before I try putting the loop in. 😛 After that, it just tells me I have an error and then another and another. I can’t ever get rid of them, until I get rid of the loop.
    Hmm, I keep giving all this information, if only I could get some feedback on it. :/

    http://www.pink-starr.com/wordpress

    require(‘./wp-blog-header.php’);

    Isn’t the wp-blog-header.php in the wordpress directory?

    Thread Starter Lauren

    (@xxlauren)

    Yes.

    Thread Starter Lauren

    (@xxlauren)

    Eghh, I think I’ve been forgotten. I have to go now, but I’ll be back in a couple of hours. Would really love to have this fixed by tomorrow. :-/

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WP 1.5 Integration Question’ is closed to new replies.