If you just want to check if a meta value exists before outputting markup, then
if( get_post_meta( $post->ID, '_cmb_linkCheckbox', true ) ){
?>
<section id="footerLinks">
<?php // your markup... ?>
</section>
<?php
}
or if the value is “on”:
if( 'on' == get_post_meta( $post->ID, '_cmb_linkCheckbox', true ) ){
// etc..
}
Related Posts:
- WP_Meta_Query object with conditionals
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Query all posts where a meta key does not exist
- Meta query with boolean true/false value
- Get post with multiple meta keys and value
- How to add multiple images to a custom post type single post?
- How do I remove all the metaboxes for a custom post type?
- Get all posts from custom post type and insert in select input as metabox
- Detect meta value changes when post is updated (post_updated)
- How to sort CPT by custom meta value (date), and return posts month by month
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Can’t sort order of wp_query with 2 meta keys
- Having trouble with custom post type / meta box
- Query for posts from any post type but only add instock products
- How can I include meta box content when searching?
- update a post meta from a single table cell TablePress
- update custom post type meta from a shortcode
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Displaying Meta Box Image
- How to keep a check box in custom meta box for custom post type checked by default for add new post?
- How to add multiple featured image in meta box in post editor?
- Show metabox in custom-post-template depending on taxonomy term?
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Displaying custom posts only if custom meta box’s date is not expired
- Displaying Metabox value (custom post type taxonomy)
- How can I display my custom metaboxes on a custom post template?
- Meta Box Only in CPT Edit Page, Not in Add New
- get_post_meta is returning image id
- WordPress Orderby Numeric Value Not Working
- orderby in custom WP Query does not work
- Populate Custom Fields in a Custom Post Type?
- Custom meta box data array: foreach not working correctly?
- Undefined Variable – Custom Post Type Meta
- Display custom post type from dynamic custom field
- Populate dropdown from one custom post type inside another custom post type
- How to check if user meta field is empty in conditional else statement
- A better way to add a meta box to custom post types
- Metabox not show in categories custom post type cmb2
- WordPress request fiter order by related post’s post_title
- Show Custom Post Type meta boxes only on Page Edit
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Meta Data for Custom Post Type not saving
- create custom meta box with default value
- How to Echo Metadata Value in Currency Format
- Issue on Working with Metabox – Checkbox to enable Sale Items
- How to get specific post meta by title or id
- Retrieving meta-box from a custom-post-type
- Why do I have to press the “Update” button twice to save my meta box values?
- Inefficient Query Confusion
- $post->post_meta not pulling any post in wordpress/php
- Values from meta-box not on $_POST
- WP_Query of custom post type sorted by meta_key has unexpected results
- Returning a custom content types with meta values
- Custom post type suddenly stoped working after WordPress 5 update
- Filter posts of custom post type by meta key in (List All Section)
- How can I output WPAlchemy repeating fields meta values in my page template?
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Save Metabox Custom Field Value
- Meta box data not saving
- Related posts meta_query CPT
- Meta box with front-end styling
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Cannot Save MetaBox Data in Custom Post Type
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- Empty meta-box returns publishdate if no value is set?
- how to compare different timestamps in wp-query for events custom post types?
- Custom Meta Box with variable number of fields
- Wp Meta Query does not work while simple Query Works
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Use WP_query to match post types based on custom field values
- How to sort by multiple values in a nested WP_Query
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- How to get post by meta value
- Get meta values from parent post and save in child post
- Wp Query sort order from custom MetaBox
- How do I get all authors posts of a custom post type outside loop
- Linking posts together with Advanced Custom Fields “both ways”
- Metaboxes in Loop
- Custom meta box data not saving
- Collect custom post in a calendar
- How to get Current week and current date record wp query
- How to get post meta for custom post type and taxonomy
- get_post_meta for Custom Post Type ( CPT )
- Delete custom post type metadata without deleting the post in admin area
- Problem with ‘save_post’ hook not running
- WordPress custom post type
- Edit post meta direct from post.php?
- Howto: use existing post_meta as options for a different metabox (checkboxes or list)
- Custom Post Type meta oembed html output resulting in WSoD
- Values inside a custom field to determine which category posts to display
- Display a post count from a custom metabox selection
- How to query custom post then display sections by meta value
- Querying meta values within an array
- Post AND page parameter for WP function
- Custom Post Type + Custom Meta Query Not Showing 2012 Posts
- Use a Variable in update_post_meta as the $meta_key
- Custom posttype content metabox