Default to ‘all’ view on the ‘edit-post’ screen for authors

Thank’s anmari, A tad over my level of php knowledge, but manage to sort it out looking at it in another way. Sorted with changing the “global $submenu” and the code: /** * Makes the “All” sorting and “publish” default on edit screen for custom post types */ function default_post_sorting(){ global $submenu; // Administrator users … Read more

Apply a style for 4 blogs and another style for the next 4 blogs in wordpress blog page?

In the following code you could add a class specifically based on the position in the loop: <?php /* Start the Loop */ $i = 1; $class=”first-class”; while ( have_posts() ) : the_post(); if($i % 4 == 0){ $class=”second-class-“.+$i; } echo ‘<div class=”‘.$class.'”>’ get_template_part( ‘template-parts/content’, get_post_format() ); echo ‘</div>’ $i++; endwhile; ?> This is essentially … Read more