Title: Adding code customizations to Boutique Storefront theme
Last modified: January 21, 2020

---

# Adding code customizations to Boutique Storefront theme

 *  Resolved [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/)
 * Hi! My site is about to go public and I’m having a sudden issue. Because I’m 
   using BOUTIQUE, a child theme of woocommerce’s storefront, they say not to add
   code to the theme’s template, because it won’t stay there with updates. It leads
   me to download a plugin called Theme Customizations to input my code snippets.
   I’ve been doing this and it has given me trouble in the past and has now created
   a critical error in my site. I’ve de-activated the plugin. I’m trying to input
   the following code to display my 4 custom taxonomies on the frontend of my products.
   This was working perfectly until it suddenly broke my site. How else can I upload
   this, and could there be something wrong with the code?
 * Thanks so much for your help in this time sensitive manner!
 * add_action( ‘woocommerce_product_meta_end’, ‘action_product_meta_end’ );
    function
   action_product_meta_end() {
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘author’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘author’, ‘<span class=”posted_in”
   >’ . _n( ‘Author:’, ‘Authors:’, count( $term_ids ), ‘woocommerce’ ) . ‘ ‘, ‘,‘,‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘narrator’, array(‘fields’
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘narrator’, ‘<span class=”posted_in”
   >’ . _n( ‘Narrator:’, ‘Narrators:’, count( $term_ids ), ‘woocommerce’ ) . ‘ ‘,‘,‘,‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘series’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘series’, ‘<span class=”posted_in”
   >’ . _n( ‘Series:’, ‘Series:’, count( $term_ids ), ‘woocommerce’ ) . ‘ ‘, ‘, ‘,‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘length’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘length’, ‘<span class=”posted_in”
   >’ . _n( ‘Length:’, ‘Length:’, count( $term_ids ), ‘woocommerce’ ) . ‘ ‘, ‘, ‘,‘
   </span>’ );
    }

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

 *  [crslz](https://wordpress.org/support/users/crslz/)
 * (@crslz)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12350107)
 * Hi,
 * You could start by turning on error reporting on your website and working on 
   those error messages.
 * > [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/)
 *  Thread Starter [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12350138)
 * So I should purposefully make the critical error again? Where do I add the debug
   code?
 *  [crslz](https://wordpress.org/support/users/crslz/)
 * (@crslz)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12350149)
 * All information about debugging can be found in the link that I have shared.
 * And in this way you can start adding custom code that is ‘update safe’.
    [https://wordpress.org/support/topic/custom-function-in-functions-php/#post-12288597](https://wordpress.org/support/topic/custom-function-in-functions-php/#post-12288597)
 *  [Mohit Mishra](https://wordpress.org/support/users/mohitmishra/)
 * (@mohitmishra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12351558)
 * Hello [@ss60](https://wordpress.org/support/users/ss60/),
    You can create a custom
   plugin and put this custom code in that. Step for creating the Custom Plugin 
   1-Create a PHP file in the plugins folder of your WordPress site with name custom-
   plugin.php 2- Then put the following code into that all your problems will be
   solved through it.`<?php `/** * Plugin Name: Custom Plugin * Description: This
   woocommerce plugin customize your child theme * Version: 1.0.0 * Author: Mohit
   Mishra * Author URI: [https://makewebbetter.com](https://makewebbetter.com) *
   Requires at least: 3.5 * Tested up to: 5.2.4 * WC tested up to: 3.7.1 * Text 
   Domain: custom-plugin * Domain Path: /languages * License: GPL-3.0+ * License
   URI: [http://www.gnu.org/licenses/gpl-3.0.txt](http://www.gnu.org/licenses/gpl-3.0.txt)*/
 * /**
    * Exit if accessed directly */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } add_action(‘
   woocommerce_product_meta_end’, ‘action_product_meta_end’ );
 * function action_product_meta_end() {
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘author’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘author’, ‘<span class=”posted_in”
   >’ . _n( ‘Author:’, ‘Authors:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’,‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘narrator’, array(‘fields’
   => ‘ids’) );
    echo get_the_term_list( $product->get_id(), ‘narrator’, ‘<span 
   class=”posted_in”>’ . _n( ‘Narrator:’, ‘Narrator:’, count( $term_ids ), ‘woocommerce’).”,‘,’,‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘series’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘series’, ‘<span class=”posted_in”
   >’ . _n( ‘Series:’, ‘Series:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’, ‘
   </span>’ );
 *  global $product;
 *  $term_ids = wp_get_post_terms( $product->get_id(), ‘length’, array(‘fields’ 
   => ‘ids’) );
 *  echo get_the_term_list( $product->get_id(), ‘length’, ‘<span class=”posted_in”
   >’ . _n( ‘Length:’, ‘Length:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’, ‘
   </span>’ );
    } Then Save the file and go the admin section then at there you 
   will see the cistom plugin with name “Custom Plugin” then activate this plugin
   all your problems will be gone through it.
 *  Thread Starter [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12351714)
 * Thank you!! I’m sorry, but how do I create a PHP file? I’m trying to look it 
   up. I use WP File Manager to access everything through WP admin, but I only see
   an option to add TXT, CSS, or HTML. Or to upload a file.
 * Sorry I don’t know how to code well!
 *  Thread Starter [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12351763)
 * Update: I figured out how to do it and got the plugin created, but when I tried
   to activate it I got this note:
 * Parse error: syntax error, unexpected end of file, expecting ‘`’ in /home1/audiobq4/
   public_html/wp-content/plugins/custom-plugin/custom-plugin.php on line 49
 * What do I do?
 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12353161)
 * Hi there,
 * Without seeing the contents of that file, it’s hard to say for sure what’s going
   in. Based on the report itself, there’s a PHP coding issue on line 49 of your`
   custom-plugin`.
 * Any chance you can share just that line here? Or even better, all the content
   of the custom-plugin/custom-plugin.php file?
 *  Thread Starter [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12354851)
 * Hi RK, I put in exactly what [@mohitmishra](https://wordpress.org/support/users/mohitmishra/)
   posted above. Here it is again:
 *     ```
       <?php
       ```
   
 * /**
    * Plugin Name: Custom Plugin * Description: This woocommerce plugin customize
   your child theme * Version: 1.0.0 * Author: Mohit Mishra * Author URI: [https://makewebbetter.com](https://makewebbetter.com)*
   Requires at least: 3.5 * Tested up to: 5.2.4 * WC tested up to: 3.7.1 * Text 
   Domain: custom-plugin * Domain Path: /languages * License: GPL-3.0+ * License
   URI: [http://www.gnu.org/licenses/gpl-3.0.txt](http://www.gnu.org/licenses/gpl-3.0.txt)*/
 * /**
    * Exit if accessed directly */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } add_action(‘
   woocommerce_product_meta_end’, ‘action_product_meta_end’ );
 * function action_product_meta_end() {
 * global $product;
 * $term_ids = wp_get_post_terms( $product->get_id(), ‘author’, array(‘fields’ =
   > ‘ids’) );
 * echo get_the_term_list( $product->get_id(), ‘author’, ‘<span class=”posted_in”
   >’ . _n( ‘Author:’, ‘Authors:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’,‘
   </span>’ );
 * global $product;
 * $term_ids = wp_get_post_terms( $product->get_id(), ‘narrator’, array(‘fields’
   => ‘ids’) );
    echo get_the_term_list( $product->get_id(), ‘narrator’, ‘<span 
   class=”posted_in”>’ . _n( ‘Narrator:’, ‘Narrator:’, count( $term_ids ), ‘woocommerce’).”,‘,’,‘
   </span>’ );
 * global $product;
 * $term_ids = wp_get_post_terms( $product->get_id(), ‘series’, array(‘fields’ =
   > ‘ids’) );
 * echo get_the_term_list( $product->get_id(), ‘series’, ‘<span class=”posted_in”
   >’ . _n( ‘Series:’, ‘Series:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’, ‘
   </span>’ );
 * global $product;
 * $term_ids = wp_get_post_terms( $product->get_id(), ‘length’, array(‘fields’ =
   > ‘ids’) );
 * echo get_the_term_list( $product->get_id(), ‘length’, ‘<span class=”posted_in”
   >’ . _n( ‘Length:’, ‘Length:’, count( $term_ids ), ‘woocommerce’ ) . ”, ‘,’, ‘
   </span>’ );
    } Then Save the file and go the admin section then at there you 
   will see the cistom plugin with name “Custom Plugin” then activate this plugin
   all your problems will be gone through it.
 *  [Mohit Mishra](https://wordpress.org/support/users/mohitmishra/)
 * (@mohitmishra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12356001)
 * Hello [@ss60](https://wordpress.org/support/users/ss60/) You can download the
   plugin from here just click on the below link and download and install it on 
   your website but make sure remove the previous file.
    [https://bit.ly/3axjjdw](https://bit.ly/3axjjdw)
 *  Thread Starter [ss60](https://wordpress.org/support/users/ss60/)
 * (@ss60)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12360461)
 * Thanks so much!!
 *  [Mohit Mishra](https://wordpress.org/support/users/mohitmishra/)
 * (@mohitmishra)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12360486)
 * [@ss60](https://wordpress.org/support/users/ss60/) Always welcome, If you any
   problem related to woocommerce and wordpress you can directly ping me. I am here
   to help you.
 *  [Austin M – a11n](https://wordpress.org/support/users/apmwebdev/)
 * (@apmwebdev)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12387236)
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved.
   Feel free to start a new thread if you have any further questions!

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

The topic ‘Adding code customizations to Boutique Storefront theme’ is closed to
new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 12 replies
 * 5 participants
 * Last reply from: [Austin M – a11n](https://wordpress.org/support/users/apmwebdev/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/adding-code-customizations-to-boutique-storefront-theme/#post-12387236)
 * Status: resolved