Search
 
SCRIPT & CODE EXAMPLE
 

PHP

what is post_class()

/* we see in php code  */
<div id="post-<?php the_ID(); ?>" <?php post_class( 'class-name' ); ?>>

/*  we see in html code like this   */
<div id="post-4564" class="class-name post-4564 post type-post status-publish format-standard hentry category-news">
Comment

what is post_class()

/*    Use an array to add multiple classes in post_class() function:  */
<?php
$classes = array(
    'class1',
    'class2',
    'class3',
);
?>
 
<div id="post-<?php the_ID(); ?>" <?php post_class( $classes ); ?>>
Comment

what is post_class()

/*  A simple way to add multiple classes to the post_class defaults, is to just write them as a string argument:  */

<div <?php post_class( 'class1 class2 class3' ); ?>>
Comment

PREVIOUS NEXT
Code Example
Php :: stop php execution with javascript 
Php :: letzten 3 zeichen aus einem string entfernen php 
Php :: yajra add column 
Php :: Multiple Formats with PHP DateTime::createFromFormat() 
Php :: symfony check:requirements Fatal error: Using $this when not in object context in C:UsersAdmin.symfonycachecheck.php on line 778 exit status 255 
Php :: php script 
Php :: resource route laravel 
Php :: codeigniter apache remove index.php 
Php :: laravel get fetch api request body 
Php :: hide .php 
Php :: laravel verification email 
Php :: undefined reference to 
Php :: change email to username laravel login 
Php :: WP Migrate Lite 
Php :: php in browser 
Php :: recorrer un array php 
Php :: php invoke method 
Php :: ERROR: The following modules depend on mpm_prefork and need to be disabled first: php7.2 
Java :: recycler view dependency 
Java :: spring jpa repository gradle 
Java :: latest dependency for snackbar android 
Java :: java pause 1 second 
Java :: nanotime to milliseconds java 
Java :: how to generate random numbers in java within range 
Java :: joptionpane.showconfirmdialog yes no example 
Java :: how can I split string according to space in java? 
Java :: android essential plugin missing 
Java :: java chararray to int 
Java :: floyd triangle in java 
Java :: java split string into list 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =