Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter joeyw

    (@joeyw)

    please help, anyone..?

    Thread Starter joeyw

    (@joeyw)

    hello david,
    sorry to bother you again,
    but the solution was great till i added more content page (page of posts template)

    at first i used your snippet:

    <?php
    	$wp_query= null;
    	$wp_query = new WP_Query();
    	$wp_query->query('showposts=13'.'&paged='.$paged);
    ?>

    and while i had 1 content page everything was great
    the problem started when i added more content page as i used for my page of posts template the solution suggested here in the forum
    in short the solution suggest is:

    <?php
    $catID = 0;
    if (is_page('contribute')) {
      $catID=6;
    } elseif (is_page('about')) {
      $catID=9;
    }
    
    if ($catID) {
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts("cat=$catID&paged=$paged");
    } ?>

    seems that the snippet make it go crazy as it causing the page to show all posts no matter the category.

    thats how my code look like in short:

    <?php
    /*
    Template Name: PageOfPosts
    */
    get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post-page" id="post-<?php the_ID(); ?>">
    		<h2><?php the_title(); ?></h2>
    			<div class="entry entry_page">
    				<?php the_content('<p class="serif">keep reading &raquo;</p>'); ?>
    
    				<?php wp_link_pages(array('before' => '<p><strong>pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    				<?php edit_post_link('edit', '<br /><p>', '</p>'); ?>
    			</div>
    		</div>
    		<?php endwhile; endif; ?>
    
    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query('showposts=4'.'&paged='.$paged);
    ?>       
    
    <?php
    $catID=0;
    if (is_page('joe'))
    {$catID=4;}
    elseif (is_page('adam'))
    {$catID=18;}
    
    if ($catID) {
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts("cat=$catID&paged=$paged");
    } ?>
    
    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>

    and the complete page of posts template code is here

    can you please help me on this.
    thanks,
    joe.

    Thread Starter joeyw

    (@joeyw)

    hey david,
    marked the other posts as requested “resolved”.
    and i tried to set it in the style.css but it doesn’t workes for me
    all the rtl set’s scrumbled it again.
    you are right when you saying that when update it will overwrite but i don’t know how to resolve it, as now the pagenavi css overide the rtl settings and uses your code.
    i even tried to set it at the end of the style.css for maybe something in the middle overide it but it’s no go.

    thanks,
    joe.

    Thread Starter joeyw

    (@joeyw)

    got an answer here

    Thread Starter joeyw

    (@joeyw)

    done.

    Thread Starter joeyw

    (@joeyw)

    hey david,
    thats do the trick
    simply added your code here to the pagenavi css under wp-content/plugins/wp-pagenavi/pagenavi-css.css.
    thanks a lot.

    joe.

    Thread Starter joeyw

    (@joeyw)

    hey david,
    you rock..!!!
    that’s solved the problem.
    simply added the snippet and waallaa pagination working,
    i don’t know what it do but it’s working.
    thanks a lot.

    i have tried your suggestion on pagenavi it’s cool,
    but can you help me on how to make it work in rtl website since the page numbers going one on top the other..?
    everything is backward as it’s was made to ltr websites.

    thanks,
    joe

    Thread Starter joeyw

    (@joeyw)

    probably i didn’t asked right since nobody is answering.
    i don’t know how to close this post so i’m changing it to not a support question and open a new post with more specific questions.
    hopping i’m not breaking any rules as i’m newbie here.

    Thread Starter joeyw

    (@joeyw)

    hello,
    help anyone..?

    Thread Starter joeyw

    (@joeyw)

    ok, here are the code again with the link to the patebin according to the rules
    https://pastebin.com/4Tv2hK0G

Viewing 10 replies - 1 through 10 (of 10 total)