dave_t
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [2.5] wp_list_pages “exclude” arg no longer works as advertisedhey all
I just upgraded to WP 2.5.1, and it appears that wp_list_pages is behaving as expected again, without the need for the fix outlined by turtlerabbit above.
I didn’t see the relevant support ticket (#6510) addressed specifically in the list of fixes, but one of the other fixes must have done the trick for this too…
Forum: Fixing WordPress
In reply to: [2.5] wp_list_pages “exclude” arg no longer works as advertisedThanks turtlerabbit! Good temporary fix. Just need to watch out for auto upgrades now…
Just for completeness if anyone’s searching, this bug also affects wp_list_pages handling of private or hidden pages, not just those specified by exclude.
In my case, wp_list_pages was not listing the private pages themselves, but would list all their (non-private) children (non-indented) at the top level of the li hierarchy. Potentially disastrous for anyone relying on this to rapidly hide whole site sections eg areas in development.
Forum: Themes and Templates
In reply to: Calling whatever variable is assigned to a Page Templatemfields, reckon you could scoot on over to the other thread these guys have got going and post your advice there? it seems to be the more current thread… i’m new here, so not sure about the etiquette of dual threads etc, but hey, if it helps anyone…
Forum: Fixing WordPress
In reply to: Header Includeshey guys, check the thread you have going here, mfields has posted a (possible) solution… I’m doing something similar with is_page_template. if you do wanna use is_page_template(), make sure you pass it the template filename, not the name you assign it within that file. eg use
is_page_template('page-about.php')
notis_page_template('about')
. The is_page_template() function lives in ‘wp-includes/post-template.php’ in your WP2.5 install. If you wanna test how this works, put the following in your sidebar: `<php
/* test page template */
if (is_page_template(‘page-home.php’)) {
echo (‘<h2>Home template</h2>’);
} else {
$custom_fields = get_post_custom_values(‘_wp_page_template’,$post->ID);
$page_template = $custom_fields[0];
echo (‘<h2>’ .$page_template. ‘</h2>’);
}
?>` (i grabbed the second half of this directly from the post-template.php include, so if you’re running WP2.3, maybe see if you can manually retrieve the current page template using the ‘_wp_page_template’ call as above? )Forum: Themes and Templates
In reply to: Calling whatever variable is assigned to a Page Templateok, i’ve got is_page_template() working – you need to pass it the file-name, not the template name you assign within that file (contrary to the documentation on conditionals). I noticed you guys have got another thread going here, so will reply there too, in case it helps.
Forum: Themes and Templates
In reply to: Calling whatever variable is assigned to a Page Templatehey guys
I’m trying to do something similar… nathan, are you calling your header (get_header) before or after you set your variable? Is it a case of making it global (egglobal $section = ''
)? (Note: I’m no php-er, just a designer struggling with the same issue by trial and error.)
I’ve been trying to use the is_page_template() conditional, but can’t seem to get it to work. Has anyone successfully used this? Does anyone know for sure it’s been included in 2.5?This might be a bit late, but I think what Whoami was trying to tell you was to use a relative path starting from the web-root to your theme folder. You mentioned an absolute path that doesn’t go all the way out to ‘http/’ – the following works for me:
<link rel="stylesheet" href="wp-content/themes/my_theme/my_style.css" type="text/css" media="screen" />