Wordpress Tips

How to add Custom Code to functions.php or Other Theme Templates in WordPress? โ€• ยฉ wpbegginer.com

If you are adding code snippets to your themeโ€™s functions.php file or any other template, then you can add code directly by visitingย Appearance ยป Editor. You can select the file where you need to add the code from the right column. The instructions you are following will tell you where to paste the code, but […]

Call a navigation menu using a shortcode

Today I came across a weird situation: I needed to place a navigation menu in the content of a page. A shortcode was the obvious solution, but there doesnโ€™t appear to be one built in for menus. I created this one very quickly: function print_menu_shortcode($atts, $content = null) { ย ย ย ย extract(shortcode_atts(array( ‘name’ => null, ), $atts)); […]

Scroll to top