Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 01-03-2008, 01:49 PM help with my script
Skilled Talker

Posts: 97
Trades: 0
PHP Code:
<?php get_header() ?>
    <div id="center">
<?php get_sidebar() ?>
<div id="ads">
here are some adsthis is the ad space yo
</div>

<div id="content">

<?php $posts get_posts"category=1&numberposts=6" ); ?>
<?php 
if( $posts ) : ?>
  
<div id="chat" class="post">
<h2><?php the_category(', '); ?> &raquo;</h2>
<?php foreach( $posts as $num => $post ):
    
setup_postdata($post);
    if ( 
$num == ) {// this is the first post ?>
    <div class="pleft">
    <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3>  
        <div class="entry-content">
            <?php the_content('[Read the rest of this entry]'); ?>
        </div>
      </div>  
    <div class="pright">
    <p>Previous Posts in <?php the_category(', '); ?></p>
    <ul>    
<?php // these are the rest ?>
    <li><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></li>
<?php endforeach; ?>
    </ul>
    </div>
    <hr />
</div>
  
<?php endif; ?>

<?php $posts get_posts"category=4&numberposts=6" ); ?>
<?php 
if( $posts ) : ?>
  
<div id="chat" class="post">
<h2><?php the_category(', '); ?> &raquo;</h2>
<?php foreach( $posts as $num => $post ):
    
setup_postdata($post);
    if ( 
$num == ) {// this is the first post ?>
    <div class="pleft">
    <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3>  
        <div class="entry-content">
            <?php the_content('[Read the rest of this entry]'); ?>
        </div>
      </div>  
    <div class="pright">
    <p>Previous Posts in <?php the_category(', '); ?></p>
    <ul>    
<?php // these are the rest ?>
    <li><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></li>
<?php endforeach; ?>
    </ul>
    </div>
    <hr />
</div>
  
<?php endif; ?>
  
<?php $posts get_posts"category=3&numberposts=6" ); ?>
<?php 
if( $posts ) : ?>
  
<div id="chat" class="post">
<h2><?php the_category(', '); ?> &raquo;</h2>
<?php foreach( $posts as $num => $post ):
    
setup_postdata($post);
    if ( 
$num == ) {// this is the first post ?>
    <div class="pleft">
    <h3 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></h3>  
        <div class="entry-content">
            <?php the_content('[Read the rest of this entry]'); ?>
        </div>
      </div>  
    <div class="pright">
    <p>Previous Posts in <?php the_category(', '); ?></p>
    <ul>    
<?php // these are the rest ?>
    <li><a href="<?php the_permalink() ?>" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></a></li>
<?php endforeach; ?>
    </ul>
    </div>
    <hr />
</div>
  
<?php endif; ?>

</div>
    </div>
<?php get_footer() ?>
hi i made this for wordpress however im getting some problems
each post i make has one category
however when i run this script, it shows
<h2>cat 1</h2> with posts listed under cat 1
<h2>cat 1</h2> with posts listed under cat 2
<h2>cat 2</h2> with posts listed under cat 3

even if you dont use wordpress, can u check the script?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
raptrex is offline
Reply With Quote
View Public Profile Visit raptrex's homepage!
 
 
Register now for full access!
Old 01-04-2008, 06:36 PM Re: help with my script
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
Can you try and explain your problem again. not sure exactly what you are talking about, and apparently no one else does either because there have been no responses.
Truly is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to help with my script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15835 seconds with 12 queries