Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $content = apply_filters( 'the_content', get_the_content() );
- $contentWithoutHTML = wp_strip_all_tags($content);
- $pos = strpos($contentWithoutHTML, " ", 100);
- $contentFinal = substr($contentWithoutHTML,0,$pos );
- echo $contentFinal . "...";
- ?>
- <?php
- $args = array(
- 'orderby' => 'ID',
- 'order' => 'ASC',
- 'posts_per_page' => 7,
- 'meta_query' => array(
- array(
- 'key' => '_thumbnail_id'
- )
- )
- );
- $query = new WP_Query($args);
- while ($query->have_posts()):
- $query->the_post();
- ?>
- <div class="articleboxs boxs">
- <div class="col-sm-4 noleft">
- <div class="aricleleft boxs">
- <?php the_post_thumbnail('medium', array(
- 'class' => 'img-responsive'
- )) ?>
- </div>
- </div>
- <div class="col-sm-8 noright">
- <div class="aricleright boxs">
- <div class="boxs">
- <a href="<?php echo get_permalink(); ?>"><h2 class="heading font_Libre"><?php the_title(); ?></h2></a>
- <?php
- $content = apply_filters('the_content', get_the_content('', true));
- print_r($content);
- $contentWithoutHTML = wp_strip_all_tags($content);
- $pos = strpos($contentWithoutHTML, " ", 100);
- $contentFinal = substr($contentWithoutHTML, 0, $pos);
- ?>
- <p class="font_Roboto"><?php echo $contentFinal . "..."; ?></p>
- </div>
- </div>
- </div>
- </div>
- <?php
- endwhile;
- wp_reset_postdata();
- ?>
- $content = mb_strimwidth(wp_strip_all_tags(get_the_content()), 0, 100, '...');
- echo $content;
- <?php
- $contentWithoutHTML = wp_strip_all_tags($post->post_content);
- $pos = strpos($contentWithoutHTML, " ", 100);
- $contentFinal = substr($contentWithoutHTML,0,$pos );
- ?>
- <p class="font_Roboto"><?php echo $contentFinal . "..."; ?></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement