• Hi, usually php snippet will be pasted in a child theme functions.php, but what about the snippet that looks like this? Where can I paste this, because it seems like it’s not working when I pasted it in my functions.php.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • It goes in one of the template files. There are many. Which page do you want it to appear on, and where in the page?

    You will need to copy one of the template files at
    wp-content/plugins/woocommerce/templates/…
    or, if your theme has its own template files, at
    wp-content/themes/my-theme-name/woocommerce/…
    then put your edited template at
    wp-content/themes/my-child-theme-name/woocommerce/…

    • This reply was modified 8 years, 4 months ago by lorro.
    Thread Starter alexcts

    (@alexcts)

    Thanks for your reply, the snippet that I wanted to use is to create a link on my top navigation menu that will change according to the login status of the user. So I am wondering which file I should paste this snippet in.

    OK that would be a theme template, not a WooCommerce template. In Twenty Sixteen, that would be header.php. Unfortunately themes vary so your’s may be different.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Where to paste the theme snippet?’ is closed to new replies.