WordPress Custom Loop WP_Query Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • Join my 2024 Complete WordPress Course here learnwebcode.t...
    Learn about WP_Query and create custom loops in any WordPress theme file.
    To learn about everything that WP_Query is capable of check out the official WordPress documentation: codex.wordpress...
    Link to download .zip of theme files as shown in this video (note: this is not a "complete" WordPress theme yet and this download is only intended for educational purposes to dissect and review):
    learnwebcode.co...
    To view a complete list of the WordPress lessons in sequential order visit:
    learnwebcode.co...
    Sign up for my newsletter to receive periodic webDev tips, tricks, resources and coupons. Join the list at learnwebcode.com/
    Follow me on Twitter for updates and cat pics:
    / learnwebcode

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

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

    even after 9 year this course is very helpful recommended

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

    You give the clearest explanations I’ve ever heard. You are a really good teacher.

  • @peterc5171
    @peterc5171 10 ปีที่แล้ว +6

    I have looked through a lot of tutorials through the web and here on TH-cam. I have to say that your lessons are just about the best I have come across! They are clear, simple, informative, and have a purpose and real world outcome. Please keep going.

  • @francescafontana4620
    @francescafontana4620 7 ปีที่แล้ว +1

    I so wanna say thank you!
    I knew literally NOTHING about html, php and css till a week ago and now i actually am able to do sooooo much!!
    Your explanations are perfect and these videos are just so well made.
    thank you again.

  • @ameer23ful
    @ameer23ful 8 ปีที่แล้ว +6

    At the end of this tutorial, I just wanna say;
    Man you are awesome.
    Thank you very much,

  • @michaeloliver6745
    @michaeloliver6745 8 ปีที่แล้ว +2

    Guy is insane how much he knows!! Will I ever get THAT good!? Awesome stuff!!

  • @ofuezuemlynus2965
    @ofuezuemlynus2965 10 ปีที่แล้ว +5

    you are the best wordpress teacher.....thanks alot

  • @BBDDSAL
    @BBDDSAL 9 ปีที่แล้ว +2

    Great tutorial. By far one of the best WP I've encountered on TH-cam.

  • @prasadchintala2525
    @prasadchintala2525 9 ปีที่แล้ว +14

    The way you are teaching is which is easy to understand, You r Super Bro,Thanq.

    • @LearnWebCode
      @LearnWebCode  9 ปีที่แล้ว +5

      Prasad Chintala Thanks so much! I'm glad the videos are helpful :)

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

    I could kiss you right now. I’ve struggled with this for days and you’ve solved it for me. Thank you!

  • @thomasalston
    @thomasalston 7 ปีที่แล้ว

    Your commentary as you go through the code really is helpful. Looking forward to going through more of your videos. Thanks :)

  • @mathijs2100
    @mathijs2100 10 ปีที่แล้ว +2

    Hoping you'll keep going with this series, it's really one of the best teaching I've seen on here.

  • @gamermeshie3180
    @gamermeshie3180 6 ปีที่แล้ว

    Your lessons are better than my instructor. It is easier to understand and absorb, especially for beginners. Keep it up! :)

  • @codechamp2599
    @codechamp2599 6 ปีที่แล้ว

    this tutorial is sitll saving lifes of many programmers Thanks sir

  • @marklozano9898
    @marklozano9898 10 ปีที่แล้ว +1

    Just finished watching all of your videos while following along on coding. Great tutorial, very detailed. Best tutorial of wordpress theme creation that I have watched. Thank you sir! I will surely tell everyone who wants to learn wordpress about your tutorial course here and on udemy. Hope you upload more videos about wordpress! I will surely wait for that. :)
    just one question about this video. you mentioned about the wp_query class and its objects, is that what they call OOP on PHP?
    if it isnt can you please create a tutorial on how to do OOP on PHP, so We can kinda sort and organized the functions through classes? I have watched some videos about that but its not clear, unlike you do. you go step by step and willing to teach and share your knowledge for everybody, not just about getting subscribers and views. your a great teacher. Thank's again! :)

  • @zambo1511
    @zambo1511 6 ปีที่แล้ว

    You are the ruler God of TH-cam.

  • @isunas16
    @isunas16 8 ปีที่แล้ว

    I hope u feel like u learned something.....YES!I've learned sooooo many things.Thank u so much bro

  • @2010Tane4ka
    @2010Tane4ka 6 ปีที่แล้ว

    I can't Englisch but you make it so understandable. ... It's really cool, I come forward. Thank you so much!!

  • @turboromy
    @turboromy 7 ปีที่แล้ว

    I've been trying to do this "from 2 separate category" thing and been very frustrated. Now I got it. Thanks.

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

    one billion likes for this video and for the author.

  • @AmitGupta-ck5tj
    @AmitGupta-ck5tj 7 ปีที่แล้ว

    sir I am from India , your videos is so good for WordPress developer, sir can you plz make complete videos about WordPress database such that , how to use wp_postmeta value on front end , what is wp_post table field , what is wp_terms in WordPress , how to use WordPress custom database . as well as everything related WordPress database . sir plz make a video plz , your videos is very helpful for WordPress developer . thanks a lot for this video . keep it up sir .

  • @rajathveeramanchala
    @rajathveeramanchala 8 ปีที่แล้ว

    Hello, First of all i would like to thank you a lot for this wordpress theme development playlist. You deserve a good appreciation and respect for helping many beginner developers. I have developed a theme for my own sports website by learning from your tutorials. But i would like to suggest you to add videos on making the theme responsive and on adding page links(useful to see old posts when limited to 5 posts per each page). I have searched from various sources and completed my theme. I`m just suggesting so that it would be helpful for those who follow this playlist in future. Once again THANK YOU !!

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

    i found a great teacher brad. Please make some more courses

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

    Thank you so much for these wonderful tutorials.
    You are an extraordinary teacher. Thanks again!

  • @cervantes01
    @cervantes01 6 ปีที่แล้ว +1

    Love it, can we have more tutorials please!

  • @alexdewilde934
    @alexdewilde934 6 ปีที่แล้ว

    Damn live the way you speak, sounds passionate and makes it easy to understand. And u where correct about the aha moment. Working with query's is really easy with a good explanation

  • @PtxDK
    @PtxDK 8 ปีที่แล้ว +4

    0:20 Just before I started the video i had this feeling. :D

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

    its was my AHA moment i can confirm it. been scratching my head on another course where i was having hard time understanding the guy.

  • @AssaultOuStudios
    @AssaultOuStudios 8 ปีที่แล้ว +1

    Just discovered these - they're great. Thanks for the effort.
    Will you by any chance at some point do a tutorial on creating your own widgets?

  • @mabrarhassan
    @mabrarhassan 8 ปีที่แล้ว +1

    Greatest among the teachers!!!

  • @jaysonlauza5850
    @jaysonlauza5850 9 ปีที่แล้ว

    One of the best tutorials I watched!

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

    thank you, one of the best wordpress tutorial

  • @andrewdeacon4384
    @andrewdeacon4384 10 ปีที่แล้ว +1

    Very clear explanation - excellent.

  • @rdagger
    @rdagger 9 ปีที่แล้ว

    Great job. It must have taken a lot of work to put together these tutorials in such a professional manner. Thanks.

  • @OliverWoodphotography
    @OliverWoodphotography 6 ปีที่แล้ว

    Thanks for these really clear easy to understand tutorials.

  • @fengshuienthusiast7635
    @fengshuienthusiast7635 6 ปีที่แล้ว

    Intense, Rewarding, and Grateful.

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

    3:25 - Empty LOOP skeleton
    7:50 - Recent posts query order by asc

  • @sayedakbarali5650
    @sayedakbarali5650 10 ปีที่แล้ว +4

    Thank You Once Again for this Wonder full Series Really Appreciate it

  • @thewebproject
    @thewebproject 9 ปีที่แล้ว

    Thank you so much sir. Your vid lessons are the greatest videos here in youtube. God Bless you sir.

  • @ronniej446
    @ronniej446 9 ปีที่แล้ว

    simple but elegant

  • @imfreeash
    @imfreeash 8 ปีที่แล้ว

    I learn a lot from your tutorial, thank you so much

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

    You sir are a lifesaver!

  • @ManabuMiwa
    @ManabuMiwa 9 ปีที่แล้ว

    This is exactly what I had wanted to know for a long time. Thanks you for your great video!

  • @againstthesystem83
    @againstthesystem83 9 ปีที่แล้ว

    Extremely useful tutorial. Thanks.

  • @amitmoral
    @amitmoral 6 ปีที่แล้ว

    Great tutorial. How to display custom post loop using get category?

  • @orochinagi1111
    @orochinagi1111 8 ปีที่แล้ว

    brilliant..! love the video sizes and your teaching style

  • @mohammedadlan
    @mohammedadlan 8 ปีที่แล้ว

    Great instructor
    thanx alot

  • @mistermagnus1836
    @mistermagnus1836 9 ปีที่แล้ว +1

    Great tutorials! One question. When using wp-query on categories. Is there a way to allow the user to decide which category to put in the area instead of hardcoding the actual cat id? For instance, using this method, if you put cat=7, only category 7 will show in the area, is there a way to allow the user to change the category in the admin dashboard so if they want lets say "opinion" to show it will, or if they want to change it to "news" they can in admin dashboard? Only question I have, you covered everything else beautifully!!

    • @LearnWebCode
      @LearnWebCode  9 ปีที่แล้ว +2

      Erik Hals Ah, that is a great question. If you don't need to have fine grain control on the way the content is output you could use a widget which allows the end user in the dashboard to change the category. If we want to retain our 100% custom HTML output for the content I would say the best way to let the end user in the dashboard control the chosen category/categories would be to use custom fields. I will cover custom fields in the near future, but in the meantime if you are curious - Google "Advanced Custom Fields" which is a free and amazing plugin for WordPress that makes all sorts of things possible.

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

    Woooow thanks a lot i was searching the same thing on TH-cam and google since One week that how can i show my custom post type data dynamically on wordpress page. I’m using elementor.
    Can i make the short code of same wp_query and can use that short code to the elementor. Shortcode ??

  • @dsulvadarius
    @dsulvadarius 9 ปีที่แล้ว +1

    i like the way you teach.

  • @Kodingi
    @Kodingi 9 ปีที่แล้ว

    Good series. Thanks!

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

    Very good tutorial, It explained everythings i needed.

  • @RavenaciousTM
    @RavenaciousTM 7 ปีที่แล้ว

    Totally an Aha!-moment. Thank you, Sir!

  • @9849120841
    @9849120841 9 ปีที่แล้ว

    Great tutorials.. Thanx a lot... :)

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

    Your videos have been a tremendous help while building my first Wordpress theme. Thank you so much.

  • @sidneysousa3520
    @sidneysousa3520 8 ปีที่แล้ว

    Really helpful tutorial and thanks a lot for it.
    How can I print the category name before printing the title of each post?

  • @askas0497
    @askas0497 7 ปีที่แล้ว

    thanks for tutorial before, but i have question , how you can make the button look like on the last minutes, can you make tutorial please??

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

    thank you so much, this what i search :)

  • @RecomeR96
    @RecomeR96 7 ปีที่แล้ว

    You're just the best. Saving me. Thank you a lot!

  • @clearf1x
    @clearf1x 7 ปีที่แล้ว

    You are the best!
    Thanks for you tutorials! :)

  • @xromium
    @xromium 7 ปีที่แล้ว

    Love your videos! Thanks a lot!

  • @majdalyousfi8867
    @majdalyousfi8867 7 ปีที่แล้ว

    Great tutorial Thanks

  • @adriandc9
    @adriandc9 8 ปีที่แล้ว

    Hi Sir, thank you so much for this tutorials and I've learning a lot from this series. One question please, I would like to use wp_query in archive page, what if I would like to query all post from the current category of the archive page that for a specific tag? How can I code that? thank you so much

  • @ironjebi999
    @ironjebi999 9 ปีที่แล้ว

    extremely useful, thanks for the tutoria. I'm trying to create a list of a specific post category that shows the reatured image on hover, any sugestion of how can I begin?

  • @missyani7003
    @missyani7003 9 ปีที่แล้ว +5

    I OWE MY LIFE TO YOU LOL

  • @pilifernandez-davila1166
    @pilifernandez-davila1166 7 ปีที่แล้ว

    Great tutorial!!!

  • @Greg4510able
    @Greg4510able 8 ปีที่แล้ว

    wow,
    you saved my night

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

    Hi sir the square thumbnail, displays the same image for opinion and for news part

  • @oliverfemi5955
    @oliverfemi5955 7 ปีที่แล้ว

    please can you do a video on list category plugin to display category and subcategory list on a page.

  • @kiranmulmi7405
    @kiranmulmi7405 7 ปีที่แล้ว

    amazing tutorial

  • @J4si3k1992
    @J4si3k1992 8 ปีที่แล้ว

    Nice tutorial, but I have one question. How to make one loop with custom post type (category) and normal category? How to make all in one loop?

  • @omranabazeed
    @omranabazeed 9 ปีที่แล้ว

    thank brad really apreciate it dude

  • @mdmasud5888
    @mdmasud5888 8 ปีที่แล้ว

    It's amazing to me. I think i have learned so much things.

  • @decorazon2007
    @decorazon2007 6 ปีที่แล้ว

    Hi man.. that very great videos.. thanks a lot... hey i have a doubt: how i can combine 2 post types in one loop... ? example: players and soccer teams .. i wan to show only that players who play in first division teams.. teams category are first and second.. thanks again

  • @solomonjeeva2082
    @solomonjeeva2082 8 ปีที่แล้ว

    Awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @prhyme8752
    @prhyme8752 6 ปีที่แล้ว

    If anyone else is having this problem I just want to share it, on the one-half and one-half last div when styling, my style would not change when I just wrote .last in my css as the teacher is doing in this video. I had to type .one-half.last for it to work

  • @jjblueflame
    @jjblueflame 7 ปีที่แล้ว

    Simply great tut!

  • @AmitGupta-ck5tj
    @AmitGupta-ck5tj 7 ปีที่แล้ว

    very nice videos sir

  • @allenliu1672
    @allenliu1672 8 ปีที่แล้ว

    Nice text editor, good for identifying php code. Could u tell us the name?

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

    Thank you very much

  • @pama4546
    @pama4546 9 ปีที่แล้ว

    Great tuts dude :) ! Would be great if you create one for HTML into WP from scratch? Subscribed,thanks !

  • @user-fi1sr9fd4b
    @user-fi1sr9fd4b 7 ปีที่แล้ว

    Best Tutorial

  • @mashavainblat8080
    @mashavainblat8080 7 ปีที่แล้ว

    YOU ARE AMAZING

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

    One question, What if you are trying to change the category of the wp_query on click? How would you re run and re populate the new wp_query? Thanks!!!!

  • @yashpatel-lu5bm
    @yashpatel-lu5bm 4 ปีที่แล้ว

    plzz use "what template i am view" plugin in word press to see the page will called
    like themes/index.php
    themes/page.php
    it will easy for beginner that will page will called

  • @MadeefarChohan
    @MadeefarChohan 7 ปีที่แล้ว

    Great work

  • @handmadesoapbars
    @handmadesoapbars 9 ปีที่แล้ว

    Can you explain anything about Kirki wp customizer?

  • @hamzaeljaouhari5419
    @hamzaeljaouhari5419 6 ปีที่แล้ว

    I wish if the tutorial was long enough :D haahhaha Thanks a lot

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

    Thank you!!!

  •  9 ปีที่แล้ว

    Great tutorial.I like it.tks :*

  • @mohamedobeidalla6659
    @mohamedobeidalla6659 8 ปีที่แล้ว

    thank you very very helpful

  • @nischintpal
    @nischintpal 8 ปีที่แล้ว

    thanks a lot....

  • @charlesloehle7998
    @charlesloehle7998 7 ปีที่แล้ว

    How can i get atom editor to do that thing where you type two matching lines of code at the same time?

  • @pedroantunes7773
    @pedroantunes7773 8 ปีที่แล้ว

    Hey! I know this is an old video but I was wondering... could I create 2 different templates for those 2 columns and then call them with get_template_part? If I have my homepage structured with 6 rows, each with a different loop, wouldn that output a "cleaner" code? Is there any advantage or this just doesnt makes sense? Thanks!

  • @pratyushranjan277
    @pratyushranjan277 7 ปีที่แล้ว +1

    the tutorial is damn good but which editor you are using??it's also cool..

    • @LearnWebCode
      @LearnWebCode  7 ปีที่แล้ว +3

      Thanks! I'm using "TextMate" in this video, but nowadays I use "Sublime Text" and also recommend Atom by GitHub.

    • @birsingh5388
      @birsingh5388 6 ปีที่แล้ว

      VS Code is also good :)

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

    thanks a lot my hero

  • @DrunkenShinobi
    @DrunkenShinobi 9 ปีที่แล้ว

    Is there a way to prevent copying content from a website with wordpress?

  • @jellycoding
    @jellycoding 7 ปีที่แล้ว

    Great tutorial. However I have a question. If I make a theme and give it to someone else. How do I know that the Opinion category is going to have the same ID in his installation?

    • @gamermeshie3180
      @gamermeshie3180 6 ปีที่แล้ว

      Let me try to answer this question. If you are trying to give your theme or transfer it to someone, you need to be able to properly execute the transfer of the theme . See this link for more info: www.wpbeginner.com/beginners-guide/how-to-properly-switch-wordpress-themes-on-your-site/

  • @MK-uy6ks
    @MK-uy6ks 8 ปีที่แล้ว

    thank you

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

    What if we want 2 columns for same loop? (For blog posts/home)