• I’m using the code below to pull 2 most recent featured News post to a custom homepage. It’s all working but only on the home page does it strip out html tags (bold/italics). What am i missing.. The formatting is showing up fine on individual blog posts.

      <?php
      $args = array( ‘posts_per_page’ => 2, ‘offset’=> 0, ‘category’ => 7 );
      $myposts = get_posts( $args );
      foreach ( $myposts as $post ) : setup_postdata( $post ); ?>

    • <header class=”article-header”><h2>“><?php the_title(); ?></h2>
      <?php the_date(); ?></header>

      <section class=”entry-content clearfix” itemprop=”articleBody”><?php the_excerpt(); ?></section>

    • <?php endforeach;
      wp_reset_postdata();?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Stripping out html from Editor using a featured cat for home page.’ is closed to new replies.