How is the `get_sidebar` function meant to be used to call a 2nd sidebar?

All that get_sidebar() really does is load a file. Which file you load depends on how you call the function. get_sidebar() will load sidebar.php from the theme directory. get_sidebar(‘two’); will load sidebar-two.php from the theme directory. “Theme directory” means the same folder as should have style.css. That is all there is to using the function. … Read more

Can’t use admin_enqueue_scripts or wp_enqueue_script

Right now your error is that you forgot to enqueue them, function theme_enqueue_scripts(){ wp_register_script(‘modernizr’, get_stylesheet_directory_uri() . ‘/js/modernizr.js’); wp_register_script(‘require’, get_stylesheet_directory_uri() . ‘/js/vendor/requirejs/require.js’, array(), false, true); wp_register_script(‘global’, get_stylesheet_directory_uri() . ‘/js/global.js’, array(‘require’), false, true); wp_register_style(‘globalstyle’, get_stylesheet_directory_uri() . ‘/css/global.css’); wp_enqueue_script( array(‘modernizr’,’require’,’global’) ); wp_enqueue_style (‘globalstyle’); } add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_scripts’); function navigation_script() { wp_register_script(‘admin-nav’, get_stylesheet_directory_uri() . ‘/js/admin-nav.js’,array(), null, true); wp_enqueue_script(‘admin-nav’); } add_action( … Read more

Forms won’t submit

I ended up solving the issue. In case anybody run across this in the future, here’s what it was: I narrowed the issue down to the template itself by stripping out all of the markup on the page, which allowed the form to work as normal. I then narrowed it down to the <form> tag … Read more

What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?

A custom template for one specific category should be named category-slug.php where “slug” is the WP slug for the category. WordPress will automatically use this file to display the archive for that one category. You could also name it using the ID of the category. If your category is “legacy-posts”, then your template file should … Read more