Shortcode wordpress

1

Good afternoon, I need to make a shortcode in wordpress so that it shows the version of my program in the footer of the site, next to copyrigth.

Do I need to use a hook? Can someone help me?

    
asked by anonymous 03.09.2018 / 17:54

1 answer

1

You can use a action hook directly in your template to add the version.

In my example the copyrigth is in the footer-copyrigth.php file

Then I used the hook as follows: add_action( 'get_template_part_template-parts/footer-copyright', $version, 'version_footer', 10, 2 );

    
13.12.2018 / 15:39