Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hey @alchymyth and @yvojolie this is great stuff.

    I am trying to insert the “category list” anywhere I want inside the actual content. When I follow your example it posts it before all of the_content.

    I followed the answer provided on this forum by @vtxyzzy and it worked well with allowing me to post the_title inside the_content using a shortcode. Here is the code from that forum (I especially enjoy the ability to add html tags before and after!)

    function mm_insert_title_func($atts) {
       // Insert the post title, with optional before and after strings.
       // [mm-insert-title before='<h3>' after='</h3>']
       global $post;
       extract(shortcode_atts(array('before' => '', 'after' => '' ), $atts));
       $output = "{$before}{$post->post_title}{$after}";
    
       return $output;
    }
    add_shortcode('mm-insert-title', 'mm_insert_title_func');

    But trying to hack it together to work with get_the_category_list hasn’t worked yet.

    To sum up, I want to be able to place all categories inside my content with the same functionality it usually has everywhere else in wordpress.

Viewing 1 replies (of 1 total)