Topic RSS
11:58 am
4 October, 2011
OfflineRecently, our church started using a WP Custom Menu for navigation, and have our podcast (sermons) page within the nav menu.
This adds an entry to the wp_posts table, with a post type of "nav_menu_item"
Unfortunately, this was causing the the sermon links to be displayed incorrectly.
The fix, is to exclude nav_menu_items from the mysql query that the sb_get_page_id() function uses:
."(post_content LIKE '%[%' OR post_content LIKE '%[%')"
."AND (post_status = 'publish' OR post_status = 'private')"
."AND post_date < NOW()"
."AND post_type != 'nav_menu_item'"
."AND post_type != 'revision';"
I have a patch if you'd like it.
-Neal
Most Users Ever Online: 40
Currently Online:
18 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
malpan: 2453
jogen: 2440
VanWatterson: 652
GeraldSebring: 364
LucasWoltman: 362
RandellFeenstra: 362
Member Stats:
Guest Posters: 7
Members: 2062
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1071
Posts: 4042
Newest Members: richdorm, Aaron Velasquez, aaronv, dave5884, tomduckering, ccwebb
Moderators: Ben Miller (386)
Administrators: Mark Barnes (425)
Log In
Register
Home



