It looks like the page loop widget through site origin should do it. When I run my query for “posts” it pulls up all 69 (I know, right?) or my posts. Great. Then I only want 5. Great.
But when I preview, it has 5 excerpts that say “Nothing Found: Ready to publish your first post? Get started here”. FIVE. TIMES.
Is it something in the template? I’ve tried all 4. Do I have to go back and tag all my posts?
If there’s a better way to achieve this same thing I’m all ears. The recent posts widget makes the pictures to small.
]]>When clicking on the “Contact” page more than once the page does not work. For instance if you go to:
www.shaadischool.com/contact
The page will work, but once you click on the contact link in the top, it doesn’t seem to work.
Can anyone advise on what I need to do to ensure that you can click “contact” multiple times and get the page to work.
Thanks!
https://www.ads-software.com/plugins/about-me-page/
]]><?php
get_header();
global $woo_options;
?>
<div id="content" class="page col-full">
<div id="main" class="col-left">
<?php if ( $woo_options['woo_breadcrumbs_show'] == 'true' ) { ?>
<div id="breadcrumbs">
<?php woo_breadcrumbs(); ?>
</div><!--/#breadcrumbs -->
<?php } ?>
<?php if ( have_posts() ) { $count = 0; ?>
<?php while ( have_posts() ) { the_post(); $count++; ?>
<div <?php post_class('drop-shadow lifted'); ?>>
<h1 class="title"><?php the_title(); ?></h1>
<div class="entry">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'woothemes' ), 'after' => '</div>' ) ); ?>
</div><!-- /.entry -->
<?php edit_post_link( __( '{ Edit }', 'woothemes' ), '<span class="small">', '</span>' ); ?>
</div><!-- /.post -->
<?php
$comm = 'both';
if ( isset( $woo_options['woo_comments'] ) && ( $woo_options['woo_comments'] != '' ) ) { $comm = $woo_options['woo_comments']; }
if ( ($comm == 'page' || $comm == 'both' ) ) {
comments_template();
}
?>
<?php
} // End WHILE Loop
} else {
?>
<div <?php post_class(); ?>>
<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
</div><!-- /.post -->
<?php } ?>
</div><!-- /#main -->
<?php get_sidebar(); ?>
</div><!-- /#content -->
<?php get_footer(); ?>
And i want the standard page loop on this page replaced with:
<?php woocommerce_content(); ?>
I will love you forever if you help me ive got such a bad headache
Tony Patman
]]>this is the code i used (i got it here: https://perishablepress.com/two-column-horizontal-sequence-wordpress-post-order/):
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
any ideas?
thanks a lot.
I created a loop for parent pages. But i have a problem with nav links at the end of the loop.
When i clik next page it go to www.domain.com/page-permalink/page/2 but posts wont’change.
Can someone help me please.
CODE:
<?php if ( have_posts() ) { /* Query and display the parent. */
while ( have_posts() ) {
the_post();
the_content();
$thispage=$post->ID;
}
} ?>
<?php $childpages = query_posts('post_per_page=3&orderby=menu_order&order=asc&post_type=page&post_parent='.$thispage);
if($childpages){ /* display the children content */
foreach ($childpages as $post) :
setup_postdata($post); ?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
<small><?php the_time('j. F, Y') ?></small>
<?php the_content();?>
<hr />
<?php
endforeach;
} ?>
<!-- Nav link Pages -->
<div class="navigation"><p><?php posts_nav_link('∞','«« Previous page','Next page »»'); ?></p></div>
<!-- Nav links Pages -->
]]><?php query_posts($query_string . '&cat=10&posts_per_page=5'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_content(__('<span class="moretag">More...</span>')); ?></p><br />
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
Then I get this:
https://landofathousandrobots.com/WordPress/city-news-archives-page/
How do I get the the 3 headings and their content, and not the repeated content below it? I just can’t figure it out. Help is greatly appreciated.
]]><?php query_posts(array('category__and'=>array(18),'showposts'=>5)); ?>
<?php while(have_posts()) : the_post(); ?>
The problem is, page 2, page 3, etc., continue to show posts 1-5, and not 6-10, 11-15, etc. The loop just keeps repeating posts 1-5. The category contain 190 posts.
Here’s the page:
https://www.nerdgrind.com/tech-and-gadgets-news/
I even tried adding ‘posts_per_page=’=>5 to the options, but the results are the same.
Does anyone know what the problem could be?
]]>https://codex.www.ads-software.com/Template_Tags/query_posts
and even other sites
https://www.dontdream.it/en/a-site-index-for-wordpress/
… but the information doesn’t appear to work with the latest version of wordpress (2.3.3).
I’m trying to recreate the look of a index.php (home page), only I’m using a Page, and displaying only a specific category that I exclude from the home page (index.php).
Another wishful option is to also be able to display the_tags under each article on the category specific Page I’m tyring to build, but that option doesn’t seem to be avalaible using either query_posts, or get_posts.
Can anyone lend me some coding assistance?
]]>