Edit part of a post

The way WordPress is built now doesn’t really allow for that. The post content is all in one block in the database – one, continuous database field. While you might be able to break out sections of it by adding specific markup, you’ll still end up parsing the entire content to extract just that section. … Read more

How to separate each individual blog post?

You can do that entirely with CSS, almost no PHP coding required… try something like this: <div id=”services”> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <?php the_content(); ?> </div> <?php endwhile; ?> <?php endif; ?> </div> … that way, each … Read more

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