It’s not clear where you need to add this additional code. But I would assume that it is in ‘include’-type files that you need to run in the portion of the generated page.
So, to do that, use the add_action('wp_head','your-function-name')
to load your external function file:
add_action('wp_head','include_my_include');
function include_my_include() {
include get_template_directory() . 'your-function-file.php';
return;
}
See here: https://codex.wordpress.org/Function_Reference/get_template_directory .
This code would be in your theme’s (Child Theme, hopefully) function.php file.
Related Posts:
- how to override woocommerce specific loop or archive-product.php [closed]
- Get all products with a custom attribute
- pagination in woocommerce order history page
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Disable email field on WooCommerce customer account details
- Show post page only if the user has bought a specific product
- redirect product-category to a custom page
- Woocommerce Product page edit
- Setting up Different Layouts for Each Product Category and Subcategory [closed]
- How to redirect WooCommerce shop URL?
- Unable to display custom fields on WooCommerce product pages
- Send a custom WooCommerce email when custom order change [closed]
- Change WooCommerce product price based on category and GEO IP country
- Automatically Update Woocommerce Prices [closed]
- Add custom field to woocommerce variations [closed]
- how to get the categories for a single product in a hierarchical way
- Viewing checkout page removes fees from mini cart
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to add an extra button on woocommerce shop page and use it to send the product info with image in a mail? [closed]
- how do I remove the shipping from woocommerce thankyou page and from the email
- Woocomerce custom billing address fields display in order details [closed]
- Color swatches on category page? [closed]
- help to change some colors (woocomerce and store locator) [closed]
- No shipping method has been selected [closed]
- Changer numbers of columns in woocommerce shop
- Woocommerce product permalink not working
- “woocommerce_form_field()” function having issues after latest woocommerce update [closed]
- How to customize shipping region/states on WooCommerce
- Rename WooCommerce sorting dropdown options [closed]
- WooCommerce custom billing fields on email address
- Woocommerce custom checkout form
- Woocommerce custom field calculation
- Hiding Short Description in Shop Page, WooCommerce
- wordpress shortcode not working
- I found this code to be very useful, how can I change it to a text that display “Product versions and period of last update” rather than a button?
- Customizing woocommerce product page
- Woocommerce custom archive page custom content and shortcode
- WP_Query – sort the results by meta value custom attribute wocoomerce
- customer specific email attachment
- Style WooCommerce Product Search Widget
- Product page not found if product data is set Appointment Service
- Query Product categories what have a custom field
- How to get the full product name by ignoring custom modification on it
- where is admin footer?
- Woocommerce custom “My Account” Tab – Add Save button
- Need to add custom text field to Woocommerce under add to cart button
- Moving Quantity after product description
- Custom product status get filtered on all product list views
- Can we add an extra button on woocommerce shop page and use it to send the product info including image in a mail?
- Upload advanced custom field text link array with csv
- Woocommerce – Remove cart button depending product (post) status
- WordPress Performance and bulk edits
- I want to use a product thumbnail completely different than the product image
- Send default WooCommerce email when switching from custom order status
- How to Remove wpautop in woocommerce includes folder class-wc-order-item.php
- WooCommerce – Adding custom HTML to specific product pages
- How do I change text of a product template in a WooCommerce theme? [closed]
- WooCommerce customise checkout billing form [closed]
- Integrate Woocommerce to a custom theme
- woocommerce display product category on checkout page [closed]
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- Change the User/ Author of the Products
- Show total sales for each products on search results page Woocommerce
- Change in credit card payment button for woocommerce
- How to display product variations on same row
- Custom product sorting archive page
- How to benchmark a WordPress installation? [closed]
- Modify existing plugin function using filter (without modifying the plugin directly)
- Making Custom Fields Standard in the Admin UI
- Why do folders have Empty Index.php Pages?
- How to get shortcode working from custom meta field
- How to search in a Custom Field?
- media_handle_upload weird thing
- Customise search form in the Widget
- Removing label ‘WordPress’ from the title bar
- Comments Confusion
- Adding all sub-pages to the menu manager
- Hide devices selection from customizer?
- Add options to the “Screen Options” section on the “Menus” editor
- Split Conference WordPress Page in different years
- How to change popular term checklist title when edit post?
- Deep customization of wp-login.php
- WordPress broken after changing URL
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Validate user login in php
- Menu selection for header
- How to display custom admin pointers (tips/notifications) in Dashboard until dismissed?
- Custom password set/reset link in same URL format as default does’t work
- Expressions and str_replace
- Woocommerce: Some action hooks not firing inside class [closed]
- How to create a new blog in wordpress?
- Pass the post ID
- Need Advice to Working with Custom Post Meta
- If I want social media icons that link to my site’s corresponding accounts, is that better to do with a plugin, or manually?
- Use WordPress to create a custom CMS? [closed]
- Include plugin´s table in custom query
- Is it possible to show related posts on WordPress attachment pages?