Conditional Menus In WordPress With No Plugins - Works With Page Builders

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 47

  • @wplearninglab
    @wplearninglab  5 ปีที่แล้ว +1

    If you enjoyed this video don't forget to the like it and subscribe! Then check out this Elementor Pro playlist: th-cam.com/video/50Z37RmGBcA/w-d-xo.html

  • @GCRice2
    @GCRice2 6 หลายเดือนก่อน +1

    Thank you, Thank you, Thank you! I'm a genius (sarcasm), so when I first tried to implement this code I accidentally put it in the CSS instead of PHP and it didn't work...but then I realized what I'd done and it works beautifully. I have been searching for tutorials like this...I selected that this is worth $10 to me in the tutorial because I'm currently unemployed and trying to get into full time web design realistically I am willing to pay more when I get income from this. You actually explain the coding and do so well without requiring add ons, and that is awesome. One last time, thank you for making this part available for free!

    • @wplearninglab
      @wplearninglab  6 หลายเดือนก่อน

      You're welcome, I'm happy I could help! Keep on learning and moving forward and you'll get into web design full-time. Get your skills up to where you're happy the websites you design and then go business to business to offer your services. That's probably the fastest way to get going :)

    • @GCRice2
      @GCRice2 6 หลายเดือนก่อน +1

      @@wplearninglab Quick question, do you have a tutorial on how to restrict access to pages altogether, without plugins (I.e. lets say there is a "secret-content" page that is only on the subscriber menu, but I also need it to be securely hidden (even from inspector) even if typed in manually). If not, do you have a suggested plugin? Thanks in advance!

    • @wplearninglab
      @wplearninglab  6 หลายเดือนก่อน +1

      You can try password protecting the page: th-cam.com/video/d4S7aYI34qM/w-d-xo.html
      The interface looks a little different now, but you'll see the same option in the "Visibility" drop down in the page or post settings. This method will require a visitor to enter a password to access the post or page and it should be hidden from the inspector as well.
      It can be a bit of pain for your audience to use a password all the time and if you're doing this for lots of content a better solution would be a membership plugin. There are full featured ones and slimmed down ones. I've used Wishlist Member in the past and it worked quite well.

  • @myllerolivio9699
    @myllerolivio9699 2 ปีที่แล้ว

    Hey Bjorn, I am a subscriber of your channel. Does not matter if it is old or recent, your videos are always on target, good examples, easy to follow and I prefer most of your videos over many in the youtube community. Thanks

  • @tylereisaman6839
    @tylereisaman6839 ปีที่แล้ว

    Hi Bjorn, this worked great! The only issue is that my footer menu also was updated as well. Are you able to help me fix this? Thanks again!

  • @ephildev
    @ephildev 3 ปีที่แล้ว

    Hi. Is it compulsory to add this codes to the child theme. Can it be added directly to the parent theme function.php

  • @kristinschaeffer2858
    @kristinschaeffer2858 2 ปีที่แล้ว

    I'm having trouble with a couple of things not working. The admin bar across the top does not go away for admins and the logout function sends me to a "page not found" instead of the home page. I am SURE I have done something wrong, but I've scoured and scoured and can't seem to spot my mistake. Any ideas or suggestions? Thanks so much for this tutorial and for any help you can provide in advance.

  • @guimoprogg8610
    @guimoprogg8610 3 ปีที่แล้ว +1

    You the best sir!!!!!

    • @wplearninglab
      @wplearninglab  3 ปีที่แล้ว

      Thanks Guimo and thanks for watching!

  • @russquery
    @russquery 3 ปีที่แล้ว

    Great video, just what I was looking for, thank you!

  • @milenkrastev9796
    @milenkrastev9796 3 ปีที่แล้ว

    All good, it works that way if you have only one menu on the page.
    There is $args["theme_location"] which you have to consider

  • @MC.CG3DArt
    @MC.CG3DArt 3 ปีที่แล้ว

    Super tutorial!! What I could do if I want a General Menu that work in the same way for AdminLogged, CustomerLogged, LoggedOut + a submenu that works as in your tutorial? It is possible?

  • @nolifeaman
    @nolifeaman 4 ปีที่แล้ว +1

    Hey Bjorn, great video overall just the one i wanted. One question, i want to have different menus on different pages of my website therefore prepared the php code and I've put only 'if' conditions. Is it necessary to have 'else' conditions as well?

    • @wplearninglab
      @wplearninglab  4 ปีที่แล้ว

      Hey Aman,
      Having just the if statement is totally fine.
      I find the else statement is most useful for a fallback just in case the ifs didn't cover all the possible cases.
      If you have multiple related if statements it's also easier to use elseif instead of just multiple if. If you go back to the code a year from now, it'll be easier for you to see that all the elseif statements are related.
      I hope that helps, let me know if you have any further questions. Thanks for watching!

    • @nolifeaman
      @nolifeaman 4 ปีที่แล้ว

      @@wplearninglab I copied your code the exact and edited for my conditions. It says a parse error in the very first line.....any solution?

  • @jakezenna1635
    @jakezenna1635 4 ปีที่แล้ว

    Thank for the great video!
    Does this same method work with the a menu in the top bar as well or only those in the main header?
    Thanks heaps in advance :)

  • @dominasunshine165
    @dominasunshine165 3 ปีที่แล้ว

    how do i get to keep my footer menu set to footer menu

  • @CarsForSaleDubai
    @CarsForSaleDubai 5 ปีที่แล้ว +1

    Thanks alot sir its amazing stuff to learn even i am a bit promrammer but i did not thought about this logic in wp thank again

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว +1

      You're welcome, thanks for watching! Let me know if you have any questions :)

    • @CarsForSaleDubai
      @CarsForSaleDubai 5 ปีที่แล้ว

      @@wplearninglab Okay Boss

  • @raulcerda7804
    @raulcerda7804 4 ปีที่แล้ว +1

    Hi!
    A question, this works only for elementor? or I can use this code with other themes and builders?

    • @wplearninglab
      @wplearninglab  4 ปีที่แล้ว

      Hi Raul,
      Shortpixel works with any images on your WordPress site. Doesn't matter if the image is uploaded to and used with Elementor or any other page builder. And it works when the images are used without page builders.
      I hope that helps, let me know if you have any further questions. Thanks for watching!

    • @raulcerda7804
      @raulcerda7804 4 ปีที่แล้ว

      @@wplearninglab hi! I think you answer other person. I was asking about the conditional menus code that you used.

  • @chandansoni989
    @chandansoni989 5 ปีที่แล้ว +1

    You are always awesome . ❤️

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว +1

      Thanks Chandan, you're always awesome too! 😀

  • @riasen4
    @riasen4 4 ปีที่แล้ว

    Hi, great video!
    Will this work with menu created with brizy editor? please reply

  • @JDMian
    @JDMian 5 ปีที่แล้ว +1

    very good sir I enjoyed this tutorial.

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      I'm glad to hear it, thanks for watching!

  • @subinbabu314
    @subinbabu314 5 ปีที่แล้ว +2

    Thanks bjorn 🙂

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว +1

      You're welcome Subin, thanks for watching! Let me know if you have any questions :)

  • @tommydenato8863
    @tommydenato8863 4 ปีที่แล้ว

    This worked perfect man - thank you!

  • @leorraedvalmonte
    @leorraedvalmonte 3 ปีที่แล้ว

    Hi! I loved the video. Would it be possible to base restrictions on username or email?

  • @ananiamesfin1488
    @ananiamesfin1488 4 ปีที่แล้ว

    you deserve a subscribe

  • @ianmills8246
    @ianmills8246 3 ปีที่แล้ว

    Great Video. Just discovered your channel, and love the content you've got there. This video was just what I was looking for. Although I have got one problem (hoping you are still following these replies!).... how can this work if I have more than one menu on a page. In fact, I have an online store - so there is a menu I want to change for logged in/out users, but also another menu that just displays shop categories that remains unchanged whether you are logged in or not. Is there a way of achieving this? As in, targeting the changes to only one specific menu? Thanks!

  • @Electronzap
    @Electronzap 5 ปีที่แล้ว +1

    Nice!

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      Thanks Paul and thanks for watching!

  • @madugood
    @madugood 5 ปีที่แล้ว +1

    Awesome 💓

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      Thanks Madu and thanks for watching!

  • @chouf364
    @chouf364 5 ปีที่แล้ว

    Ty sir.. u helping a lot of people with your video tutorials!! Thanks a lot

  • @Pedant_Patrol
    @Pedant_Patrol 5 ปีที่แล้ว +1

    Hey, Bjorn. Great video as usual! You mentioned there'd be a link to a tutorial on the Profile Builder plugin, but I don't think I see it. Could you post the link as a reply to my comment? I'd be really interested in learning more about that plugin. Thanks so much!

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      That happens, thanks for the heads up! Here is the link to that video: th-cam.com/video/cp3gc0yaHyg/w-d-xo.html
      I hope that helps :) Let me know if you have any further questions. Thanks for watching!

  • @SuperXrunner
    @SuperXrunner 5 ปีที่แล้ว +1

    Thank you

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      You're welcome, thanks for watching! Let me know if you have any questions :)

  • @uthirapathikuppusamy838
    @uthirapathikuppusamy838 5 ปีที่แล้ว +1

    How to create custom theme from scratch in WordPress

    • @wplearninglab
      @wplearninglab  5 ปีที่แล้ว

      Good question, that will make for a long series of tutorials. It's been on my list of tutorials to make for a while, hopefully I'll have to time to get it done one day soon. Thanks for the suggestion!