SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
What is the WordPress Loop?
       By Ronald Huereca
         September 15th, 2011
Most of you have seen this screen:
Most of you have not seen this one:
When you                     a post...

  Your post gets saved in a “posts” database table
  Your post can have:
     Post Meta (custom fields)
     Taxonomies (Categories, Tags, Post Format)
     Attachments (Featured images, galleries)
     And lots more!
WordPress and your theme
automatically turns this...
...into a post your users
can see on a web site.
How do you go from this...
...to this?
With a Query
Queries decide...
 Which items to display
 Under which category
 And sorted in a particular order
 And any other conditions you can think of
An example query...
                                       grab the post by
grab the post by ID 2338
                                       post_status draft




         grab posts by     sort by date published
       the post’s author
Once you have the results of the Query,
       you can display them.
Here is a query result displayed:
The results from a query are outputted
in the form of a Loop.
This post is one iteration
of a WordPress Loop.
Let’s look what makes up
a Loop Item in WordPress...
The Loop Dissected
 Date Published   Post Author


                        Post Title




                                     Post Content
So how do you create your own
Loop (cough, the hard way)?

  Create your own Query -
  http://codex.wordpress.org/Template_Tags/get_posts
  Create a page template in your theme -
  http://codex.wordpress.org/Pages#Page_Templates
  Assign that page template to a page in WordPress
  Anything more complicated, you may want to create
  your own child theme
Or you can use LoopBuddy
and Builder (the easy way)
  Create unlimited queries and Loop layouts
  Override any section
     The front page
     The archive pages
     An individual post or page
     Search results
  Create a new section
     A “blog” archive
     A custom 404 page
     A sitemap
no coding or theme
modifications required!
With LoopBuddy,
you control the Loop
Try out LoopBuddy and
be blown away at the possibilities

 Try it at: http://trials.ithemes.com/config/loopbuddy
 Buy it at: http://pluginbuddy.com/purchase/loopbuddy

Mais conteúdo relacionado

Semelhante a What is the WordPress Loop?

Word camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for BeginnersWord camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for BeginnersConvinsys
 
Wordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersWordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersBonnie Vasko
 
Wordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersWordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersBonnie Vasko
 
WordCamp Raleigh 2018 - Beginner's Guide to Wordpress
WordCamp Raleigh 2018 - Beginner's Guide to WordpressWordCamp Raleigh 2018 - Beginner's Guide to Wordpress
WordCamp Raleigh 2018 - Beginner's Guide to WordpressConvinsys
 
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事Ronald Hsu
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme ReviewCatch Themes
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1Yoav Farhi
 
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...WP Engine
 
Building a WordPress Powered Website
Building a WordPress Powered WebsiteBuilding a WordPress Powered Website
Building a WordPress Powered WebsiteDeltinaU
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationSankhala Info Solutions
 
Streamlining Your Template Structures When Building Themes
Streamlining Your Template Structures When Building ThemesStreamlining Your Template Structures When Building Themes
Streamlining Your Template Structures When Building ThemesCameron Jones
 
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana Ahmed
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana AhmedBlogPaws 2010 West - Blogging Tools - Wordpress - Sana Ahmed
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana AhmedBlogPaws
 
Slavin-Dodson Piece, With Code.
Slavin-Dodson Piece, With Code.Slavin-Dodson Piece, With Code.
Slavin-Dodson Piece, With Code.ALATechSource
 
Wordpress Tech Talk at Atlogys
Wordpress Tech Talk at AtlogysWordpress Tech Talk at Atlogys
Wordpress Tech Talk at AtlogysRitika Garga
 
Introduction to WordPress & Theme Development
Introduction to WordPress & Theme DevelopmentIntroduction to WordPress & Theme Development
Introduction to WordPress & Theme DevelopmentNajmul Haque
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Rakesh Kushwaha
 
DM110 - Week 2 - Blogs
DM110 - Week 2 - BlogsDM110 - Week 2 - Blogs
DM110 - Week 2 - BlogsJohn Breslin
 
Drupal Single Page Website
Drupal Single Page WebsiteDrupal Single Page Website
Drupal Single Page Websitevasilyyaremchuk
 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with ElementorAngela Bowman
 

Semelhante a What is the WordPress Loop? (20)

Word camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for BeginnersWord camp Raleigh 2017 - Wordpress for Beginners
Word camp Raleigh 2017 - Wordpress for Beginners
 
Wordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersWordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for Beginners
 
Wordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for BeginnersWordcamp 2010 Themes for Beginners
Wordcamp 2010 Themes for Beginners
 
WordCamp Raleigh 2018 - Beginner's Guide to Wordpress
WordCamp Raleigh 2018 - Beginner's Guide to WordpressWordCamp Raleigh 2018 - Beginner's Guide to Wordpress
WordCamp Raleigh 2018 - Beginner's Guide to Wordpress
 
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事
2015 rubyconf - 百大媒體網站從 Wordpress 到 Rails 的大小事
 
Starting WordPress Theme Review
Starting WordPress Theme ReviewStarting WordPress Theme Review
Starting WordPress Theme Review
 
WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1WordPress Developers Israel Meetup #1
WordPress Developers Israel Meetup #1
 
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
Modern Theming & The Future of WordPress- Working with Full Site Editing and ...
 
Building a WordPress Powered Website
Building a WordPress Powered WebsiteBuilding a WordPress Powered Website
Building a WordPress Powered Website
 
Easy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme IntegrationEasy Guide to WordPress Theme Integration
Easy Guide to WordPress Theme Integration
 
Streamlining Your Template Structures When Building Themes
Streamlining Your Template Structures When Building ThemesStreamlining Your Template Structures When Building Themes
Streamlining Your Template Structures When Building Themes
 
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana Ahmed
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana AhmedBlogPaws 2010 West - Blogging Tools - Wordpress - Sana Ahmed
BlogPaws 2010 West - Blogging Tools - Wordpress - Sana Ahmed
 
Slavin-Dodson Piece, With Code.
Slavin-Dodson Piece, With Code.Slavin-Dodson Piece, With Code.
Slavin-Dodson Piece, With Code.
 
Wordpress Tech Talk at Atlogys
Wordpress Tech Talk at AtlogysWordpress Tech Talk at Atlogys
Wordpress Tech Talk at Atlogys
 
Wordpress Tech Talk
Wordpress Tech Talk Wordpress Tech Talk
Wordpress Tech Talk
 
Introduction to WordPress & Theme Development
Introduction to WordPress & Theme DevelopmentIntroduction to WordPress & Theme Development
Introduction to WordPress & Theme Development
 
Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality Overview on WordPress theme file structure and working functionality
Overview on WordPress theme file structure and working functionality
 
DM110 - Week 2 - Blogs
DM110 - Week 2 - BlogsDM110 - Week 2 - Blogs
DM110 - Week 2 - Blogs
 
Drupal Single Page Website
Drupal Single Page WebsiteDrupal Single Page Website
Drupal Single Page Website
 
Using Custom Post Types and Advanced Custom Fields with Elementor
 Using Custom Post Types and Advanced Custom Fields with Elementor Using Custom Post Types and Advanced Custom Fields with Elementor
Using Custom Post Types and Advanced Custom Fields with Elementor
 

Último

Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxCeline George
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Denish Jangid
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticspragatimahajan3
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff17thcssbs2
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Mohamed Rizk Khodair
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesashishpaul799
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the lifeNitinDeodare
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17Celine George
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPragya - UEM Kolkata Quiz Club
 
Behavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfBehavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfaedhbteg
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resourcesaileywriter
 

Último (20)

Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
 
Behavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfBehavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdf
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 

What is the WordPress Loop?

  • 1. What is the WordPress Loop? By Ronald Huereca September 15th, 2011
  • 2. Most of you have seen this screen:
  • 3. Most of you have not seen this one:
  • 4. When you a post... Your post gets saved in a “posts” database table Your post can have: Post Meta (custom fields) Taxonomies (Categories, Tags, Post Format) Attachments (Featured images, galleries) And lots more!
  • 5. WordPress and your theme automatically turns this...
  • 6. ...into a post your users can see on a web site.
  • 7. How do you go from this...
  • 10. Queries decide... Which items to display Under which category And sorted in a particular order And any other conditions you can think of
  • 11. An example query... grab the post by grab the post by ID 2338 post_status draft grab posts by sort by date published the post’s author
  • 12. Once you have the results of the Query, you can display them.
  • 13. Here is a query result displayed:
  • 14. The results from a query are outputted in the form of a Loop.
  • 15. This post is one iteration of a WordPress Loop.
  • 16. Let’s look what makes up a Loop Item in WordPress...
  • 17. The Loop Dissected Date Published Post Author Post Title Post Content
  • 18. So how do you create your own Loop (cough, the hard way)? Create your own Query - http://codex.wordpress.org/Template_Tags/get_posts Create a page template in your theme - http://codex.wordpress.org/Pages#Page_Templates Assign that page template to a page in WordPress Anything more complicated, you may want to create your own child theme
  • 19. Or you can use LoopBuddy and Builder (the easy way) Create unlimited queries and Loop layouts Override any section The front page The archive pages An individual post or page Search results Create a new section A “blog” archive A custom 404 page A sitemap
  • 20. no coding or theme modifications required!
  • 22. Try out LoopBuddy and be blown away at the possibilities Try it at: http://trials.ithemes.com/config/loopbuddy Buy it at: http://pluginbuddy.com/purchase/loopbuddy