Change content off every sixth element

query_posts should only be used for the main loop. Instead, use a new instance of the WP_Query class: $my_query = new WP_Query( array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 10, ‘order’ => ‘DESC’, ‘paged’=> $paged ) ); echo ‘<ul>’; while ( $my_query->have_posts() ) : $my_query->the_post(); if ( $my_query->current_post > 0 && ( $my_query->current_post + 1 ) … Read more

Change post date in menu to post title

You have to drag and drop the menu itens by hand, maybe some code can put the posts automatically there too. About menus in WordPress: http://codex.wordpress.org/Appearance_Menus_SubPanel

changing parent_id on post

In order to make it working you need to return updated data: function my_insert_post_data($data, $postarr){ $data[“post_parent”] = 123; $postarr[“parent_id”] = 123; $postarr[“post_parent”] = 123; error_log(print_r($data,true)); error_log(print_r($postarr,true)); return $data; } add_filter( ‘wp_insert_post_data’ , ‘my_insert_post_data’ , 99, 2 );

Nest Next and Previous in a href with class that has a background image

EDIT In single.php you should be using: <?php previous_post_link(‘%link’, ‘Previous’); ?> and <?php next_post_link(‘%link’, ‘Next’); ?>. Then you add this to your functions.php: function filter_next_post_link($link) { $link = str_replace(“rel=”, ‘class=”next” rel=”, $link); return $link; } add_filter(“next_post_link’, ‘filter_next_post_link’); function filter_previous_post_link($link) { $link = str_replace(“rel=”, ‘class=”prev” rel=”, $link); return $link; } add_filter(“previous_post_link’, ‘filter_previous_post_link’); Although this is not … Read more

show div only if have a related post inside

move the div section from the start to after the if(have_posts()) { line, and move the corresponding closing divs to just before the closing bracket } of this if statement; full code: <?php global $post; $terms = get_the_terms( $post->ID , ‘movies’, ‘string’); $do_not_duplicate[] = $post->ID; if(!empty($terms)){ foreach ($terms as $term) { query_posts( array( ‘movies’ => … Read more