Shortcodes Pro
Markup being stripped out? (3 posts)

  1. MACscr
    Posted 3 years ago #

    I am using 1.1.3 (only because 1.1.4 doesnt even install correctly) and I have a couple attributes setup and the custom code set to php. I then put the following in the code section:

    echo list_blog_posts($atts);

    Then i added to my themes function.php:

    function list_blog_posts($atts) {
      $list_output = '<h2>Recent Blog Posts</h2>';
      $list_output +='<ul class="blog_post_list">';
      $cat_obj = get_category_by_slug($atts["categoryslug"]);
      $cat_id = $cat_obj->term_id;
      global $post;
      $args = array( 'numberposts' => $atts["postslimit"], 'category' => $cat_id );
      $myposts = get_posts( $args );
      foreach( $myposts as $post ) :  setup_postdata($post);
              $list_output += '<li><a href="'.the_permalink().'">'.the_title().' </a></li>';
      $list_output += '</ul>';
      return $list_output;

    The problem is that for some reason, its string out all markup on display. It has the url (but not linked) and the titles, but no html markup at all. This shouldnt still be happening if its a shortcode should it?


  2. MACscr
    Posted 3 years ago #

    Come on Matt, i made you aware of your plugin being broken in the repo, but ya cant check out this bug? Its kind of a pretty important one that is very frustrating.

  3. MACscr
    Posted 3 years ago #

    It still exists in 1.1.5 just in case that is a concern.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shortcodes Pro
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.