Woocommerce does hijack the main query on the shop page / product queries, so it’s possible that you’re used to referencing your custom fields within the loop or in some other context where the global $post is the page you are on, but in this case the contents of $post will be Woocommerce products and not the page.
If this is for your base shop page you can reference the custom fields like this (change for the meta_key of your custom meta box fields)
//returns shop page post object
$your_shop_page = get_post( wc_get_page_id( 'shop' ) );
//access your meta fields like this
$your_shop-page->your_meta_key;
I hope this helps in your situation, if you use the above code it would help to make sure you are on the shop page and those values exist before attempting to output them, always code defensively!
Related Posts:
- Which php file lists all the post of a category
- Add a custom field to top attribute in WooCommerce
- How To Add Custom Meta PDF Upload Box to WooCommerce Products (and post link on frontend)
- Edit woocommerce product post type
- How to add metabox ONLY to specific WooCommerce product type [closed]
- using WPalchemy to output custom metabox from homepage template
- Is it possible to set archive.php instead of index.php to display blog?
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- Page Templates Used in Custom Post Type
- Creating a metabox to upload multiple images
- Post custom metabox textarea using wp_editor
- Removing Metabox for “Slug” without removing functionality
- Prevent sorting and dragging of specific postbox metabox
- Removing meta boxes: remove-meta_box() or unset()?
- CMB2 metabox conditional logic
- How to pass variable via $callback_args for add_meta_box
- Undefined function error when creating Custom Meta Box
- Move excerpt to always be directly below post content in admin
- Removing custom meta box added in parent theme
- Getting the ID of a meta box
- Custom filter for the_content doesn’t work correctly
- Check if meta key value already exists
- Is there a predefined callback function for custom categories?
- How to Handle CSS for Multiple Header header.php Files?
- page_template toggle between 2 templates + 2 permalinks for same post
- Conditional Meta Boxes
- Why is `add_meta_box` not working?
- How to access global $wp_meta_boxes variable on front-end?
- Static Front Page problem
- prevent post submission
- $post->ID incorrect within meta box
- Why is save_post hook not running?
- Trying to manage templates on a blog with lots of custom taxonomies
- is_archive() content being shown instead of is_category()
- How to apply a custom template for posts by default?
- WooCommerce Link to Product Category
- Why is variable value emptry in $_POST but available in $_REQUEST?
- Custom post type and taxonomy permalinks – Structure
- Change headline text for post thumbnail meta box
- creating custom archive template within plugin for custom post type using archive_template filter
- WooCommerce: The model of e-mail is displaying only the html, not css [closed]
- how to save multiple checkboxes value in wordpress dynamically
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- Creating an “admin only” meta box with WPAlchemy. Getting a fatal error on front-end when using current_user_can
- Multiple Meta Boxes in separate files
- Meta box html is not updating after saving
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Store multiple textarea data in database from a metabox
- Is there a way to display metabox in frontend? How?
- Custom Sortable Meta Boxes
- How to hook something before edit_form_title?
- Display Term Metabox Only On Certain Term Edit and Add Pages In Admin
- How to prevent further updates of custom meta when using actions to set one meta based on another
- Stop saving process when metabox is invalid [duplicate]
- Add custom action in post type
- List all sidebars in metabox
- Have mu-plugin remove meta box ONLY if it isn’t already removed in functions.php
- Woocommerce – Add HTML around Product description [closed]
- get_month_link uses what wordpress template?
- Differentiation between index.php and page.php
- save_post_{$post->post_type} action firing on second save
- Add a metabox when editing a media – but only for images
- Single-page.php template file name not shown
- Save meta data with post, Without using any plugin [closed]
- How to display custom post type?
- Metabox not being added
- Adding a metabox shortcode “paypal accept payment” in my custom post type back-end
- The $post variable – Did I get the grasp of how the Backend actions get parsed?
- display metabox on front end (my-metabox-class)
- Custom Meta Box calling JS function twice
- how to reset metabox excerpt to open
- Changing the HTML of notices in WooCommerce [closed]
- How to filter result set in custom metaboxes?
- Overriding the template files using a plugin for all themes
- Display product thumbnail in Woocommerce email notifications
- How to alter static Page text through the Theme Customizer API
- Moving a metabox – not obeying context or removing old
- Programmatically create new post from a metabox button
- Saving metabox content not working
- semantic ui dropdown for custom metabox
- I want to display all related posts for a selected tag in WordPress
- Single taxonomy for different custom post types
- Custom Post Type Archive – archive.php is present, but it is not being used
- Multiple category filters
- Show a custom template, no matter the page being viewed, if the user is not logged in
- Error in get post by met_key
- Custom meta box not saving values of radio buttons in WordPress
- Most efficient way to have 1 template for parent, 1 template for child categories?
- Display multiple “save draft button” on a post edit
- Serialization problem after auto-update
- Add additional metafields based on value of select box
- Updating post meta and Meta Box plugin
- header specific meta box result detect url
- Attaching a metabox to a single post
- How do I allow Authors and Contributors to use the metabox
- CSS styling not working in a custom metabox
- WP Customer Reviews call short code on another page [closed]
- Which template file to edit to edit homepage in Mystile [closed]
- editing product page template – getting template for related products not working
- What is the point of using archive.php instead of index.php?