• Resolved Copernicus

    (@copernicus)


    Thanks for this wonderful starter theme!

    Is there a way to activate shortcodes for the “Footer Content” interface (within the first tab/panel of “Appearance > Theme Options” for Quark)?

    I know the following code in the functions.php file activates shortcodes for widgets:

    add_filter( 'widget_text', 'do_shortcode' );

    But, I’m hoping that there’s some way to activate shortcodes in that editor interface for ‘footer content.’

    Thanks for any & all help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Anthony Hortin

    (@ahortin)

    That line of code you mentioned, will allow shortcodes to be used in any of the themes sidebars. So basically, shortcodes should work no matter whether you’re using them in the blog sidebar areas or in the footer widget areas

    Thread Starter Copernicus

    (@copernicus)

    Thanks for the reply Anthony.
    Yes, that line of code will activate shortcodes for any of the widget areas (sidebars & such); but it doesn’t seem to do anything for the “footer content area” that’s set within the Theme Options panel.

    So, I don’t mean footer widgets, but the extra text area in the Quark theme options where you can enter content that will display at the very bottom of the site’s pages.

    Theme Author Anthony Hortin

    (@ahortin)

    On line 57 of footer.php, try changing the line to read…

    echo do_shortcode( apply_filters( 'meta_content', wp_kses_post( of_get_option( 'footer_content' , quark_get_credits() ) ) ) );

    This will run the footer content from the theme options through the do_shortcode WP function, which interprets the shortcodes.

    Thread Starter Copernicus

    (@copernicus)

    YES. That works perfectly. Thank you so much! Since this credits section is often used for a copyright, it’s nice to be able to create a “[year]” shortcode that displays the current year and use it in this area. Thanks again (for this & the great theme)!

    Theme Author Anthony Hortin

    (@ahortin)

    Glad it all works for you ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Activating shortcodes for the custom "Footer Content" area’ is closed to new replies.