• First off, amazing plugin. But I may have found a possible glitch.

    I have a bunch of projects (Custom Post Type) That each have a Custom Taxonomy. I have about 8 Terms in the Custom Taxonomy. Set up exactly like Categories to a post.

    The idea is that they can just keep clicking “Next Project” and they will just view the next project with the same category. It works perfectly on all categories except for one. Doesn’t matter which category, as long as it’s the last published project. Then, instead of looping back to the first project in that category, it loops back to the earliest published project no matter what category it’s in.

    What am I missing? You can see this in action here and just click the next project link.

    (i know i mixed up “category” and my custom tax, but i’m sure you get the idea.)

    http://wordpress.org/plugins/ambrosite-nextprevious-post-link-plus/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ambrosite

    (@ambrosite)

    Which options are you using? Please post your code here so I can see how the parameters are set.

    Thread Starter Overflow

    (@acrane)

    Thanks. I’ve tried to play around with a few parameters, but this is the current version. (Some are commented out)

    <?php  next_post_link_plus( array(
    
    	'order_by' => 'post_date',
    	/*'order_2nd' => 'post_date',*/
    	'meta_key' => '',
    	'post_type' => '',
    	'loop' => true,
    	'end_post' => false,
    	'thumb' => false,
    	'max_length' => 0,
    	'format' => '%link &raquo;',
    	'link' => 'Next Project',
    	'date_format' => '',
    	'tooltip' => '%title',
    	'in_same_cat' => true,
    	'in_same_tax' => true,
    	/*'in_same_format' => false,
    	'in_same_author' => false,
    	'in_same_meta' => false,*/
    	'ex_cats' => '',
    	/*'ex_cats_method' => 'weak',*/
    	'in_cats' => '',
    	'ex_posts' => '',
    	'in_posts' => '',
    	'before' => '',
    	'after' => '',
    	'num_results' => 1,
    	'return' => ''
    
               ) ); ?>
    Plugin Author ambrosite

    (@ambrosite)

    Any particular reason why you have both in_same_cat and in_same_tax set to true? If you are using a custom taxonomy then just use in_same_tax. You could also try passing the name of your custom taxonomy:

    ‘in_same_tax’ => ‘my_taxonomy’

    Thread Starter Overflow

    (@acrane)

    Ok, I got rid of ‘in_same_cat’, no luck.

    Then I tried to set a variable to find the term using
    if (has_term('k-12-education','categories')) {$projDetails = "pro-det-k-12-single"; $myTax = 'k-12-education';}
    ect…ect…

    Then I put the variable in the ‘in_same_tax’ but it didn’t like that because I’m assuming that it’s supposed to receive only a True/False? When I did, I got this error.

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/bwwnet/public_html/optima/wp-content/plugins/next-post-plus/ambrosite-post-link-plus.php on line 114

    Thanks for the help so far. Hope we can figure this out.

    Plugin Author ambrosite

    (@ambrosite)

    The in_same_tax parameter accepts the taxonomy name, not the term name. For example, the standard Category taxonomy is named ‘category’, the standard Tags taxonomy is named ‘post_tag’, and so on. If you are using a plugin to create your custom taxonomies, there should be a field somewhere in the admin that shows you the name.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible bug on the "loop" parameter’ is closed to new replies.