Added: 2 years ago
From: DarylLozupone
Views: 18,019
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (65)

Sign In or Sign Up now to post a comment!
  • Very good plugin that solves a fairly complex problem

  • do you have any widget that blocks certain pages on my blog from been displayed to non registered users?

  • @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!!!!!!!!!!!!

  • @444004541 Please see my previous reply.

  • Just one of the most needed plugins on WP! Thaaaaaaaaaanks!

  • @pacristofini You are welcome.

  • Just one of the most needed plugin ob WP! Thaaaaaaaaaanks!

  • Thanks, I was messing around with this problem for days.

    Thumbs up!

  • You, sir, are awesome. Truly awesome, and I love you

  • @artfuldodger462000 Well, thank you.

  • fantastic!

  • OH GOD>>THANK YOU..saved me hours of aggravation. gracais

  • @entropy111111 De nada.

  • Great Video, thanks Daryl.

  • @VirtualOfficeCenter I am glad you found it useful.

  • That was really helpful!!!! Thanks.

  • @bpnoalarm My pleasure.

  • Thank you Daryl! You're great! Thanks for what you do!

  • @AntoineAndre Thank you very much. I am very glad you found the tutorial helpful.

  • THANK YOU for this video!  Saved me a lot of time. Love the plugin!

  • Thankyou Daryll. That was really helpful. Kind regards John (UK)

  • @7thkatana My pleasure, John. Let me know if you have any questions.

  • 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?

  • @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 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 you are almost there, but it needs to be arrayed.

    !is_page(array('podcast', 'podcast2'))

  • @DarylLozupone : fuckin awesome man! Quick fix to what I thought was gonna be a pain in the ass :D ...Kudos!

  • 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 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 Thanks a lot, Daryl. That should help.

  • @ishmaeldaro My pleasure.

  • thank you so much!

  • @bocanada82 My pleasure!

  • Thanks for the tutorial! Clear and simple

  • Thanks for your feedback!

  • 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.

  • Great, Becky. I am glad you found the tutorial helpful.

  • Fantastic Video and wonderful plugin! Very useful.

  • Glad you liked it.

  • 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').

    I hope that helps.

  • not work with ->

    is_single() && is_author('xxxx')

    please help!

  • 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

  • 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.

  • Great Plugin - just what I been searching for. Thanks for instructions and works great.

  • It is my pleasure. I am glad you found the tutorial helpful.

  • 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!

  • 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

  • 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.

  • Comment removed

  • 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..

  • in_category('movies')

  • 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.

  • awesome! thanks I'll pm you my gtalk

  • Brilliant piece of work.

    May your tribe grow!

    S.K

  • Thanks so much.

  • thanks for the plugin, it works perfect. You helped me out!

  • Glad to hear it.

  • Excellent tutorial, really helpful and clear - thanks Daryl!

  • My pleasure. I am glad it was helpful to you.

  • 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.

  • 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!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more