Suche senden
Hochladen
WP_Query Overview
•
Als ODP, PDF herunterladen
•
1 gefällt mir
•
2,355 views
M
Michael Pretty
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 11
Jetzt herunterladen
Empfohlen
Android - Values folder
Android - Values folder
Maneesha Caldera
How to replace an XML Configuration file with a Java Configuration file in a ...
How to replace an XML Configuration file with a Java Configuration file in a ...
Jayasree Perilakkalam
Victoria wordpress
Victoria wordpress
Flynn O'Connor
Creating Custom Drupal Modules
Creating Custom Drupal Modules
tanoshimi
Drupal Module Development
Drupal Module Development
ipsitamishra
Rpug - Puppet 4 Module Data
Rpug - Puppet 4 Module Data
Jere Julian
The Render API in Drupal 7
The Render API in Drupal 7
frandoh
Super keyword in java
Super keyword in java
Hitesh Kumar
Empfohlen
Android - Values folder
Android - Values folder
Maneesha Caldera
How to replace an XML Configuration file with a Java Configuration file in a ...
How to replace an XML Configuration file with a Java Configuration file in a ...
Jayasree Perilakkalam
Victoria wordpress
Victoria wordpress
Flynn O'Connor
Creating Custom Drupal Modules
Creating Custom Drupal Modules
tanoshimi
Drupal Module Development
Drupal Module Development
ipsitamishra
Rpug - Puppet 4 Module Data
Rpug - Puppet 4 Module Data
Jere Julian
The Render API in Drupal 7
The Render API in Drupal 7
frandoh
Super keyword in java
Super keyword in java
Hitesh Kumar
The Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the Query
Chris Olbekson
WordPress Queries - the right way
WordPress Queries - the right way
Anthony Hortin
WordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
Wp query
Wp query
Savita Soni
You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012
l3rady
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know query
l3rady
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)
andrewnacin
You Don't Know Query - WordCamp Portland 2011
You Don't Know Query - WordCamp Portland 2011
andrewnacin
WordPress plugin #3
WordPress plugin #3
giwoolee
WP_Query, pre_get_posts, and eliminating query_posts()
WP_Query, pre_get_posts, and eliminating query_posts()
Erick Hitter
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
Custom Post Types and Meta Fields
Custom Post Types and Meta Fields
Liton Arefin
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
Wordcamp Fayetteville Pods Presentation (PDF)
Wordcamp Fayetteville Pods Presentation (PDF)
mpvanwinkle
Getting Creative with WordPress Queries
Getting Creative with WordPress Queries
DrewAPicture
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
Apostrophe
Apostrophe
tompunk
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
Mizanur Rahaman Mizan
Getting Started With WordPress Development
Getting Started With WordPress Development
Andy Brudtkuhl
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
Tammy Hart
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Weitere ähnliche Inhalte
Ähnlich wie WP_Query Overview
The Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the Query
Chris Olbekson
WordPress Queries - the right way
WordPress Queries - the right way
Anthony Hortin
WordPress Structure and Best Practices
WordPress Structure and Best Practices
markparolisi
Wp query
Wp query
Savita Soni
You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012
l3rady
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know query
l3rady
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)
andrewnacin
You Don't Know Query - WordCamp Portland 2011
You Don't Know Query - WordCamp Portland 2011
andrewnacin
WordPress plugin #3
WordPress plugin #3
giwoolee
WP_Query, pre_get_posts, and eliminating query_posts()
WP_Query, pre_get_posts, and eliminating query_posts()
Erick Hitter
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Amanda Giles
Custom Post Types and Meta Fields
Custom Post Types and Meta Fields
Liton Arefin
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Paul Bearne
Wordcamp Fayetteville Pods Presentation (PDF)
Wordcamp Fayetteville Pods Presentation (PDF)
mpvanwinkle
Getting Creative with WordPress Queries
Getting Creative with WordPress Queries
DrewAPicture
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Amanda Giles
Apostrophe
Apostrophe
tompunk
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
Mizanur Rahaman Mizan
Getting Started With WordPress Development
Getting Started With WordPress Development
Andy Brudtkuhl
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
Tammy Hart
Ähnlich wie WP_Query Overview
(20)
The Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the Query
WordPress Queries - the right way
WordPress Queries - the right way
WordPress Structure and Best Practices
WordPress Structure and Best Practices
Wp query
Wp query
You don’t know query - WordCamp UK Edinburgh 2012
You don’t know query - WordCamp UK Edinburgh 2012
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know query
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query (WordCamp Netherlands 2012)
You Don't Know Query - WordCamp Portland 2011
You Don't Know Query - WordCamp Portland 2011
WordPress plugin #3
WordPress plugin #3
WP_Query, pre_get_posts, and eliminating query_posts()
WP_Query, pre_get_posts, and eliminating query_posts()
The Way to Theme Enlightenment
The Way to Theme Enlightenment
Custom Post Types and Meta Fields
Custom Post Types and Meta Fields
Childthemes ottawa-word camp-1919
Childthemes ottawa-word camp-1919
Wordcamp Fayetteville Pods Presentation (PDF)
Wordcamp Fayetteville Pods Presentation (PDF)
Getting Creative with WordPress Queries
Getting Creative with WordPress Queries
The Way to Theme Enlightenment 2017
The Way to Theme Enlightenment 2017
Apostrophe
Apostrophe
WordPress Theme Design and Development Workshop - Day 2
WordPress Theme Design and Development Workshop - Day 2
Getting Started With WordPress Development
Getting Started With WordPress Development
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
Kürzlich hochgeladen
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Kürzlich hochgeladen
(20)
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
WP_Query Overview
1.
2.
Returned posts are
based on passed in arguments
3.
4.
The values in
this array are used within the WP_Query->get_posts() method to build the final SQL query
5.
6.
Also used within
the WP_Query->get_posts() method to assign defaults for required/unset query_vars
7.
8.
is_day – if
query contains a day
9.
is_feed – if
query is for feed display
10.
is_page - if
query return single page (post type page)
11.
is_single – if
the query is for a single post
12.
is_singular – if
the query is for a single post object
13.
...
14.
15.
16.
max_num_pages – number
of pages based on the current posts_per_page and found_posts
17.
post_count – number
of posts in the current posts array
18.
posts – array
containing posts result
19.
20.
21.
22.
some template functions
only use the global instance, ie next_post_link(), prev_post_link(), etc.
23.
Example: query_posts(array('meta_key'=>'show', 'meta_value'=>
$show->ID, 'paged'=>get_query_var('paged')));
24.
25.
26.
27.
posts_join – allows
modification of the join statement
28.
posts_orderby – allows
modification of the order by statement
29.
30.
Example: function filter_where($where,
$wp_query) { if(!is_admin() && ($wp_query->get('post_type') == 'background')) { $cur_time = time(); $where.= " AND (EndDate.meta_value is null OR EndDate.meta_value >= '$cur_time'; } return $where; }
Jetzt herunterladen