alanft
Forum Replies Created
-
Forum: Plugins
In reply to: how to find home page id for different language pagetry
$_GET[‘lang’]==’es’
Forum: Plugins
In reply to: change header image each page with widget logicI don’t think widget logic is what you want really. you could do something like this with widget logic – define lots of widgets and logic for each that says ‘show this widget on page X’. but that’s a bit ’round the houses’, you should try the more direct route that show an image based on the page id – a lot less fussy and easier to admin and change your mind about.
Forum: Plugins
In reply to: [Plugin: Contextual Related Posts] suggested improvementJust to restate this. At some point I updated back to your code and my home page went very slow. I’ve taken out the filter again, and the front page has dropped from 340 queries and 15 seconds, to 90 queries and 4 seconds
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Widget User Interface…if it’s very complex, multiple sidebars might still be the best way to go.
you could i suppose fake a ‘header widget’ by having text widgets with WL ‘false’ (so they never appear) with the title and content used as you like.
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Taxonomy woeshaving just looked into this, I think you need something like
get_post_type()==’book’
see: http://codex.wordpress.org/Conditional_Tags#A_Post_Type
is_post_type_hierarchical and co are just conditional values that apply to the blog as a whole – nothing to do with the individual post/page/view the client is looking at.
but if you look a bit above that bit of the conditional tag page on the codex, there is
http://codex.wordpress.org/Conditional_Tags#A_Post_Type
get_post_type()==’book’
try variations on that.
is_single() && (get_post_type()==’book’)
should work for single posts of that type. It’s not something I’ve experimented with myself. For ‘archive pages for a custom post type’ I’m not sure (I didn’t even know you could do that), but I hope that’s pointed you in the right direction.
Forum: Plugins
In reply to: [Plugin: Widget Logic] WP3.0 Compatibilitystill a small but important % of ppl (4 out of 26) registering WL as not working on WP3 🙁 but I have no leads as to the problem
I have officially updated the site I use to test WL with to 3 and I can report no problems at all as yet.
I’ll give it a week and then do a minor update to the code (I have been given some small changes to add) with an official ‘works with wp3’ tag in the readme.
if before then anyone can help me work through any of the issues they are having with WL on WP3 i’d love to get some more substantial code changes in to help overcome the problems
Forum: Plugins
In reply to: Widget LogicLooks like you were close with your function – but it’s a little off in what it returns for what you are actually trying to do. There are a couple of examples on
http://wordpress.org/extend/plugins/widget-logic/other_notes/
that should work for you though. Something like:
global $post; return (in_array(77,get_post_ancestors($post))); — WP pages are descendents (children, grandchildren etc) of page 77
or
global $post; return ($post->post_parent==”13″); — pages that’s are direct childred of page 13
Yeah, see bluebird2’s reply in the other thread. taxonomy_exists() doesn’t do quite what you are thinking – it will either be true or false all the time, regardless of page displayed
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Widget User Interface…yeah, i’m not really sure what you are asking or what the problem is.
‘I noticed that I have to have one main sidebar area in my widgets panel with all my widgets in it for Widget Logic to work’
This shouldn’t be the case — WL should work with multiple sidebars OK. there is a WL field for each widget in each sidebar.
Forum: Fixing WordPress
In reply to: Widget Logic Helphave you tried switching to a default theme? how about deactivating plugins that provide custom widgets – there might be a clash between how WL manipulates widgets, and how some older widget plugins work.
i’m happy to help, especially as a (small) number of people have said WL is not working on 3 and I’m unable to see a problem on my install – so I’m after some clues as to what the problem might be for other people’s installs.
Thanks for any help you can give.
you could troubleshoot by installing a PHP widget and then in the PHP code in widgets use print_r() to see what’s going on with the various conditions you are using.
eg print_r(in_category(‘1168’))
to see what is getting returned by those tags under those circumstances – chances are some code is getting executed in the theme code after sidebar 1 and 2, but before sidebar 3 that’s resetting various wordpress ‘state’ variables
if you are feeling strong, try looking in the theme code for where the sidebars are invoked, and see if there is any code doing something complex with queries.
Forum: Plugins
In reply to: Widget Logic background color not extending to cover full widget spaceis this really about the Widget Logic plugin, or were you using the phrase more generically? (I can’t see how the problem relates to the plugin)
Try using the logical NOT with things like
!is_home() — which excludes the widget from the home page
!is_authot() — excludes from author pagesetc
http://wordpress.org/extend/plugins/widget-logic/other_notes/
Forum: Plugins
In reply to: widget logic for blogroll links on blog home pageget rid of the X, and one of is_home() or is_front_page() is bound to be what you need