Thanks in advance!
]]><div class="container">
<div class="post_content">
<div class="home_posts">
<?php
$args2 = array(
'post_type' => 'post',
'posts_per_page' => 10,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 2),
);
$query = new WP_Query( $args2 );
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
echo '<div class="grid_post">
<h3><a href="'.get_permalink().'">'.get_the_title().'</a></h3>';
$type = get_post_meta($post->ID,'page_featured_type',true);
switch ($type) {
case 'youtube':
echo '<iframe width="560" height="315" src="https://www.youtube.com/embed/'.get_post_meta( get_the_ID(), 'page_video_id', true ).'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
break;
case 'vimeo':
echo '<iframe src="https://player.vimeo.com/video/'.get_post_meta( get_the_ID(), 'page_video_id', true ).'?title=0&byline=0&portrait=0&color=03b3fc" width="500" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
break;
default:
echo '<div class="grid_post_img">
<a href="'.get_permalink().'">'.get_the_post_thumbnail().'</a>
</div>';
break;
}
echo '<div class="grid_home_posts">
<p>'.dess_get_excerpt(120).'</p>
</div>
</div>
';
endwhile;
?>
</div>
<?php
echo '<div class="load_more_content"><div class="load_more_text">';
ob_start();
next_posts_link('LOAD MORE',$query->max_num_pages);
$buffer = ob_get_contents();
ob_end_clean();
if(!empty($buffer)) echo $buffer;
echo'</div></div>';
$max_pages = $query->max_num_pages;
wp_reset_postdata();
endif;
?>
<span id="max-pages" style="display:none"><?php echo $max_pages ?></span>
</div>
<?php get_sidebar(); ?>
<div class="clear"></div>
</div>
</div>
Could it be here:
$args2 = array(
'post_type' => 'post',
'posts_per_page' => 10,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 2),
);
Thank you very much. This is my website in case you want to check what I mean: www.wha2wear.com
]]><?php /*
Template Name: Archive Page
*/ ?>
<?php define('WP_USE_THEMES', true); get_header(); ?>
<div class="archivepage">
<div id="all-wrap">
<div id="contentarea" class="clearhere">
<h1><?php echo ucwords($pagename);?> Archive</h1>
<?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
<div class="navigation ntop">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3><a href="<?php the_permalink();?>"><?php the_title(); ?></a></h3>
<h4><?php the_date();?></h4>
<p class="post-text">
<?php the_content();?>
</p>
<p class="postmetadata alignright">
<?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</p>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<div class="navigation nbottom">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<p style="clear: both;"></p>
</div>
</div><!-- end all-wrap-->
</div>
<?php get_footer(); ?>
I also tried
<?php previous_posts_link('Newer Entries »',$in_same_term = false) ?>
but it did nothing different.
Thanks for any help.
]]><div id="content1">
<div id="content">
<div class="posts_over">
<?php $my_query = new WP_Query('showposts=7'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<div class="posts">
<div class="date"><?php the_time('M d Y'); ?></div>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="post-content1">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
<?php the_content('<div class="continue">Click to read the rest of the post »</div>'); ?>
<?php wp_link_pages(); ?>
</div>
</div>
<?php endwhile; ?>
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
</div>
<?php get_sidebar(); ?>
The website is: https://www.grandmashousediy.com. Thank you so much guys I promise no one is any more sorry then me that I’m an idiot when it comes to PHP.
]]>The Older entries link at the bottom of my home page is now in a loop, bringing me to page 2 but displaying the same posts as page 1. Also, the older entries link on page 2 directs to page 2 when it should be page 3.
Here’s the code on my .php page
global $wp_query, $suffusion_unified_options, $page_of_posts;
foreach ($suffusion_unified_options as $id => $value) {
$$id = $value;
}
$page_of_posts = true;
get_header();
$paged = get_query_var('paged');
if (!isset($paged) || empty($paged)) {
$paged = 1;
}
//$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$category_exclusive = get_post_meta($posts[0]->ID, 'category', true );
if( $category_exclusive )
{
$cat = get_cat_ID($category_exclusive);
$args = array(
'category__in' => array( $cat ),
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged,
);
}
else
{
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged,
);
}
$temp = $wp_query; // assign original query to temp variable for later use
//$wp_query = null; // Resetting this to null was causing a PHP Notice to pop up
$wp_query = new WP_Query($args);
suffusion_query_posts();
?>
website is https://www.fredericsanchez.com
It only does it on this particuliar page, not the others.
Any idea what’s wrong ? Thanks a lot.
]]>Is there a fix for this problem?
My website: https://people.cis.ksu.edu/~janovsky/
Thank you!
I have set up static page on my blog.
I much better prefer the static version instead of latest blog homepage because of all the carousel and siderbars option.
But I would like to have older posts link at the bottom of the 8 last posts and I don’t know to add it.
Even when I change the homepage to be “latest posts” page there is no “older posts” link at the bottom of the page.
https://mamainspiruje.pl/
Please help
]]>https://www.jeffsreviews.com/
Code for page navigation is:
<div class=”navigation”>
<div class=”previous”><?php next_posts_link( __( ‘‹ Older posts’, ‘responsive’ ), $wp_query->max_num_pages ); ?></div>
<div class=”next”><?php previous_posts_link( __( ‘Newer posts ›’, ‘responsive’ ), $wp_query->max_num_pages ); ?></div>
</div><!– end of .navigation –>
<?php
endif;
For the life of me, can’t find where to do this in the css. Can you
help me?
Thanks!
Lissi
Thank you.
]]>