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
- Create more Meta Boxes as needed
- Set Default Admin Screen options & Metabox Order
- How to set default screen options?
- Passing error/warning messages from a meta box to “admin_notices”
- single-{$post_type}-{slug}.php for custom post types
- Add “upload media” button in meta box field
- Add a Meta Box for uploading a SECOND Featured Image?
- Does WordPress have a “Form API”?
- Metabox with checkbox is not updating
- How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
- What is the “Advanced” $context in add_meta_box?
- Removing panels (meta boxes) in the Block Editor
- Change The Title Of a Meta Box
- WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins
- How to override WooCommerce template files?
- How do you access the Product Short Description in a WooCommerce email template? [closed]
- How to make open/closed and hidden/shown metaboxes status saved on a per-post basis?
- How To Remove The “+ Add New Category” Link From A Category Metabox
- How can I create a taxonomy meta-box with search suggestions but no new terms input?
- Remove the Featured Image Meta Box
- Remove the Yoast SEO Post Metabox [closed]
- Best practices for meta box placement?
- Creating a metabox to upload multiple images
- How Does WordPress Remember Metabox Positions?
- Sample code for validating custom metabox?
- Post custom metabox textarea using wp_editor
- WooCommerce: Change template for single product page
- How to Add Reminders/Notes to New Post Meta Boxes
- How do I get attachment_id?
- Removing Metabox for “Slug” without removing functionality
- How to reorder meta box position?
- Prevent sorting and dragging of specific postbox metabox
- One metabox for multiple post types
- How do I position meta_box on post edit screen after the title?
- How to add a class to meta box
- Template for specific post of custom post type
- Is it possible to manipulate the list of page templates?
- Has anyone successfully integrated qtranslate with custom metaboxes?
- Put the media uploader in a metabox
- Loading partial templates with AJAX/PJAX
- Custom Meta Boxes: multiple fields within a repeatable field
- single-product.php template not working for single products [closed]
- Loading custom page template via plugin
- Multiple Single Post templates
- Taxonomy Templates… by hierarchical level?
- Removing meta boxes: remove-meta_box() or unset()?
- Save checkbox value in metabox
- How to group meta boxes on the post edit page
- WooCommerce – Load Templates From Plugin For All Template Files
- Use meta box drag and drop to order items independently
- inside a metabox
- Add Meta box Befoure Post Title
- Hiding a theme’s meta box
- Metabox date month number to word
- get registered metaboxes by post type or post ID
- Remove metabox from specific page template in admin
- Is there a filter/action to add content to WP admin metaboxes?
- Attach Files Metabox
- CMB2 metabox conditional logic
- Tinymce/WordPress is removing all line-breaks?
- How do I create a meta box for dates?
- Adding submit or update button to custom metabox?
- Editing the Default Links like “Site Admin” in the Sidebar Meta Section?
- How to pass variable via $callback_args for add_meta_box
- Undefined function error when creating Custom Meta Box
- How to get meta box data to display on a page
- esc before saving or before displaying does it matter?
- Block metabox – No expanding, no moving around
- Different templates for parent and children categories/taxonomies
- Move excerpt to always be directly below post content in admin
- Access the environment of an admin page from another admin page
- Add a meta description to home page?
- Editing Screen: Make Update or Publish Button Follow The Page
- Removing custom meta box added in parent theme
- Add filter ‘wpautop’ to meta box textarea
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- Use meta box value in CPT as post title
- Custom “Publish” / “Update” button &
- Why can’t I hook into save_posts after admin_init?
- Meta Boxes in Front End Post Submission Form
- Getting the ID of a meta box
- how to sanitize checkbox input?
- add_meta_box does not go ‘side’
- Custom filter for the_content doesn’t work correctly
- How can I set up a category “overview” page?
- Remove a plugin meta box from the dashboard
- How to insert Gallery shortcode to a meta box
- Getting jQuery sortable items in custom metabox
- Custom meta box shown when template is chosen [duplicate]
- Modifying the main editor priority
- Custom Post Type with Nested Taxonomy and Template Files