Pros and cons of actions over shortcodes
Neither are correct. Just use show_foo(): <?php echo show_foo(); ?> The only reason to ever use shortcodes is to insert dynamic content into a page or post from within the editor (Although, these days the ‘proper’ way to do that would be with a block, although that’s more difficult). Shortcodes should not be used for … Read more