alanft
Forum Replies Created
-
You should definitely be on 0.56 with WP 3.5, but there was a change in WP3.5 on a few functions.
It is likely you have widgets using the WP function get_post_ancestors as the 2nd param of in_array. This produces the “Wrong datatype for second argument” error when get_post_ancestors returns false.
You will have to adapt your code slightly eg from
global $post; return (in_array(77,get_post_ancestors($post)));
to
global $post; return ($post) && (in_array(77,get_post_ancestors($post)));
which returns false as soon as $post is false before trying the second half of the function.
Forum: Plugins
In reply to: [Widget Logic] Widget will only display on certain pageswidget logic will only let you restrict even more where widgets appear.
if you have widgets not appearing on pages you are expecting them on, are you sure they have sidebars, and quite sure you’ve added widgets to the specific sidebar they show?
Forum: Plugins
In reply to: [Widget Logic] Widget on portfolio pagehave you tried is_page with the reset_query fix as described in that FAQ section?
Forum: Plugins
In reply to: [Widget Logic] Widget on portfolio pageyou could use the is_page or the is_page_template conditional tag…
http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
http://codex.wordpress.org/Conditional_Tags#Is_a_Page_Templatebut note the FAQ section about is_page
Forum: Plugins
In reply to: [Widget Logic] On a page templateForum: Plugins
In reply to: [Widget Logic] Replace widget tile to an image…If you are confident enough writing a filter, Widget Logic has the ‘widget_content’ filter. See the notes at the bottom of this page for some examples
http://wordpress.org/extend/plugins/widget-logic/other_notes/
Forum: Plugins
In reply to: [Widget Logic] Warning Error 161well i wasn’t convinced that the default return was true – i was grasping a bit there.
sorry, I don’t know what more the problem can be – you could try troubleshooting using a PHP widget that uses print_r to print out the array returned by get_post_ancestors which would help work out where things are going awry
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] The combination of Conditional Tagswhat I did add to the FAQ was that there are issues with using is_page() that are detailed here
http://codex.wordpress.org/Function_Reference/is_page#Cannot_Be_Used_Inside_The_Loop
Forum: Plugins
In reply to: [Widget Logic] problem in wp 3.5what version of WL are you on?
Forum: Plugins
In reply to: [Widget Logic] Warning Error 161There are 2 problems I can see. One is the ! which is saying if $post is NOT in the list of ancestors. The other is that you’ve left it open what’s returned when your ‘if’ is not true – perhaps the default is true, hence this statement could always return true.
Try
global $post; return ( ($post) && in_array(112,get_post_ancestors($post)));
Forum: Plugins
In reply to: [Widget Logic] Widgets won't expand in admin to display settingsi think you must be talking about Widget Logic Visual
Forum: Plugins
In reply to: [Widget Logic] Widgets won't expand in admin to display settingsi’m not clear which fix, or do you just mean the latest WL update?
do you mean that on one site you can edit widgets but not change the order through drag and drop? this sounds like it might have nothing to do with WL, but have you tried ‘Enable accessibility mode’ under screen options in the widgets admin page, that might fix whatever is going on there.
Forum: Plugins
In reply to: [Widget Logic] Prob with showing in category and category postsdoes in_category(‘travel’) work? so that when you are on a single post that it’s in that category you see it, but a single post not in that category you don’t.
Forum: Plugins
In reply to: [Widget Logic] 0.56 Warning in array ()duplicate query I think, see other thread
Forum: Plugins
In reply to: [Widget Logic] Warning Error 161get_post_ancestors changed subtly in WP3.5
see the suggestions here
http://wordpress.org/support/topic/upgrade-error-in_array-expects-parameter-2-to-be-array
Note to self to add this to the FAQ