Title: Php shortcode
Last modified: September 10, 2021

---

# Php shortcode

 *  [bimofix](https://wordpress.org/support/users/bimofix/)
 * (@bimofix)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-shortcode-26/)
 * Hello,
 * I would like to insert a php shortcode to my single-product page. Is there something
   like this? I would like to display the table of content to all my products like
   this:
 * [https://passion-hund.de/hunderassen/afghanischer-windhund/](https://passion-hund.de/hunderassen/afghanischer-windhund/)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-shortcode-26%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Julian](https://wordpress.org/support/users/julianri/)
 * (@julianri)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-shortcode-26/#post-15152248)
 * Hi, you can insert shortcodes in PHP using:
 * echo do_shortcode( ” );
 * So for LuckyWP ToC this should work:
 * echo do_shortcode( ‘[lwptoc]’ );

Viewing 1 replies (of 1 total)

The topic ‘Php shortcode’ is closed to new replies.

 * ![](https://ps.w.org/luckywp-table-of-contents/assets/icon-256x256.png?rev=2100677)
 * [LuckyWP Table of Contents](https://wordpress.org/plugins/luckywp-table-of-contents/)
 * [Support Threads](https://wordpress.org/support/plugin/luckywp-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/luckywp-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/luckywp-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/luckywp-table-of-contents/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Julian](https://wordpress.org/support/users/julianri/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/php-shortcode-26/#post-15152248)
 * Status: not resolved