alanft
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] Invoke Widget Logic Programaticallyah, i get you. ok so the main params for widget logic can be retrieved from the ‘widget_logic’ option, manipulated and then updated like this…
$wl_options=get_option('widget_logic'); …[do stuff to the wl_options hash]… update_option('widget_logic', $wl_options);The keys of the hash are the widget IDs, the values are the widget logic text. Take care that you control the widget logic text – as it will get EVAL’d.
Forum: Plugins
In reply to: [Widget Logic] Syntax Error causing Server Error/Warningcheers. any idea why that line causes an error? It looks innocuous. The semi-colons all look ok – I think.
Forum: Plugins
In reply to: [Widget Logic] Invoke Widget Logic ProgramaticallyIf get_post_type()==’event’ is the logic you need (and it looks good to me), put it in the calendar widget’s widget logic text field and see what you get
Forum: Plugins
In reply to: [Widget Logic] how to make this work with business listing categoriesthat appears to be a premium theme, so it’s not going to be clear how their code works. do they have a support forum?
Forum: Plugins
In reply to: [Widget Logic] How to display on several specific pages?see the issue with is_page on the FAQ first
http://wordpress.org/plugins/widget-logic/faq/Then, given all that, the is_page codex page does list the sort of example involving array (not is_array) that would do what you want
http://codex.wordpress.org/Function_Reference/is_page#Cannot_Be_Used_Inside_The_LoopForum: Plugins
In reply to: [Widget Logic] how to make this work with business listing categorieswhat’s a business listing category in wordpress terms?
Forum: Plugins
In reply to: [Widget Logic] IF logic with Widget Logicjust leave out the “if” and
global $woocommerce; return ( $woocommerce->cart->cart_contents_count!==0 );or “==0” depending on how you want it to work. So long as your Widget Logic code returns true, the widget will appear. Two notes:
1) i added a $ in the global
2) i’m not entirely sure you can do $object->propertyX->propertyY directly.Forum: Plugins
In reply to: [Widget Logic] Twitter feed broken with Widget Logictry changing the “load logic” setting to see if that makes a difference. i tried the jetpack twitter widget and it works ok with WL on my install, so something else is going on. can you point me at a page that works OK and one that doesn’t and I might be able to discern the difference in the HTML of the pages
Forum: Plugins
In reply to: [Relocate Upload] Current status of this plugin?Forum: Plugins
In reply to: [Relocate Upload] Current status of this plugin?There, in the development version now if anyone wants to try it, and then we can crack on any functionality I’ve missed that still needs tweaking
Forum: Plugins
In reply to: [Relocate Upload] Current status of this plugin?With the code change linked above and a touch more changes in the “function(data)…” to tidy up some JS errors (and a corresponding failure to update the page) I can get it to work more or less as I recall it.
The odd path mentioned by GermanKiwi was a lingering problem that afflicted the code even back in the day, or at least so I recall, and was meant to be patched by the last block of code starting add_filter( ‘wp_get_attachment_url’…
I’m just re-isntalled SVN and then I’ll commit the development version with what works for me, minus that last problem. Which is a start.
Forum: Plugins
In reply to: [Widget Logic] Custom conditioning and some ideasyou could certainly use get_post_type
http://codex.wordpress.org/Function_Reference/get_post_type
with some code like
global $post; return (get_post_type( $post )=='my_post_type_x');Forum: Plugins
In reply to: [Widget Logic] Widget Logic just plain does not work@mkolber, if that page is your main page the is_page probably won’t work, you may need one of these
http://codex.wordpress.org/Conditional_Tags#The_Main_Page
(note also the note re is_page in the FAQ http://wordpress.org/plugins/widget-logic/faq/ in case that’s not it.)
Forum: Plugins
In reply to: [Widget Logic] Issue with bbpressI don’t know bbpress all that well, but you might find all sorts of useful stuff here…
http://bbpress.trac.wordpress.org/browser/trunk/includes/common/template-tags.phpand this might be what you are after
Check if current page is a bbPress topic function bbp_is_topic( $post_id = 0 )…Forum: Plugins
In reply to: [Widget Logic] Modify text in a text widget?your latter option is going to be WAY less prone to breaking in revisions of code and just easier to setup.
WL *could* do what you say – the ‘widget_content’ filter is there to do things like this, take the content of a widget and change it, but I’m not even sure if it steps in before shortcodes are then expanded. I’m going to actually have a look into this anyway as you’ve brought the possibility up!