how to manipulate HTML parameters using PHP conditions

not sure if this is the correct approach Regardless of what the correct approach to adding an active class to the li element might be, adding a new navigation to the administrative backend is, beyond the shadow of a doubt, a very wrong approach in the first place. Rather than doing that, familiarize yourself with … Read more

What is the best way to get the first few post from WordPress in different divs using a loop?

Use this code for the loop. I removed your comments and added some for clarification. <?php if ( have_posts() ) { // Do first post. add_filter( ‘the_content’, ‘narga_excerpts’ ); add_filter( ‘the_content’, ‘remove_first_image’ ); the_post(); get_template_part( ‘content’, get_post_format() ); // Do remaining posts. remove_filter( ‘the_content’, ‘narga_excerpts’ ); remove_filter( ‘the_content’, ‘remove_first_image’ ); while ( have_posts() ) { … Read more

Arrange Category post manually when displayed

So, if I can clearly get you, you want to sort the order of your posts. I found the following plugin best fit for the purpose: Post Type Order – WordPress Plugin After installing the plugin, you will get a new submenu under “Posts” (and under all other Custom Post Types). You can order the … Read more