Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Instead of using wp_query variables which are all set to their expected values doesnt make any sense. WP still uses “Blog pages show at most” value taken from reading pane to generate 404s …

    it was silly … Instead of using wp_query variables which are all set to their expected values, WP still uses “Blog pages show at most” value taken from reading pane to generate 404s …

    Mark, first of all thanks for ur kind reply …

    I didnt mention it ; but I have tried category templates before …
    BTW, I am in degub mode at the moment, and it becomes clear for me to see everything in index.php for a while.

    If I can make pagination work and do not produce 404 errors, I will make the code more efficient with category templates. But for a while category templates issue doesnt make any sense.

    For example ; I have only one category with ID 3 and 40 posts in it. So, logically when I set a posts per page limit of 5 for wp_query variable, and use a conditional tag in index.php to show all posts from category 3, there has to be 8 pages …

    wp_query max_num_pages variable returns value of 8, which is theorically true for my case, so my custom pagination function returns page numbers from 1 to 8 as expected …

    So ; up to this point … $posts_per_page, $paged and $max_num_pages variables acts as expected, and custom pagination function which also generates page listing with these query variables works as expected too …

    Here … The problem comes out …
    I have 8 pages of posts grouped by 5, with page numbers from 1 to 8. Everything went OK until I navigate to page 5. Page 5 redirects me to 404.php. And also wp_title generates a 404 too. Instead of using wp_query variables which are all set to their expected values doesnt make any sense. WP still uses “Blog pages show at most” value taken from reading pane to generate 404s …

    So when I click over page 5, (which shouldnt exist there due to the limit in reading pane (40/10 = 4)) it generates a 404.

    What if there is no 404 template ; EVERYTHING works fine except the wp_title errors which are not so SEO Friendly.

    So this is the situation …
    Any ideas are welcome …

    After trying every bit of code about paging bug (I still believe there is a bug …) I am in desperately need of help …

    I will explain situation clearly to make it easy … (Sry for bad english …)

    Scenario
    ==========
    index.php file which have multiple custom queries to show different number of posts for each categories. No Permalink structure and using a custom pagination function in functions.php to make blog paginated.

    index.php code :

    <?php
    
    	$category = $wp_query->get('cat');
    	$tag = $wp_query->get('tag');
    	$paged = ( get_query_var('paged') && get_query_var('paged') > 1 ) ? get_query_var('paged') : 1;
    	$maxpage = $wp_query->max_num_pages;
    
    	if ($category == 4) {
        		get_header(); query_posts($query_string.'cat=4&posts_per_page=2&paged='.$paged);
    		} elseif ($category == 3) {
        		get_header(); query_posts($query_string.'cat=3&posts_per_page=5&paged='.$paged);
    		} elseif (!($tag==NULL)) {
        		get_header(); query_posts($query_string.'tag='.$tag.'&posts_per_page=5&paged='.$paged);
    		} else {
        		get_header(); query_posts($query_string.'&posts_per_page=10&paged='.$paged);
    	}
    ?>

    Create a Custom Query for Featured Content …

    <?php
    			$PostCount=0;
    			global $post;
    			$tmp_post = $post;
    			$myposts = get_posts('numberposts=14&category=4');
    			foreach($myposts as $post) :
    			setup_postdata($post);
    			$PostCount++;
    			$Library_Thumbnail=get_post_meta($post->ID,'library_thumb',true);
    		?>

    After the featured content loop, I am using default loop to show category records, and then the output of custom pagination function.

    So, in my case … if a user navigates to category 3, post per page should be limited to 5 which is declared by the conditional tag on top of index.php. So if category 3 has 33 posts ; pagination should return 7 pages.

    Up to here ; everything is normal, but when I navigate to page 5, I got a 404 error …

    I am sure it is the global variable in reading pane of admin panel which causes this error to happen, but I can not make it work.

    I think I have to find a way to bypass the global option, but can not figure out a way to make it happen.

    Commenting out includes.php line 396 do not work out … nor keywords.php line 50 … Error is still there …

    I’ve tried this out with a custom YARPP template and also with defaults, and without a template … but I am still getting this error … I’ve also activated and deactivated excerpt option ; but still no results …

    Warning: strip_tags() expects parameter 1 to be string, array given in C:\xAmpp\xampp\htdocs\homerism\wp-includes\formatting.php  on line 631
    
    No related posts.

    I think I ll switch to WordPress Related Posts by denis for a while … ?? I know this is a great plugin but I ll be getting mad with that error … BTW thx for ur help, I ll be waiting for an update ?? If there is sth I can help u with to solve this issue, I ll be around … ??

    Error is showing up in the div where you place <?php related_posts() ?> in the template file category-??.php or single.php or home.php … wherever u place <?php related_posts() ?>

    Hey,
    I am getting the same error …
    Warning: strip_tags() expects parameter 1 to be string, array given in C:\xAmpp\xampp\htdocs\homerism\wp-includes\formatting.php on line 631
    First I have deactivated and then activated all plugins … As u may guess it was useless … I dont have a solution but I have some clues and want to share them ;
    – I am using Unicode template files encoded with UTF-8 BOM (Some local non-latin chars are used …)
    – I have read an article about the compatibility issues with two-columns plugin. (If there are two columns … it comes custom wordpress queries or loops …)
    – I am using custom wordpress queries(loop), custom wordpress template and also custom yarpp template …
    This is it !
    I hope someone can find a solution as soon as possible ; I dont want to look for another plugin, it has great features … (I hope it has …)

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