WordPress.org

Ready to get started?Download WordPress

Forums

Template borked (3 posts)

  1. Jinsan
    Member
    Posted 9 years ago #

    I'm trying to use the coffee2code plugin to replace the loop within a page, so I can use it as a template. Not sure if that makes sense, but the template keeps screwing up as I'm doing something wrong.
    I removed most of the code (copied from index.php and replaced it with the code at the bottom, but I either get parse errors or the page borks. Any advice?

    Here's the template:


    <?php /*
    Template Name: ReviewMain
    */
    ?>

    <?php
    get_header();
    if ($posts) { $pcount_lp = sizeof($posts); foreach ($posts as $post) {start_wp();?>
    <div class="entry">

    <div class="navcontainer">
    <ul id="navlistupper">
    <li id="eleven"><a href="<?php bloginfo('url'); ?>/the-author">BOOK</a></li>
    <li id="twelve"><a href="<?php bloginfo('url'); ?>/the-site">FILM</a></li>
    <li id="thirteen"><a href="<?php bloginfo('url'); ?>/the-design">MUSIC</a></li>
    <li id="fourteen"><a href="<?php bloginfo('url'); ?>/the-contact">GAME</a></li>
    </ul>
    </div>
    /////// I want to replace this code with the code below ///////////
    <?php
    the_date('','<h2 class="entrydate2">','</h2>');
    ?>
    <h3 class="entrytitle2" id="post-<?php the_ID(); ?>"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <div class="entrybody2"><strong><?php the_author() ?> wrote this <?php the_time(); ?>:</strong>
    <?php the_content();?></div>
    /////// I want to replace this code with the code below ///////////

    <?php }?>

    <?php } else { // end foreach, end if any posts ?>
    <div class="entrybody">Sorry, no posts matched your criteria.
    </div>
    <?php } ?>

    <?php get_footer(); ?>

    coffee2code code:

    <ul class="point">
    <?php c2c_get_recent_posts ($num_posts = 5,
    $format = "<li>%post_date%: %post_URL%
    %post_excerpt</li>",
    $categories = '11 12 13 14',
    $orderby = 'date',
    $order = 'DESC',
    $offset = 1,
    $date_format = 'm/d/Y',
    $authors = '',
    $include_passworded_posts = false); ?>
    </ul>

    Thanks in advance

  2. The unordered list should probably look like this:
    <ul class="point">
    <?php c2c_get_recent_posts (5,
    "<li>%post_date%: %post_URL%
    <br />%post_excerpt</li>",
    '11 12 13 14',
    'date',
    'DESC',
    1); ?>
    </ul>

  3. Jinsan
    Member
    Posted 9 years ago #

    hi scott think I solved that one - this is the problem I'm trying to solve with the plugin:

    http://wordpress.org/support/topic/31832

    :)

Topic Closed

This topic has been closed to new replies.

About this Topic