@444004541 If the registered users are merely subscribers, then you will need a membership plugin. If they are editors or admins, you can make the post private and they will be able to see the post when loggged in. s2member is a free plugin you can use. If you need help or have more questions, please feel free to contact me.
@DarylLozupone im the admin of the website and all im looking for is for a widget or plugin that blocks sertain pages from being displayed to non loged in users.....for example , by blocking certain pages i mean blocking the chat tab or page so that it is viewable by registered or logged in users..... do you have any idea on how to do that?......thanks you very much and have an awesome day!!!!!!!!!!!!
Does anyone know how to exclude Children and Grandchilren of a number of pages, the code I have for one page and it's children is; global $post; return !(is_page(555) || ($post->post_parent=="555"));
This works but I can't find a way of adding anymore pages to this and keep it working. As soon as I try to add anything, it just stops working
@leer5858 Sorry it took so long for me to get back to you.
You are right, you can only go one level deep using this logic. You will have to continue add "or" clauses to the expression as you go deeper in the lineage.
Unfortunately, I cannot come up with a better way to do this given the current functions available in the Wordpress core.
You could create a custom function, however. Please contact me directly if you would like more information.
What I'm trying to do is to create a wordpress page whereby the widgets displayed on other pages are excluded and one widge custom made for that particular page shows up - is that doable with this plugin?
Is there a way to do multiple conditional tags? This would probably be more useful for where widgets should not display, as in *don't show on home* and *don't show on single posts* in order for it to only show pages, for example.
Great video. My problem is that I'm not trying to get a widget on my blog pages, but rather my other non blog pages. I've tried using is_page('title') and that doesn't work. I've tried using the page ID, but that didn't work either. Any suggestions?
@LearningTheMarket Use the is_single() tag. And input the slug for the page inside the parentheses. For example, if you want it to show on a page with the slug "About", use is_single('About').
However, it is always best to use a whitelist approach (i.e. an inclusive model) as opposed to a blacklist (an exclusive model). It is far easier to maintain a list of "do's" than "don'ts".
How can I make a widget display not on ALL posts but only on posts of the category movies? (this way posts in the trailer category will not have the widget on it) I don't want to have to list 900 posts for it to display on.. I'd be ok with telling it which posts to NOT display on though..
thats exactly what I did, but it doesnt discriminate correctly. what it ended up doing was not show the widget on ANY posts. I wanted 90% of my posts to show the widget and 10% (the trailer posts) to NOT show the widget. but when i do in_category('movies') , the widget doesn't show up on ANY posts
also that in_category('') thing; i'm not sure its for posts, the codex says its for category ARCHIVE pages, not posts of specific categories
The in_category tag applies to any post in the category indicated. The is_category tag applies to archive pages. I would be happy to help if you contact me directly to set up a time to meet.
Very good plugin that solves a fairly complex problem
macdarabutler 7 months ago
do you have any widget that blocks certain pages on my blog from been displayed to non registered users?
444004541 7 months ago
@444004541 If the registered users are merely subscribers, then you will need a membership plugin. If they are editors or admins, you can make the post private and they will be able to see the post when loggged in. s2member is a free plugin you can use. If you need help or have more questions, please feel free to contact me.
DarylLozupone 7 months ago
@DarylLozupone im the admin of the website and all im looking for is for a widget or plugin that blocks sertain pages from being displayed to non loged in users.....for example , by blocking certain pages i mean blocking the chat tab or page so that it is viewable by registered or logged in users..... do you have any idea on how to do that?......thanks you very much and have an awesome day!!!!!!!!!!!!
444004541 7 months ago
@444004541 Please see my previous reply.
DarylLozupone 7 months ago
Just one of the most needed plugins on WP! Thaaaaaaaaaanks!
pacristofini 7 months ago
@pacristofini You are welcome.
DarylLozupone 7 months ago
Just one of the most needed plugin ob WP! Thaaaaaaaaaanks!
pacristofini 7 months ago
Thanks, I was messing around with this problem for days.
Thumbs up!
LerenDownloaden 9 months ago
You, sir, are awesome. Truly awesome, and I love you
artfuldodger462000 9 months ago
@artfuldodger462000 Well, thank you.
DarylLozupone 9 months ago
fantastic!
nootube2000 10 months ago
OH GOD>>THANK YOU..saved me hours of aggravation. gracais
entropy111111 1 year ago
@entropy111111 De nada.
DarylLozupone 1 year ago
Great Video, thanks Daryl.
VirtualOfficeCenter 1 year ago
@VirtualOfficeCenter I am glad you found it useful.
DarylLozupone 1 year ago
That was really helpful!!!! Thanks.
bpnoalarm 1 year ago
@bpnoalarm My pleasure.
DarylLozupone 1 year ago
Thank you Daryl! You're great! Thanks for what you do!
AntoineAndre 1 year ago
@AntoineAndre Thank you very much. I am very glad you found the tutorial helpful.
DarylLozupone 1 year ago
THANK YOU for this video! Saved me a lot of time. Love the plugin!
livequeenstown 1 year ago
Thankyou Daryll. That was really helpful. Kind regards John (UK)
7thkatana 1 year ago
@7thkatana My pleasure, John. Let me know if you have any questions.
DarylLozupone 1 year ago
Does anyone know how to exclude Children and Grandchilren of a number of pages, the code I have for one page and it's children is; global $post; return !(is_page(555) || ($post->post_parent=="555"));
This works but I can't find a way of adding anymore pages to this and keep it working. As soon as I try to add anything, it just stops working
leer5858 1 year ago
@leer5858 Sorry it took so long for me to get back to you.
You are right, you can only go one level deep using this logic. You will have to continue add "or" clauses to the expression as you go deeper in the lineage.
Unfortunately, I cannot come up with a better way to do this given the current functions available in the Wordpress core.
You could create a custom function, however. Please contact me directly if you would like more information.
DarylLozupone 1 year ago
What I'm trying to do is to create a wordpress page whereby the widgets displayed on other pages are excluded and one widge custom made for that particular page shows up - is that doable with this plugin?
emusicmotion 1 year ago
@emusicmotion Yes,it is. What you need to do is :
for all widgets that show on other pages but not this one page: !is_page('slug_of_this_page')
for the widget for this page: is_page('slug_of_this_page')
I hope that helps. Feel free to contact me with more questions or if you need help.
DarylLozupone 1 year ago
@DarylLozupone Great! Last question - what if I need to make an is statement apply to two pages? I tried to guess ie !is_page('podcast', 'podcast2')
but its not working. what's the correct way to do it?
emusicmotion 1 year ago
@emusicmotion you are almost there, but it needs to be arrayed.
!is_page(array('podcast', 'podcast2'))
DarylLozupone 1 year ago
@DarylLozupone : fuckin awesome man! Quick fix to what I thought was gonna be a pain in the ass :D ...Kudos!
wizzpig666 1 year ago
Is there a way to do multiple conditional tags? This would probably be more useful for where widgets should not display, as in *don't show on home* and *don't show on single posts* in order for it to only show pages, for example.
Great widget though.
ishmaeldaro 1 year ago
@ishmaeldaro Yes, you can do multiple tags. You can use any conditional statement that is valid php.
However, for your example, the best tag to use is "is_page()". This will only show the widget on pages.
Let's say you want to use the widget on all pages except your "about" page. Then you could use the following:
is_page()&&!is_page('about')
is_page() (display this widget on pages)
&& (and)
! (not)
is_page('about') (on the page with the slug 'about')
I hope that helps.
DarylLozupone 1 year ago
@DarylLozupone Thanks a lot, Daryl. That should help.
ishmaeldaro 1 year ago
@ishmaeldaro My pleasure.
DarylLozupone 1 year ago
thank you so much!
bocanada82 1 year ago
@bocanada82 My pleasure!
DarylLozupone 1 year ago
Thanks for the tutorial! Clear and simple
Aboywithglasses 2 years ago
Thanks for your feedback!
DarylLozupone 2 years ago
Daryl,
I was searching for some information on new plugins of mine, and...I stumble on your helpful video!
This was exactly the info I was looking for, and your comment support helped tremendously.
beckyjoubert 2 years ago
Great, Becky. I am glad you found the tutorial helpful.
DarylLozupone 2 years ago
Fantastic Video and wonderful plugin! Very useful.
tekxzen 2 years ago
Glad you liked it.
DarylLozupone 2 years ago
Great video. My problem is that I'm not trying to get a widget on my blog pages, but rather my other non blog pages. I've tried using is_page('title') and that doesn't work. I've tried using the page ID, but that didn't work either. Any suggestions?
LearningTheMarket 2 years ago
@LearningTheMarket Use the is_single() tag. And input the slug for the page inside the parentheses. For example, if you want it to show on a page with the slug "About", use is_single('About').
I hope that helps.
DarylLozupone 2 years ago
not work with ->
is_single() && is_author('xxxx')
please help!
rslylmz 2 years ago
These two are mutually exclusive, as the " is_author" tag only applies to archive pages, not single post pages.
What you desire can be done with some custom programming. However, that is outside the scope of this video.
Quick suggestions: use an author template
DarylLozupone 2 years ago
Thanks for your response but Already "Author template" don't work on my theme. So, i want to try widget logic but i can't :(
Whatever, thank you again.
rslylmz 2 years ago
Great Plugin - just what I been searching for. Thanks for instructions and works great.
MarketMindBiz 2 years ago
It is my pleasure. I am glad you found the tutorial helpful.
DarylLozupone 2 years ago
Daryl I finally figured out what I was doing wrong. like you suggested, in_category('X') is what i needed
I was putting in the category slug instead of the category ID which is just the number 3.
in_category('3') is all I had to do this whole time lol (i was putting in_category('movies'). thanks!
50kT 2 years ago
if there is a all_single_posts_but_ NOT+ ('x post, y post, z post'" lol i'd be happy
thanks for quick responses too
50kT 2 years ago
Yes, you can use the following sytnax:
!(in_category('trailers'))
However, it is always best to use a whitelist approach (i.e. an inclusive model) as opposed to a blacklist (an exclusive model). It is far easier to maintain a list of "do's" than "don'ts".
Hope that helps.
DarylLozupone 2 years ago
Comment removed
50kT 2 years ago
How can I make a widget display not on ALL posts but only on posts of the category movies? (this way posts in the trailer category will not have the widget on it) I don't want to have to list 900 posts for it to display on.. I'd be ok with telling it which posts to NOT display on though..
50kT 2 years ago
in_category('movies')
DarylLozupone 2 years ago
thats exactly what I did, but it doesnt discriminate correctly. what it ended up doing was not show the widget on ANY posts. I wanted 90% of my posts to show the widget and 10% (the trailer posts) to NOT show the widget. but when i do in_category('movies') , the widget doesn't show up on ANY posts
also that in_category('') thing; i'm not sure its for posts, the codex says its for category ARCHIVE pages, not posts of specific categories
50kT 2 years ago
The in_category tag applies to any post in the category indicated. The is_category tag applies to archive pages. I would be happy to help if you contact me directly to set up a time to meet.
DarylLozupone 2 years ago
awesome! thanks I'll pm you my gtalk
50kT 2 years ago
Brilliant piece of work.
May your tribe grow!
S.K
cyberbrahma 2 years ago
Thanks so much.
DarylLozupone 2 years ago
thanks for the plugin, it works perfect. You helped me out!
leer5858 2 years ago
Glad to hear it.
DarylLozupone 2 years ago
Excellent tutorial, really helpful and clear - thanks Daryl!
karinsteph 2 years ago
My pleasure. I am glad it was helpful to you.
DarylLozupone 2 years ago
Excellent Tutorial! You very clearly explained how to use this widget, and where to get additional help.
This video needs 5 star ratings.
Thank You.
ajtrumb69 2 years ago
Thanks so much. I am glad you found it useful. If you think it needs 5 stars, please be sure to give it a thumbs up!
DarylLozupone 2 years ago