Answers for "wp_post class"

PHP
0

wp $_post

//Form:
<input type="text" name="unique_name" />
 
//Post Page:

$name=$_POST['unique_name'];
echo $name;
Posted by: Guest on May-12-2021
0

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">
Posted by: Guest on November-13-2020
0

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' ); ?>>
Posted by: Guest on November-13-2020

Browse Popular Code Answers by Language