Posted on February 9, 2020 in WordPress
WordPress theme development code snippets
I’ve built a lot of custom WordPress themes over the years and always find myself digging through past projects to find certain snippets of PHP code. To put it all in one place for myself and others, below are a bunch of random PHP snippets (a lot of these are already included in my WP theme starter that I use to start all my WP themes). Register menu function register_main_menu() { register_nav_menu('header-menu',__( 'Header Menu' ));...