• Hello all. Pretty unique situation I have going here.
    I have a link but I dont want it to show up in google so please type
    “build” then the word “HAPPY” and then its a “.net”

    so basically I am using wordpress in a very non-traditional way, I display categories that have posts attached to them but I basically made the front page display the 12 newest categories with the posts that belong to them. Because I am doing this I want the older and newer links at the bottom to display the NEXT 12 CATEGORIES. However they were only made to display/work with posts…. anyone know a fix?

    heres my index.php code:

    Code moderated as per the Forum Rules

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Kevin Kwok

    (@queesy)

    hmmm sorry not sure what rule i violated, will look into it
    but heres a link to my code i think that should be ok with the rules
    https://wordpress.pastebin.ca/1788501

    Thread Starter Kevin Kwok

    (@queesy)

    been messing with it for a couple of hours but i cant seem to get this to work

    Hi,

    It seems that it is due to permalink settings problem. Please reset the permalink from wordp[ress admin area with your requirement and add this code in htaccess:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    After that check with old and new posts of your blog.

    Thanks,

    Shane G.

    Thread Starter Kevin Kwok

    (@queesy)

    Does anyone know how I can get this to work? My site contains MANY categories that are basically treated as posts, because I am using wordpress this way the “older” and “newer” post links at the bottom do not work.

    I am looking for a way to alter the code so that when a user clicks older posts it basically displays an older set of categories. is this at all possible?

    Thread Starter Kevin Kwok

    (@queesy)

    I tried downloading page-navi plugin and still cannot get my idea to work properly =(

    i can’t be of help, but I have to say queesy that your website is cool. Nice concept and very cool execution

    Thread Starter Kevin Kwok

    (@queesy)

    Thanks for the kind words mduzair

    Thread Starter Kevin Kwok

    (@queesy)

    I think I got the phrasing down of what I am asking.

    Is there a way to paginate categories? So that each time I click next page it shows the next 12 categories.

    Thread Starter Kevin Kwok

    (@queesy)

    if(isset($_GET['sortby']))
    	$sortby = $_GET['sortby'];
    else
    	$sortby = 'DESC';
    $cat_args = array(
    	'orderby' => 'ID',
    	'order' => $sortby,	// New Code
    	'number' => 12
    	);
    if(is_numeric($_GET['paged']))
    add_filter('post_limits', 'test_limits');
    function test_limits($limits)
    {
    $var = (12 * $_GET['paged']);
    return "{$var}, 12";
    }

    This is the section of code from my index.php

    that basically tells wordpress to display the 12 newest categories in descending order. notice the variable “paged” I think I have to do something here…. to make it so “older posts” link displays the next set of 12 categories, but I’m unsure how right now.

    Thread Starter Kevin Kwok

    (@queesy)

    wheres michael when i need him! =(

    Thread Starter Kevin Kwok

    (@queesy)

    ive been told it requires custom coding…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Older and Newer posts links not working’ is closed to new replies.