WP Blog Page Problems – Been stuck for a week

I would suggest you to take a look at your page.php file, where you need to add a php code calling the sidebar.php file. If that doesn’t work, try using Underscores to design your website. It’s a base theme for WordPress. It’s only the default files with no customization. You have to design everything from … Read more

Custom Post Type

You can use wp_get_post_terms() to pull the terms. $taxonomy = ‘project-category’; $terms = wp_get_post_terms( $post->ID, $taxonomy); var_dump($terms); wp_get_post_terms() will return an array of terms because multiple terms may be assigned to a single post. This means that you will potentially get a set of terms, not just one, so you will need to choose which … Read more

Display result of custom form

First, your code attempts to use $_POST[‘nom’] whether the value is set or not. You are generating non-fatal “Undefined index” warning every time that runs. Clean that up and use !empty($_POST[‘nom’]) instead of $_POST[‘nom’]!=NULL. With template_redirect you’d want to redirect to an existing page, something like the following from another answer: function redirect_cat_wpse_207298() { if … Read more

WordPress Dashboard organize posts based on categories

you could use restrict_manage_posts to add a dropdown field to the admin bar. however this code needs refining, because terms are not presented hierarchical atm. add_action( ‘restrict_manage_posts’, ‘my_restrict_manage_posts’ ); function my_restrict_manage_posts() { global $typenow; $taxonomy = ‘your_taxonomy_name’; if( $typenow != “page” && $typenow != “post” ){ $filters = array($taxonomy); foreach ($filters as $tax_slug) { $tax_obj … Read more