duplicating page templates

When you duplicated the template, I assume that you gave the template file a new file name, and placed it in the same directory as the source. And that you changed the “Template Name” in the duplicated file. And then made changes to the new template file to change the code on the button to … Read more

How to add custom user role into wordpress

Example: add_role(‘student’, __( ‘Student’), array( ‘read’ => true, // Allows a user to read ‘create_posts’ => false, // Allows user to create new posts ‘edit_posts’ => false, // Allows user to edit their own posts ‘edit_others_posts’ => false, // Allows user to edit others posts too ‘publish_posts’ => false, // Allows the user to publish … Read more

How do I exclude the current post from the upcoming post query

I think you are asking how to exclude the current exhibition from your upcoming exhibitions query. If that is the case, simply insert the ID of the current exhibition into the query using ‘post__not_in’: $exhibition_upcoming_query = array( ‘post_type’ => ‘exhibition’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 3, ‘post__not_in’ => array( $exhibition_current_loop->posts[0]->ID ), ‘meta_query’ … Read more

Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)

Got this working on a test site by downloading the coral dark theme and making a child theme for it. Making a child theme might seem a little daunting if you’ve never made wordpress themes before, but it’s the most sustainable and overall best way to do this in my opinion. And it’s actually pretty … Read more