Was ist query?

Antwort: Damit kann man so gut wie jede SQL-Query manipulieren.

Damit kann man so gut wie jede SQL-Query manipulieren.

Benutzung

<?php
function my_option( $current_query ) {
    global $wpdb;
    $my_query = 'SELECT * FROM ' . $wpdb->posts;
    return $my_query;
}
add_filter( 'query', 'my_query' );
?>
Artikelinformationen:
geschrieben von: Thomas Herzog
geschrieben am: 11.05.2011 um 15:20 Uhr
abgelegt unter: 500, Hooks
getaggt mit: ,

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">