alanft
Forum Replies Created
-
i googled ‘wpsc_product’ and found http://wordpress.org/extend/plugins/wp-e-commerce/, is that the plugin you are using? There’s not much to go on there, so I don’t know what specific template tags they provide, sorry.
You could target the URL which I think widget context does easily. YOu can do it with widget logic too, but I don’t have any ‘ready to go’ code for you, sorry.
Forum: Fixing WordPress
In reply to: Make widgets show up on particular pagesfor widget logic, if you mean wordpress pages, the main multi-page example on http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
is_page( array( 42, 'about-me', 'About Me And Joe' ) )does the trick, you can give a list of IDs, slugs or page names
there are 2 possibilities that i can think of, one is that your widget logic code uses functions that are not yet loaded (say functions defined in your theme’s functions.php. I’m working on a solution for that.
the other is that your widget logic code has changed a little. the “unexpected ‘)’ ” message does make it sound like it’s worth checking your WL code for accidental changes, like an extra bracket somewhere.
global $post; return is_single() && get_post_meta($post->ID, 'locations', true)=='naples';should show a widget for posts with ‘naples’ in the locations custom field.
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Date before TitleI’m sorry, it’s not clear to me what you are talking about. i googled both those terms and I found
http://wordpress.org/extend/plugins/category-posts/screenshots/
is that what you are talking about? If so, looking at the code of that widget it looks like you may be after a content_filter to alter the HTML it outputs. The PHP looks like it makes something like
<li class="cat-post-item"><a class="post-title" β¦></a>β¦<p class="post-date">date_shown_here</p>β¦</li>if you can give me some real world examples I can suggest some PHP text manipulation that would move the post-date <p> in front of the post-title
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Date before Titlewhich date, before which title – a widget’s title?
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Shopping Cart Widget Fatal Errorapologies for the lack of update. this ‘late loading’ will come soon, but it has turned into a few weeks π
what specific page would you like to prevent the widget appearing on?
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Conditional based on user agent?this might help:
(i did address this in your post on our main site)
it is common for a theme to have default text when there are no widgets, and in this case the βThis is the Primary Sidebar Widget Areaβ¦β text is that default text.
WL used to only hide widgets, and now it removes them altogether, so themes that have default text when there are no widgets now show. You can either edit the theme to remove the default text, or add a default text widget that’s always present but has no content.
Forum: Plugins
In reply to: Widget Logic / Widget Context replacing callbacki already committed this, and the latest stable version is v.51 out now. is_active_sidebar works properly and it has a much reduced callback interception that is only active when the content filter is used too.
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Shopping Cart Widget Fatal ErrorGreat stuff thanks. Expect something within a few days (rather than hours or weeks)
By default it actually intercepts widgets when all plugins are activated, ie BEFORE they widgets_init is called, though it doesn’t run the WL code of course. This is the early load. Choosing the ‘late load’ point it would make sense to wait until the ‘coast is clear’ which is wp_loaded after all code, themes, widgets, etc etc are ready and we’re poised to make an actual page.
I’ll be back in touch here. cheers
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Shopping Cart Widget Fatal Errorok, my diagnosis, but no actual solution YET. (it’s late here)
WL used to only intercept widgets after wp_head action, #22 in the ‘typical’ actions run:
http://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_a_Typical_Request
and your cart plugin sets up the class at init (#9), so no problem
but since the big change in v.50, WL puts in the interception way earlier – when the plugins are all activated (#2). and what I reckon is happening is that your theme (setup around #6) is calling wp_get_sidebars_widgets for something, which will then test for the existence of widgets and thereby triggering the WL code that references your class that hasn’t been called yet.
(I took out the reliance on wp_head because it seemed cleaner to do it the new way, esp as the old way often fell foul of themes that neglected to have a wp_head.)
I can totally see that putting in the interception early is going to mess up using theme-based functions in WL text, so I need to make it delay til after themes are loaded (or at least provide that option).
Looking down the list of actions init and wp_loaded seem to be the best candidates, and if I went with wp_loaded that would mean your plugin (which adds the class at init before wp_loaded) would work ok.
One request I got for the old version of WL was to make wp_get_sidebars_widgets work properly so themes could decide what to do with an empty sidebar. So I think I’m going to have to offer this as another option ‘late or early’ (before or after theme load) loading of the widget logic.
I’ll try to whip this up in the dev version, and when I do, I’d be obliged if you could feedback on whether it’s helped.
Cheers, A
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Shopping Cart Widget Fatal Errorit must be to do with the class Cart66Session which a quick google suggests might be from this plugin
http://wordpress.org/extend/plugins/cart66-lite/
so some interaction there is causing that plugin not to load the class when it was with the old widget logic technique. That’s going to be a tall order to troubleshoot TBH
I’ll give it a go though, and get back to you.