alanft
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] it, well, disappears…i need to see the problem if I’m to find a solution! I tell you what, I’ve not updated to 3.51 yet…
Forum: Plugins
In reply to: [Widget Logic] it, well, disappears…and is it WP3.5?
Although I like to think it’s 2.8+ compatible, they made a change in 3.5 that I hard coded a change for, and in retrospect I should detect the WP version and do what’s right for pre/post 3.5
The upshot for now is that widgets can lose code the first time you hit save (not the second) if you use current WL on pre 3.5WP and older WL on post 3.5WP
if it’s not that, then I don’t have a lot to go on, and can’t think of any troubleshooting steps to help you either. sorry
Forum: Plugins
In reply to: [Widget Logic] it, well, disappears…Are you up to date with the plugin? There was a release that had this bug in some circumstances, but the current one seems to have sorted it.
Forum: Plugins
In reply to: [Widget Logic] Have widget appear in child categoryoh that’s a really good tip using $GLOBALS – that had not occurred to me!
Forum: Plugins
In reply to: [Widget Logic] WP_Debug outputI *think* that’s something to do with the logic in 1 or more widgets, rather than the WL plugin itself. try saving out the WL config, and blanking out some or all the WL code in widgets. (do a test load/restore to make sure you can go back to your orginal setup first)
Forum: Plugins
In reply to: [Widget Logic] get_post_ancestors($post) failing.you need the global $post or they will always return false. that one early widget has “global $post” in it may be enough for the others to work (though I wouldn’t have guessed this would work if you’d asked me), but it’s safest not to depend on it.
Forum: Plugins
In reply to: [Widget Logic] get_post_ancestors($post) failing.You have always needed to start with ‘global $post” when using get_post_ancestors($post)
BUT I need to add the following point to the FAQ…
WordPress 3.5 made a small but important change to the get_post_ancestors function that replies FALSE when $post is not set. So you need to change your code to something like
global $post; return ( ($post) && in_array(86,get_post_ancestors($post)));
which has the effect of returning false when $post is false before even attempting to use get_post_ancestors
Forum: Plugins
In reply to: [Widget Logic] Author Unique SidebarNo, not with widget logic. You need a “context-sensitive” widget. Here’s an outline of how you could do that. (Though this is from old code – I suspect widgets are meant to be setup more sensibly with classes or something these days)
function my_author_bio($args) { global $wp_query, $userdata; extract($args); $author_obj = ($wp_query->post); $author_obj= get_userdata($author_obj->post_author); echo $before_widget . $before_title . "Author Bio" . $after_title; if ($author_obj->user_description) echo $author_obj->user_description; else echo "<p>No biography available.</p>"; echo $after_widget; } register_sidebar_widget('Author Bio','my_author_bio');Forum: Plugins
In reply to: [Widget Logic] No admin settings found…It’s all on the “Appearance > Widgets” admin page
http://wordpress.org/extend/plugins/widget-logic/installation/
“Aside from logic against your widgets, there are three options added to the foot of the widget admin page (see screenshots).”
Forum: Plugins
In reply to: [Widget Logic] timed widgetit should definitely be && (that is ‘AND’) and not || (which is ‘OR’) to work. But if it’s not working then perhaps date_i18n isn’t working as expected on your install, and you’ll have to work out some way of checking what it is doing.
Forum: Plugins
In reply to: [Widget Logic] Widget Logic locks admin widget access with WP 3.5The latest version of Widget Logic is working fine on 3.5. If you mean Widget Logic Visual – that is an entirely different plugin.
Forum: Plugins
In reply to: [Widget Logic] Prob with showing in category and category poststhere’s a note specifically about is_page in the FAQ – check that. But I don’t think you are using is_page appropriately – it’s for ‘page’ style pages, not PAGED pages. it’s a poor choice of WordPress nomenclature.
ISTR that you can find out which page of a category you are on with the global $paged variable. or it might be more complex according to this…
Forum: Plugins
In reply to: [Widget Logic] timed widgettry changing the first bit to
$hour = 0+date_i18n(‘G’)which makes $hour an integer instead of a string so that the second bit works reliably. the other thing to check is to print out date_i18n(‘G’) somewhere (via a PHP widget would work) so you can check what your server thinks is the local time.
Forum: Plugins
In reply to: [Widget Logic] Have widget appear in child categoryI would try using a PHP widget that does something like
global $cat; echo “cat= “.$cat.” term_children=”; print_r( get_term_children( 5, ‘category’))
which will help troubleshoot this.
Forum: Plugins
In reply to: [Widget Logic] Have widget appear in child categoryI’ve just looked at the example code and it’s missing a bit. It should be
global $cat; return (is_category() && in_array($cat, get_term_children( 5, ‘category’)));
try adapting that