alanft
Forum Replies Created
-
I think you should combine them with && with brackets around the second long one
!is_category( array (6, 7, 8, 9))
&&
(!is_category( array (6, 7, 8, 9)) || (!is_single() && in_category( array (6, 7, 8, 9))))tho I’m not sure your logic on the 2nd part there is right in the first place. I think it should have the ! next to is_single outside the adjacent bracket.
!is_category( array (6, 7, 8, 9)) || !(is_single() && in_category( array (6, 7, 8, 9)))
HTH
I’m not getting any site at that address, sorry π
cannot resolve http://brisbanecosmetic.com.au: Unknown host
cannot resolve http://brisbanecosmetics.com.au: Unknown hostnope shouldn’t be. very mysterious want to point me at an example of a non-clickable link on a site – i can check it on safari and firefox
is_page(array(X, Y, Z))
will make a widget appear on page X or page Y or page Z!is_page(array(X, Y, Z))
will make a widget appear when it is none of the same pagesoh, as that function is in pluggable you’ll have to delay the “Logic load” option from the default to ‘after the theme’ I think
Looks like get_currentuserinfo() (part of pluggable.php) can help. It sets the global $current_user
http://codex.wordpress.org/Function_Reference/get_currentuserinfo
so you could do eg something like
global $current_user; get_currentuserinfo(); return($current_user->ID==X);to exclude pages !is_page(array(X, Y, Z)) should work find. (I’m guessing the ! in your top line of code was an accident)
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] New update broke my siteThe only other thing is a single wp_option entry called “widget_logic” – here if you use SQL and have the default table prefix:
select * from wp_options where option_name=”widget_logic”
It is a very small overhead – 1 or 2 k.
I’m not sure I understand your alternative “how can I reinstall the plug-in without have access to the wp-admin”. You can just re-upload the folder that you previously deleted, but if it’s not installed, you should have the wp-admin interface OK anyway?
a little poke in the code suggests you could try something like
global $bp; return (‘groupname’==$bp->groups->current_group->name);
though it might be cleaner to try
global $bp; return (bp_is_group() && (‘groupname’==$bp->groups->current_group->name));
let us know if you find it useful
you have your idea of AND and OR backwards
!is_page(17) || !is_home()
will show if the current showing webpage is not page 17, or if it’s not the home page. This is *always* going to be true if page 17 is not the home page, so either one of those statements (A OR B) will be true.
What you want is AND instead of ORβ¦
!is_page(17) && !is_home()
which will only be true when you are not showing page 17 AND you are not showing the home page – ie it doesn’t show on just those specific pages, and does show elsewhere.
if you want a widget to appear when it is true that the current page is both not case X AND not case Y at the same time you have to use AND
! caseX && ! caseY
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] The combination of Conditional TagsI think is_user_logged_in needs you to set Widget Logic to use “Load logic” setting of at least “after the theme loads”, as that function is a ‘pluggable’ function that can be replaced by the theme. Give it a go
http://wordpress.org/extend/plugins/widget-logic/installation/
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] Excluding a pagethat’s one of the examples here
http://wordpress.org/extend/plugins/widget-logic/other_notes/
Forum: Plugins
In reply to: [Widget Logic] [Plugin: Widget Logic] user logged in syntax helpIf you put
is_user_logged_in()
as the Widget Logic for a widget, that widget will only appear if the user is logged in. What is displayed in the widget is not controlled by widget logic. So you could e.g. have 2 ‘text’ widgets, one with is_user_logged_in() and one with !is_user_logged_in(), where ! means ‘NOT the case that’.
Hope that helps
Forum: Plugins
In reply to: [Widget Logic] Widget LogicI get a “HTTP/1.1 500 Internal Server Error” when I try a simple connection to your site. It’s not flagged up anywhere visible, which is unhelpful of your host, but it is there -and it implies there’s a host configuration problem with your IIS or PHP. something’s out of whack.
Assuming you can get back into your WP admin to clear that logic out, check in with the FAQ
http://wordpress.org/extend/plugins/widget-logic/faq/
which makes the distinction between is_front_page() and is_home() as clear as I think it can be. That might sort you out.