Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- THIS WILL BE UPDATED CONTINUOUSLY
- Limit content
- =====================================================================================
- <?php function content($num) {
- $theContent = get_the_content();
- $output = strip_tags($theContent);
- //$output = preg_replace('/<img[^>]+./','', $theContent);
- //$output = preg_replace( '/<blockquote>.*<\/blockquote>/', '', $output );
- //$output = preg_replace( '/<h2>.*<\/h2>/', '', $output );
- //$output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
- $limit = $num+1;
- $content = explode(' ', $output, $limit);
- array_pop($content);
- $content = implode(" ",$content)."...";
- echo $content;
- } ?>
- CHILD THEME DIRECTORY PATH
- =====================================================================================
- <?php echo dirname( get_bloginfo('stylesheet_url')); ?>
- display post thumbnail - particular size
- =====================================================================================================
- <?php the_post_thumbnail( array(400, 200) ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement