Wordpress shortcode

Asked

Viewed 32 times

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?

  • 3

    Shortcode generation API: https://codex.wordpress.org/Shortcode_API - Wizard to simplify the process: https://generatewp.com/shortcodes/

1 answer

1


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

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.