Title: PHP code?
Last modified: November 29, 2016

---

# PHP code?

 *  Resolved [jimcarroll](https://wordpress.org/support/users/jimcarroll/)
 * (@jimcarroll)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-code-58/)
 * Forgive me if this has been asked before.
 * Is there a way to embed a category post using PHP code, instead of the [catlist
   name=agriculture excerpt=no] method?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Daniel Floeter](https://wordpress.org/support/users/kometschuh/)
 * (@kometschuh)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-code-58/#post-8492981)
 * You can find all of our Shortcode features integration here in our blog posts:
   [http://tiptoppress.com/tag/shortcode/](http://tiptoppress.com/tag/shortcode/)
 * Daniel
 *  Thread Starter [jimcarroll](https://wordpress.org/support/users/jimcarroll/)
 * (@jimcarroll)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-code-58/#post-8493010)
 * Hi Daniel
 * Thanks for the fast response….
 * I’ve got some custom pages, i.e.
 * [https://www.jimcarroll.com/category/trends/agriculture/](https://www.jimcarroll.com/category/trends/agriculture/)
 * What I’d like to do is provide a list of the most recent posts, by category, 
   shortly after the intro section…. such as I do here:
 * [https://www.jimcarroll.com/trends/](https://www.jimcarroll.com/trends/)
 * The agriculture page above is generated by this code:
 * elseif (is_category(’36’)) { ?> <!– Agriculture category –>
    <div class=”category_description”
   > <p class=”quote”><span>“</span>Jim spent so much time customizing the presentation
   for one agricultural conference that at the conclusion, one fellow came up and
   asked him how long he had been a farmer!<span>”</span></p> <br> <?php echo do_shortcode(‘[
   smartslider3 slider=21]’); ?> <br>Jim has extensive experience with all aspects
   of the agricultural sector. etc etc </div> <br> [catlist name=agriculture excerpt
   =no] <?php }
 * I’m hoping to replace [catlist name=agriculture excerpt=no] with appropriate 
   PHP code … is that possible?
 *  Plugin Author [Daniel Floeter](https://wordpress.org/support/users/kometschuh/)
 * (@kometschuh)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-code-58/#post-8493130)
 * Our Shortcode is [catposts]
 * But only for the content (editor) and edit the settings in the Customizer.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP code?’ is closed to new replies.

 * ![](https://ps.w.org/category-posts/assets/icon-256x256.png?rev=1419008)
 * [Category Posts Widget](https://wordpress.org/plugins/category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-posts/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 3 replies
 * 2 participants
 * Last reply from: [Daniel Floeter](https://wordpress.org/support/users/kometschuh/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/php-code-58/#post-8493130)
 * Status: resolved