If you have a shortcode string saved, try echoing it with do_shortcode
function, which turns shortcodes into content.
$saved_shortcode = get_option( 'my_customizer', 'copyright' );
if ( $saved_shortcode && is_string( $saved_shortcode ) ) {
echo do_shortcode( $saved_shortcode );
}
More about the function on the developer handbook, https://developer.wordpress.org/reference/functions/do_shortcode/
EDIT
Another option is just echo the year directly on the footer template without first getting the shortcode string from the database and then rendering it.
Related Posts:
- How to customize a shortcode using the customizer
- Shortcode are not working in Option tree textarea
- How to enable shortcodes in text retrieved from get_theme_mod
- How to add “get_theme_mod” inside a shortcode?
- Shortcode or placeholder for theme options page?
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- Shortcode output always showing at top of page
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- shortcode inside another shortcode
- Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]
- Custom Shortcode AJAX 400 Bad Request
- WordPress gallery ‘post_gallery’ filter doesn’t work with feeds?
- shortcode to create dynamic dropdown box form shortcode attributes
- conditional shortcode not working
- Ajax not returning anything on form submit
- How do I add my own custom shortcodes?
- Can’t seem to get [shortcode]s to work
- Wraping $content into link with shortcodes
- nested Shortcode doesn’t work
- Slow page loading when using a simple shortcode on the same page multiple times
- TinyMCE get selected text and underlying HTML
- Remove and restore one shortcode
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- other shortcodes in Contact form 7 MAILS [closed]
- Remove empty p-Tags in Shortcode content before non p-Tags
- Using do_shortcode with variables?
- Using ACF field in do_shortcode()
- Display content from another site page using a shortcode
- Remove hyperlink on gallery shortcode
- Wrap shortcode inside custom block
- Combining similar shortcode functions?
- Creating a shortcode based on users preferences
- Get a post’s thumbnail url or display default image in shortcode
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- unwanted P tags in shortcode, delay wpautop not working
- Convert HTML Script to Shortcode [closed]
- What is the Correct way to pass parameters in function
- Shortcode – Getting Categories appears on top of website
- Passing html tags as shortcode parameters
- Registration Form Shortcode
- Include tags in the body of a post
- Remove shortcodes that are different (but same pattern) in each post
- Place a URL parameter value inside a WordPress short code
- Print shortcode in defined area
- WordPress shortcodes are not working
- Conditionally Loading JavaScript/CSS for Shortcodes
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Add JS in footer via shortcode?
- Slow page Loads When Using Dynamic Coding
- Can I use shortcodes in mail body
- Query to list all galleries under a parent post?
- Adding the username into a URL to redirect to a specific page
- Shortcode Help Needed → attributes
- Video Shortcode & Video Poster Question
- How to use a nested shortcode to render the value of an attribute in parent shortcode
- Ordering get_terms with ACF not displaying all terms
- How can I create a rearrangeable list of items like OptionTree offers with the Theme Customization API?
- Different ID in every shortcode
- Unique ID for WordPress shortcodes when used more than once on a page?
- Which wordpress function is the caption shortcode linked to?
- Content between shortcodes
- Parsing a shortcode through an author meta textfield
- Adding YouTube button to TinyMCE editor
- Shortcode strips formatting and returns at content top
- do_shortcode within a shortcode
- tiny_mce_before_init preventing custom shortcode icon appearing
- Custom Fields – Boolean Display of True/False to Yes/No
- Twitter bootstrap tabs
- Build Clickable Link Using Multiple Attributes
- Using Shorcodes in Sharing Preview and Notifications Title from Post Title
- Is the WP audio shortcode still relevant?
- If statement shortcode
- Shortcode not working when I output data from wpdb html table row
- update_metadata() appends shortcode data for every page refresh
- Gallery shortcode is empty but magically creates a gallery
- Display tags cloud from a specific category ID with a shortcode
- How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?
- Shortcode appeared twice on page, one time before content, one time where it’s really called
- Add a shortcode in woo-function.php
- Get current category and place it in shortcode
- Woocommerce products shortcode specific order
- Modify Blog Module layout in Child theme
- Inserting a variable into a shortcode inside php
- Output html source tags inside shortcode
- How can I define the output of shortcode attribute value?
- Using shortcodes that wrap around code
- Shortcode for Admin Theme Option?
- Clarify: Enqueueing scripts within shortcode only loads in footer?
- What is the best way to include a template file within a shortcode?
- What makes a placeholder resizable in Tinymce?
- Does anyone recognize shortcode ig_special_heading?
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode
- Custom logo manage by customizer and theme options
- 3 shortcodes 2 won’t render [closed]