jmwhite19
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Multiple arguments for $query->set()?Its actually related to this post:
http://ww.wp.xz.cn/support/topic/wordpress-34-broke-my-paginaton-setup
However its now been solved with a very nice function kindly crafted by keesiemeijer
Forum: Themes and Templates
In reply to: WordPress 3.4 broke my paginaton setupWow, your awesome! Your function works great. Just tested it out. Sticky post stays on top and all other posts paginate to one each page correctly.
I cannot thank you enough! Hopefully your code can help others as well as me. I know the previous function for just limiting to one post has helped several others already!
Thanks again!
Forum: Themes and Templates
In reply to: WordPress 3.4 broke my paginaton setupAny chance this can modified to work with sticky posts?
I was thinking if it would be possible to use this code to display one post per page (as is now) but if a sticky post is set, display that post on the frontpage first and then pagination every other post?
What would be the best approach to this? Modify the function or write some conditionals in the index.php?
Forum: Themes and Templates
In reply to: WordPress 3.4 broke my paginaton setupThanks! That worked great, I downgraded back to 3.3.2, so I need to upgrade again and confirm. Looks promising though!
Edit: Works well in 3.4. Thanks again!
Forum: Fixing WordPress
In reply to: Have pagination limited to 1 post per pageActually turns out I was trying to use the pagination code outside of the loop hence the strange pagination behavior. The code above works fine.
Forum: Fixing WordPress
In reply to: Modifying the behaviour of the WordPress Menu statesGot it. For a fallback class (in a way) you can use Conditional tags e.g.
<li <?php if (is_home() || is_search()){echo 'class="current_page_item"';}?>><a>/">Home</a>This means if a page that doesn’t have a link on the nav, the home tab can be given the active state. In the above example, this includes the search page. You can use as many as required.
Forum: Fixing WordPress
In reply to: Modifying the behaviour of the WordPress Menu statesThe only thing I’d like to do now is add a fallback selected state if a certain request like the search page is made and no state is present on any of the nav links.
Forum: Fixing WordPress
In reply to: Modifying the behaviour of the WordPress Menu statesI managed to find a solution to my situation.
Basically I’ve learnt the WordPress Menu Feature with wp_nav_menu() is limited in respect to what I was after. Instead what can be done if you write the general nav structure manually and use wp_list_categories() and wp_list_pages() to display the required pages and categories on the nav.
I came across this great post which details how to do it:
On its own this method works well for pages. However for posts themselves to have its parent category active on the menu you need a plugin and need to modify it slightly. Again this is all detailed in the link above, but it works well.