Custom post type is showing custom home page, not archive page

As per the OP’s answer that was added in their question, I’ve separated it instead. In short: …deactivating and reactivating plugins, commenting and uncommenting, I now have my site working as intended. Here’s the elaboration given by the OP as well: I have a couple of custom post types in my functions.php file. Each one … Read more

Link to Homepage in Menu

You can take the following steps Go to You Dashboard Click Appearance > Menus Under Pages, Click View All There will be a ‘Home’ option Check that Home Option Click ‘Add to Menu’ The new Menu item will appear in the right block Drag the home menu to the top Save the menu

Limit posts per author role (excluding admin) in home page

If I understand your problem then this should definitely work. <?php get_header(); $users = get_users( array( ‘who’ => ‘author’ ) );//get all the users with author role in an array foreach ( $users as $user ) { //travers the array if($user->caps[‘administrator’]==1)continue; // skip the user if user also have administrative capabilities $query = new WP_Query( … Read more

Static page does not show my posts

So this is the code I have on one of my Website inside the footer, this basically get’s the 3 latest posts and displays the_title you can change this to show the_excerpt. <?php // news posts loop begins here $newsPosts = new WP_Query(‘page=blog&posts_per_page=3’); if ($newsPosts->have_posts()) : while ($newsPosts->have_posts()) : $newsPosts->the_post(); ?> <!– Blogs –> <div … Read more

Adding Filter to Homepage only

Even if wrap your filter in a if statement, the function still will be executed. Try this: global $current_class; $current_class=”flex-container”; function rt_oddeven_post_class ( $classes ) { if ( is_home() || is_front_page() ) { global $current_class; $classes[] = $current_class; $current_class = ($current_class == ‘flex-container’) ? ‘flex-container-reverse’ : ‘flex-container’; return $classes; } } add_filter ( ‘post_class’ , … Read more

Add field to dashboard to update embedded URL on homepage?

Add the below code in the functions.php file and it will create a text field in the general setting options page add_action(‘admin_init’, ’embed_url_initialize’); function embed_url_initialize() { // First, we register a section. This is necessary since all future options must belong to one. add_settings_section( ‘general_settings_section’, // ID used to identify this section and with which … Read more