Thread Starter
Claude
(@claudelostmyths)
For example, tried copying the full code found at:
http://plugins.trac.wordpress.org/browser/smarter-navigation/trunk/template-tags.php
and I got this error message:
Fatal error: Cannot redeclare previous_post_smart() (previously declared in /home/*******/public_html/******/wp-content/plugins/smarter-navigation/template-tags.php:5) in /home/*******/public_html/******/wp-content/themes/calotropis/includes/template.php
I did not get this error message when I put the simpler code:
<div class=”nav-previous”><?php previous_post_smart(‘« %link’, ‘%title’, true, true); ?></div>
<div class=”nav-next”><?php next_post_smart(‘%link »’, ‘%title’, true, true); ?></div> — but I really need the get_referrer_category() function. That’s why I’m getting this plugin. I really hope I can make it work!
Thank you.
Hi Claude,
I had the same issue, tried lots of code combinations, and finally found out, it is a javascript on my site which prevented this fine plug-in to be working with multiple categories assigned, too.
I found out by having a look into the content of the cookies set by this plugin. The content of cookie “smarter navigation[url]” always ended with dummy.css.
I thought: this might be confusing to “smarter navigation”, as I had red on some other forum topic that javascripts may prevent smarter navigation from working properly.
So I figured out that this “dummy.css” came with a javascript, and did disable this one. From that moment everything worked fine.
Another thing: You don’t have to call ‘get_referrer_url()’ explicitely or place it somewhere in your theme. This function is defined inside template-tags.php, and template-tags.php is included in main.php.
Hope this helpes, and please correct me, if I was mistaken.
Plugin Author
scribu
(@scribu)
Sabeth: +1 for a great answer.