baysaa
Forum Replies Created
-
I don’t know if you need to mark it as “Resolved” but I’ll just tick the box.
That did it. Brilliant. Now that’s what I call fast support! 🙂
Forum: Plugins
In reply to: [Dynamic Supages] [Plugin: Dynamic Supages] Menu not appearingIt’s quite simple, if you’re using the default “post” type then simply replace the following line:
if(is_home()){with:
if(is_home() || 'post' == get_post_type()){For more conditions check this page.
Forum: Plugins
In reply to: [Dynamic Supages] [Plugin: Dynamic Supages] Menu not appearingWell I guess I should’ve looked at the code first before posting here.
After I posted my original post, I went to look at the code and I found the bug quite quickly. The problem was that when you’re on a posts archive page global $post; was not returning that page’s id, but instead returning the id of the first post on that page. The solution was very simple, just get the id of the page manually. Thanks to http://www.blog.highub.com/cms/wordpress/wordpress-front-page-posts-page-id/ I was able to manually get the page id of posts archive.
So here’s the fix: (Note: not tested on custom post types archive pages)
File:
wp-content/plugins/dynamic-subpages/dynamic-subpages.phpFind:
Should be line 57 on version 1.7.2 of the plugin
global $post;Replace with:
// if blog 'posts' page get $post manually // otherwise use global $post var if(is_home()){ $post = get_post(get_option('page_for_posts')); }else{ global $post; }Baysaa.