Line of php code appearing at top of all WP pages…
-
I recently made my first attempt at a custom function, namely changing the title for a woocommerce page from “Shop” to “Products,” using this code I found in a relevant tutorial:
add_filter( 'woocommerce_page_title', 'woo_shop_page_title'); function woo_shop_page_title( $page_title ) { if( 'Shop' == $page_title) { return "Product Catalog"; } }
I’m working with a Cyberchimps Responsive Child Theme, and thus pasted the code directly into “Theme Functions” (
functions.php
) in the Editor.However, while this moved effected the change I was looking for, it has also left me with that line of code hanging out at the top of all the WP pages at that domain, including all the admin pages. I’ve tried adding opening an closing
<?php ?>
tags, but those left me with this weird parsing error involving the<
character.Does anyone have any ideas on what could be the issue? Thanks!
Here’s the site:
https://nashvillechocolatecompany.com/wordpress/
- The topic ‘Line of php code appearing at top of all WP pages…’ is closed to new replies.