This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal fade" id="custdetail" role="dialog"> | |
<div class="modal-dialog"> | |
<!-- Modal content--> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button> | |
<h4 class="modal-title" id="myModalLabel">More About Joe</h4> | |
</div> | |
<div class="modal-body"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace your my-first-custom-element.php with code below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_value=get_post_meta($post->ID,'views',true); | |
//get_post_meta( int $post_id, string $key = '', bool $single = false )) | |
if(!empty($meta_value)){ | |
echo $meta_value; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function excerpt_length_example( $words ) { | |
return 15; | |
} | |
add_filter( 'excerpt_length', 'excerpt_length_example' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
siteURL/wp-admin/post.php?post=37&action=edit | |
Here, 37 is page ID. | |
<?php $the_query = new WP_Query( 'page_id=37' ); | |
while ($the_query -> have_posts()) : $the_query -> the_post(); ?> | |
//Content Area. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function excerpt_length_example( $words ) { | |
return 15; | |
} | |
add_filter( 'excerpt_length', 'excerpt_length_example' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args_blog=array( | |
'post_type'=>'blog', | |
'posts_per_page'=>'5', //for getting only 5 posts | |
'order'=>'ASC', //last input first output | |
'orderby'=>'menu_order', //according to field | |
if you want to disply all post then replace 5 by -1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args_blog=array( | |
'post_type'=>'blog', | |
'posts_per_page'=>'5', //for getting only 5 posts | |
'order'=>'ASC', //last input first output | |
'orderby'=>'menu_order', //according to field | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args_blog=array( | |
'post_type'=>'blog', | |
'posts_per_page'=>'5', //for getting all posts | |
'order'=>'ASC', //last input first output | |
'orderby'=>'menu_order', //according to field | |
NewerOlder