View Single Post
Old January 23rd, 2011, 09:40 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902

Originally Posted by lbuilta59 View Post
I tried this and it didn't work.
Here is the error that appears at the top of my home page:

// Filter wp_nav_menu() to add additional links and other output function new_nav_menu_items($items) { $cats = str_replace(array("
"), array("",""), datafeedr_tag('Category List?c=%ci')); $items = $items . $cats; return $items; } add_filter( 'wp_list_pages', 'new_nav_menu_items' ); add_filter( 'wp_nav_menu_primary_items', 'new_nav_menu_items' );

I noticed that it changed the look of my product list items on the home page, though. Even after I delete the code from my functions.php page the front page (actually my entire store!) is still not going back to the correct layout.

Please help!
The reason you were getting that error is because you pasted the PHP code into the file after the final closing php tag: ?>. You can't have PHP code which exists outside of opening <?php and closing ?> php tags.

As for integrating this into your theme, I'm not sure if it's possible. Your theme is calling it's own function to produce the menu UvumiDropdown(). Because your theme has written it's own code to generate the menu, I doubt that it is possible to hook into that function to append the menu with store categories. If your theme was using WordPress functions to generate the menu, it would not be a problem because WordPress provides a method to hook into those functions and modify their output. But most theme developers don't provide those types of hooks so when a theme developer writes their own function, there's usually no way to modify the output.