WordPress.org

Ready to get started?Download WordPress

Forums

Shortcodes Pro
Markup being stripped out? (3 posts)

  1. MACscr
    Member
    Posted 1 year 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>';
      endforeach;
      $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?

    http://wordpress.org/extend/plugins/shortcodes-pro/

  2. MACscr
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.