As you can see I copied my main nav and tried to put it in the content section of this page. However, it won’t work. I actually put it in the template and the content section just to see if I could get it to work outside of the header. It is working in the template, but I’d like to get it to work in the content section.
Well, i know that I’m seeing different code in the text section of my wordpress page. I have no idea where to start when the code that I’m entering is totally different than what’s being output…?
Check the template where that PHP code resides. I’ll wager it looks exactly like what I posted, except that the character references may just appear as curly quotes (e.g. ‘MainNavigation’).
If nothing else, delete those quote marks and retype them with single quotes.
Ah, that might be a clue to the problem. The system doesn’t recognize it as PHP, possibly because there is no gap between the closing ?> and what comes before it.
I’m saying maybe if I post it afresh then maybe others will view it and have a solution. I’m really stumped on why I can’t get this to work because I’ve done it on other websites.
In a situation like that, I go through the working version with a fine too comb and compare it with the non-working version until I find the critical difference.