In using a few select templates from GoGoThemes, I’ve developed quite the headache fixing the code that controls the Theme Options menus in the backend of WordPress. If you’re using a GoGoTheme and you’re having issues with Theme Options, then this is for you.
The first thing you may notice is that your pretty tabs in Theme Options just don’t function — aside from the HTML throwing around 90 validation errors, the main issue is the way that pages are being selected from the database — the current method used either returns –1 for the ID or returns nothing and breaks entirely. To solve this issue, follow the steps below:
Find:
foreach(get_pages() as $id) { $page = get_page($id)
Replace With:
foreach(get_pages() as $id) { $page = get_page($id->ID)
Just below that, you’ll see a line looking something like this:
echo $id; ?>">selected="selected">post_title; ?>
Your objective here is going to be to replace
$id
With:
$id->ID
And fortunately, you’ll have to follow these steps for each tab, replacing, of course, ‘team_page’, with the appropriate title.
Good stuff.