WordPress.org

Forums

List category posts
Getting the shortcode to work if placed in theme ? (4 posts)

  1. nknews
    Member
    Posted 4 years ago #

    I want to have the short code render in part of index.php.

    Does anyone know how to do this so it actually works? When I put the shortcode in the index php (even in a div), it just renders as the code - instead of the list of posts.

    Thanks

    http://wordpress.org/extend/plugins/list-category-posts/

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

  3. fernandobt
    Member
    Plugin Author

    Posted 4 years ago #

    nknews as alchymyth said, you can use the do_shortcode function on your index.php file.

    Use something like:

    <?php
        do_shortcode('[catlist id=5]');
    ?>
  4. Stefano De Prophetis
    Member
    Posted 3 years ago #

    Hi there... i know it's an old tread, but i'm having problems on using do_shortcode in my index.php file. Is it possible that this function only works into templates?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List category posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic