Forums › Forums › Templates and themes › The $post variable
- This topic has 11 replies, 2 voices, and was last updated 15 years, 7 months ago by imported_Ryan.
-
AuthorPosts
-
April 13, 2009 at 1:12 pm #750JoeyJoeJoeMember
Hi guys, I’ve been playing with generator and it’s a great tool (thank you!), the resulting themes has caused an issue with a plugin I use and it seems the problem lies with the $post variable.
I use the NavXT breadcrumbs because I like the tunability but when using with a generated theme, I get an error which is actually number one in their FAQ and I’d appreciate your thoughts on it.
Quote:This is caused by a secondary loop in your theme which is not behaving “nicelyâ€ÂApril 13, 2009 at 2:42 pm #5875imported_RyanMemberHi,
Yeah, I’m not surprised they clash with each other. The breadcrumb XT plugin code (where the NavXT plugin came from) has been incorporated into the template generated themes. If you look through the functions.php file it should be fairly obvious where the breadcrumb code is. If you delete it then your problem should be solved (hopefully).If that doesn’t work then you may need to remove the following code from throughout your theme:
[code:3htlh6y7]<div class="breadcrumbs"><?php if (class_exists(‘breadcrumb_navigation_xt’)) {echo ‘Browse > ‘;$mybreadcrumb = new breadcrumb_navigation_xt;$mybreadcrumb->opt[’title_blog’] = ‘Home’;$mybreadcrumb->opt[’separator’] = ‘ / ‘;$mybreadcrumb->opt[’singleblogpost_category_display’] = true;$mybreadcrumb->display();} ?></div>
[/code:3htlh6y7]April 13, 2009 at 3:40 pm #5876JoeyJoeJoeMemberHi Ryan,
Thanks for the speedy response ” title=”Smiley” />
I did look in functions last night and couldn’t see anything so my first thought was – wasn’t that obvious to me! So I downloaded a vanilla copy of the theme and the functions.php is about twice the size (presumably because I unchecked the bc option when I was generating) and yes, the bc code was obvious!
So I didn’t have the functions in the first place and I’ve now removed all the instances of the line mentioned and still get the same results.
April 15, 2009 at 3:42 pm #5877JoeyJoeJoeMemberI’ve tried other breadcrumb plugins now and they all behave the same way with the generated theme but are OK in other themes.
I’ve deactivated the NavXT plugin, downloaded a brand new pixopoint generated theme with breadcrumbs turned on (no other changes) and still get this behaviour so I can’t even get breadcrumbs to work when using all geek.hellyer.kiwiponents.
Any other suggestions?
April 16, 2009 at 10:37 am #5878imported_RyanMemberCould you attach your theme here? I’d like to have a quick flick to see what is causing it. I thought the code I suggested removing above would fix it but I’ve obviously missed something I guess.
I should have time to look at this in about 36 hours time, so if you attach it to a post by then I should be able to have a look at it for you.
April 16, 2009 at 10:46 am #5879JoeyJoeJoeMemberThank you. Just when you get a chance would be good, just flagging the issue really, maybe I’m the only one using BCs??
Here’s a copy of the fresh theme that does it. (Only option set in the generator was breadcrumbs.)
April 18, 2009 at 3:31 am #5880imported_RyanMemberHi,
The Breadcrumb Navigation XT code is still in the functions.php file. You need to remove ALL instances of that or you will keep running into problems.April 18, 2009 at 9:12 am #5881JoeyJoeJoeMemberAs I said, that’s the fresh one with the pixopoint bc enabled, even that doesn’t work as expected and each post has a bc link to the same post.
here is my functions.php from the generated theme with bc disabled that behaves in the same way.
This is how it was produced.As the issue is the same with a fresh theme as well as an edited one, is it possible the issue comes from elsewhere with the $post variable as suggested by the NavXT author?
Thanks for your help.
April 18, 2009 at 10:12 am #5882imported_RyanMemberHi,
It definitely will not work with a fresh theme. I need to see the theme you have been trying to use after removing the code I suggested removing.April 18, 2009 at 10:21 am #5883JoeyJoeJoeMemberOK, here’s the theme as downloaded with the lines removed.
Did you use the fresh theme with it’s in built BCs? They don’t work either.
April 19, 2009 at 1:59 am #5884imported_RyanMemberThe theme you attached didn’t work at all. You had white space before the initial <?php in the functions.php file.
April 19, 2009 at 2:04 am #5885imported_RyanMemberI can’t see any problems. The theme you attached seems to work fine with the NavXT plugin. What specifically is wrong with it?
I’ve attached the theme modifications I did to get it work (only works on the home and single pages so far).
-
AuthorPosts
- You must be logged in to reply to this topic.