Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




post_class [ WordPress Function ]

post_class ( $class = '', $post_id = null )
Parameters:
  • (string|array) $class One or more classes to add to the class list.
  • (int) $post_id An optional post ID.
Defined at:



Display the classes for the post div.

Source


<?php
function post_class$class ''$post_id null ) {
    
// Separates classes with a single space, collates classes for post DIV
    
echo 'class="' join' 'get_post_class$class$post_id ) ) . '"';
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics