alanft
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] How to get widget away from one language version?i googled and WPML should let you do things like
ICL_LANGUAGE_CODE == 'en'as widget logic. try it
Forum: Plugins
In reply to: [Widget Logic] widget disappearswhat about just the single word ‘true’ (no quotes)
Forum: Plugins
In reply to: [Widget Logic] PHP Parse Error Line 286it’s not something insidious. somewhere you have widget logic code that’s got a syntax error in it – probably a stray or missing quote/single quote character
Forum: Plugins
In reply to: [Widget Logic] 'widget_content' filtersorry I made a very basic error in my suggestion. DON’T ECHO what you want displayed, you have to RETURN it.
the function is provided with the variable $content, which is about to be ECHO’d. this function is your chance to change that value and return it.
{ … return "<mytag>".$content."</mytag>"; }Sorry about that – this will have led you astray and made things quite frustrating!
You seem to be getting along fine apart from that, so good luck!
Forum: Plugins
In reply to: [Widget Logic] 'widget_content' filterthe value in the function definition sets a default value for the function, which is the bit between the {curly braces} afterwards. So drop that and just have
function details_wrapper($content, $widget_id) { … your code here }and you’ll have to put in ‘if’ code blocks like this
if ($widget_id=='extended-categories-3') { echo '<details><summary>' }to target specific widgets.
HTH
Forum: Plugins
In reply to: [Widget Logic] show widget for user roleHave a look at http://codex.wordpress.org/Function_Reference/current_user_can and see if it does what you’re after
Forum: Plugins
In reply to: [Widget Logic] 'widget_content' filtera good place to start is to create a functions.php file in a test theme and add the code for the first example filter.
add_filter('widget_content', 'basic_widget_content_filter'); function basic_widget_content_filter($content='') { return $content."<PRE>THIS APPEARS AFTER EVERY WIDGET</PRE>"; }and play with that. However if you simply want every widget in a siderbar to output in a specific way you can probably do that more economically with the sidebar config in the theme.
http://codex.wordpress.org/Function_Reference/register_sidebar
allows you to specify a ‘before_widget’ and ‘after_widget’ if you don’t like the default HTML used
Forum: Plugins
In reply to: [Widget Logic] Code to display all child levels (2nd and 3rd)check out the get_post_ancestors examples on the http://wordpress.org/plugins/widget-logic/other_notes/ page
http://codex.wordpress.org/Function_Reference/get_post_ancestors
Forum: Plugins
In reply to: [Widget Logic] Orderby conditionalYou can’t do this with widget logic – that’s something the widget itself would have to provide.
Forum: Plugins
In reply to: [Podcast Channels] Question about the feed itselfit’s the standard rss feed for the category which by default is at /feed/ on the URL end of the main page. most themes will put the feed in the page header or provide a link to it somewhere when browsers don’t detect them and provide their own links.
Forum: Plugins
In reply to: [SoundCloud Shortcode] no HTML5?dug into the code and it basically only works with HTML5 is if you put in the
https://api.soundcloud.com/…code that you have to dig out of the soundcloud ’embed’ code. It’s in the iframe “src” parameter.you may as well just paste in the embed code tho – so I’m not sure if the plugin does much else, as it just seems to then reconstruct the iframe HTML from that!
Forum: Plugins
In reply to: [Widget Logic] How to display a widget for a group of admins only?you could do it nicely with specific roles using http://codex.wordpress.org/Function_Reference/current_user_can
But if you simply have a list of IDs you can do
return ($current_user->ID==X || $current_user->ID==Y || $current_user->ID==Z);or better use PHP’s in_array…
Forum: Plugins
In reply to: [Widget Logic] PHP and MySQL compatibilityWL has no dependency on the mysql version – only what WP core code provides.
I’m afraid I can’t vouch for the PHP version, sorry. If you do find out on a test server please let me know
Forum: Plugins
In reply to: [Widget Logic] Compatibility with WordPress 3.8.1very odd, i could have sworn I replied on this thread or one very like it that I can’t find.
But yes, 3.8.1 – i updated the official supported version in the main code to match.
Forum: Plugins
In reply to: [Widget Logic] Widget logiccertainly there looks like there might be a clash in the use of add_filter(‘sidebars_widgets’… which gantry jumps in first with a priority of -10,000 (which seems very very high priority!)
It’s much more extensive code than WL I’m afraid – can you ask the gantry author/people to cast some light on it, as I don’t have the resources or ability he/she/they appear to have.
sorry – sound like a bit of a cop out, doesn’t it.
import/export for WL is at the foot of the normal admin ‘widgets’ page