Title: PHP Code
Last modified: October 19, 2017

---

# PHP Code

 *  [Sewlicious](https://wordpress.org/support/users/sewlicious/)
 * (@sewlicious)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/)
 * Where do I add the PHP code?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-code-64%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9603416)
 * Hi there,
    You can create & activate child theme, then add PHP code to the functions.
   php file in the child theme directory.
 * Or you can install another plugin to add PHP code to your site.
 * Best regards,
 *  Thread Starter [Sewlicious](https://wordpress.org/support/users/sewlicious/)
 * (@sewlicious)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9612336)
 * I added the code to the front-page file and got an error saying it could not 
   handle the request when I tried to view my website.
 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9613941)
 * Hi,
    It might have a syntax error in your code. Can you paste the code here? 
   We will check and correct it for you. Best regards,
 *  Thread Starter [Sewlicious](https://wordpress.org/support/users/sewlicious/)
 * (@sewlicious)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9616571)
 * Here’s the code <?php echo do_shortcode(“[pt_view id=eb5ffabw7o]”); ?>
 * thank you for your help!
 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9617710)
 * Thank you for your reply.
    But we need the whole code of your front-page file
   after you added this code `<?php echo do_shortcode(“[pt_view id=eb5ffabw7o]”);?
   >`. Might you please send?
 * Best regards,

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

The topic ‘PHP Code’ is closed to new replies.

 * ![](https://ps.w.org/content-views-query-and-display-post-page/assets/icon.svg?
   rev=2932226)
 * [Content Views - Post Grid & Filter, Recent Posts, Category Posts ... (Shortcode, Gutenberg Blocks, and Widgets for Elementor)](https://wordpress.org/plugins/content-views-query-and-display-post-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-views-query-and-display-post-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/)
 * [Active Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Content Views](https://wordpress.org/support/users/pt-guy/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/php-code-64/#post-9617710)
 * Status: not resolved