crod310
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom WordPress Query Pagination Not Workingthe rest is just to toggle the pagination, im pretty much blind just adding random stuff after that
Forum: Fixing WordPress
In reply to: Custom WordPress Query Pagination Not WorkingI have a query one for my theme options to include which categories
<?php $show_category = exclude_header_cats(); $query = new WP_Query( 'cat='.$show_category ); ?>This query is for my theme options to tell is how many per page:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array('posts_per_page'=>get_option('premiumwd_blog_perpage') ));Forum: Fixing WordPress
In reply to: 3rd Level Drop Down Troubleshootit is showing behind the 2nd level dropdown menu. I am using thematic theme to build a theme. I put it on jsfiddle to view.
Forum: Fixing WordPress
In reply to: PHP WordPress Loop Fixheres the website where its acting up
Forum: Fixing WordPress
In reply to: PHP WordPress Loop Fixthis is the news-loop:
———————————————————————[code moderated – please use the pastebin for any code longer than 10 lines]
well thx for trying dude.
they both are two custom static pages with two custom templates.
deep if you look at the two pages, you see that the news page is looping this
<?php
$args = array( ‘numberposts’ => 3 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?><div class=”post”><h2 class=”entry-title”>”><?php the_title(); ?></h2>
<?php the_excerpt(); ?></div>
<?php endforeach; ?>
<div class=”post” style=”padding:20px 0 0 0;”><div style=”width:654px;padding;10px;”>Read More ></div>
</div>which is in loop-index, not loop-news. I want to take it out of loop-news. thats all.
okay,
loop-news is the main blog, which displays all the posts. They both are calling the same posts.loop-news.php for news page
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<h1 class=”entry-title”><?php the_title(); ?></h1><div class=”entry-meta”>
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –><div class=”entry-content”>
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”>’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –><?php if ( get_the_author_meta( ‘description’ ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id=”entry-author-info”>
<div id=”author-avatar”>
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyten_author_bio_avatar_size’, 60 ) ); ?>
</div><!– #author-avatar –>
<div id=”author-description”>
<h2><?php printf( __( ‘About %s’, ‘twentyten’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
<div id=”author-link”>
” rel=”author”>
<?php printf( __( ‘View all posts by %s <span class=”meta-nav”>→</span>’, ‘twentyten’ ), get_the_author() ); ?>
</div><!– #author-link –>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?><div class=”entry-utility”>
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –><?php endwhile; // end of the loop. ?>
loop-index.php page for index page
<?php
// The Query
query_posts( $args );// Reset Query
wp_reset_query();?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<h1 class=”entry-title”><?php the_title(); ?></h1><div class=”entry-meta”>
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –><div class=”entry-content”>
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-link”>’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –><?php if ( get_the_author_meta( ‘description’ ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id=”entry-author-info”>
<div id=”author-avatar”>
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyten_author_bio_avatar_size’, 60 ) ); ?>
</div><!– #author-avatar –>
<div id=”author-description”>
<h2><?php printf( __( ‘About %s’, ‘twentyten’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
<div id=”author-link”>
” rel=”author”>
<?php printf( __( ‘View all posts by %s <span class=”meta-nav”>→</span>’, ‘twentyten’ ), get_the_author() ); ?>
</div><!– #author-link –>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?><div class=”entry-utility”>
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –><?php
$args = array( ‘numberposts’ => 3 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?><div class=”post”><h2 class=”entry-title”>“><?php the_title(); ?></h2>
<?php the_excerpt(); ?></div>
<?php endforeach; ?>
<div class=”post” style=”padding:20px 0 0 0;”><div style=”width:654px;padding;10px;”>Read More ></div>
</div>both posts have <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> is that why they are connected?
I want it to use a different loop not be connected.
so page1
loop 1
loop 2page 2
loop 3
loop 4i have two pages, and its calling loop.php but both template files have two different pages but maybe its calling them same thing, one has ‘news’,’loop’ and the other has ‘index’,’loop’ inside the template files.
I am only using query posts in the index-loop.php template page.
please help!