AndySpartan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Permalink displays URL twiceIn General Settings, is the Site URL entered correctly and not duplicated?
Forum: Themes and Templates
In reply to: Using jQuery's $.post on template pagesThis is a server side issue, not client side. Thanks though.
Forum: Themes and Templates
In reply to: wp_enqueue_script with add_action('init')Ok I posted too soon, just found out how to do it if anybody else is interested..instead of hooking on to init just hook on to wp_head like so:
add_action('wp_head','the_quote_files',0);Forum: Themes and Templates
In reply to: using is_page and is_category with wp_get_nav_menu_itemsHi Zoe, thanks for your reply. I have used wp_nav_menu in the past but found it quite limiting when trying to do a few bespoke things my designer likes to put in
The home page is a static page with an ID of 4, and the category also has an ID of 4. I’ve been doing some playing around and I’ve sussed it 🙂
Each nav item object contains an ‘object’ member which is either ‘page’ ‘post’ or ‘category’ – So my logic statement is now:
<?php if( ( ($item->object == 'page') && (is_page($item->object_id)) ) || ( ($item->object == 'category') && (is_category($item->object_id)) ) ) $cur = true; ?>Thanks for your help!