Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Member John Tanedo's Avatar
    Join Date
    Apr 2010
    Location
    Ca***an de Oro City, Philippines
    Posts
    72
    Member #
    21794
    hi guys!

    I need help on my new project : Figaf Test site | innovative integration

    I have the home page set to static but I want the latest news to post also. . .

    for some reason the older post link does not work. . .

    here are the codes I used on the content part . . .

    Code:
    <div id="companyProfile"><!--begin companyProfile-->
    
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    
                    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                                    
    
                        <div class="entry-content">
                            <?php the_content(); ?>
                            <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
                            
                    </div><!-- #post-## -->
    </div>
                    
    
    <?php endwhile; ?>
    
                 </div>
                    
                    <div id="latestNews"><!--begin latestNews-->
                        <h3>Latest <strong>News</strong></h3>
       <?php $paged = get_query_var('paged');
    query_posts('paged=' . $paged . '&cat=-1');  
    ?>
                      <?php if (have_posts()): ?>
    
                             <?php while (have_posts()): the_post();?>
    
                          <div <?php post_class() ?> id="post-<?php the_ID();?>">
                            
                               <h2><a href="<?php the_permalink() ?> "><?php the_title();?></a></h2>
                             
                             <p class="date">Posted on: <?php the_time('l, F jS, Y') ?> at <?php the_time() ?></p>
                             
                           
                             <p><?php the_excerpt();?></p>
                            
                                     </div>  
                           
                            
                        <?php endwhile; ?>
    <?php next_posts_link('&laquo; Older Entries') ?>
             <?php previous_posts_link('Newer Entries &raquo;') ?>
                      <?php else: ?>
    
                      <?php endif;?>
              
                    
                    </div><!--end latestNews-->

    please help me. . . I am about to pull my hair out. . . this same code works on my other website but for some reason (most probably because its on the static home page) it does not work here help php experts!

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:38 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com