Okay
  Public Ticket #2958044
Function to allow shortcodes in a footer field
Closed

Comments

  •  1
    purplepigdesign started the conversation

    Heyo!

    Is it possible to allow shortcodes in the footer copyright section text field in Salient > Footer? (See attachment)

    Perhaps a function to go into functions.php?

    Allowing a year shortcode here would help a lot of people that need that section for their footer design but still want the copyright year :-)

  •  279
    Noah replied

    Hello,

    Thanks for getting in touch with us.

    Please check out our guide here https://themenectar.ticksy.com//article/12668/

    Thanks.

  •  1
    purplepigdesign replied

    @Eluid

    I checked that link, but even though it is titled with short codes in the footer field, the information in the thread only links to a function that enqueues the iconsmind CSS files to display in the footer. Unfortunately no information on how to implement short codes into the footer field in my screenshot.

  •  8,840
    Tahir replied

    Hey Again,

    Please see: https://themenectar.com/docs/salient/overriding-salient-wpbakery-element-template-files-through-a-child-theme/

    You can use this function to overwrite the Copyright Footer Text Output as per your liking:

    /**
     * Output the footer copyright text.
     *
     * @since 13.0
     */
     if( !function_exists('nectar_footer_copyright_text') ) {
         function nectar_footer_copyright_text() {
             
             global $nectar_options;
             
             if ( ! empty( $nectar_options['disable-auto-copyright'] ) && '1' === $nectar_options['disable-auto-copyright'] ) { 
                 echo '<p>';
                 if ( ! empty( $nectar_options['footer-copyright-text'] ) ) {
                     echo wp_kses_post( $nectar_options['footer-copyright-text'] );
                 }
                 echo '</p>';    
             } 
             else {
                 
                 echo '<p>';
                 $copyright_text = '© '. date( 'Y' ) . ' ' . esc_html( get_bloginfo( 'name' ) ) . '. '; 
                 echo apply_filters('salient_default_copyright_text', $copyright_text); 
                 
                 if ( ! empty( $nectar_options['footer-copyright-text'] ) ) {
                     echo wp_kses_post( $nectar_options['footer-copyright-text'] );
                 }
                 echo '</p>';
                 
             } 
             
         }
     }
    

    Thanks 


    ThemeNectar Support Team