How do I do a page break?
You can insert the quicktag <!–nextpage–> into a post. Using wp_link_pages() you can generate the pagination links.
You can insert the quicktag <!–nextpage–> into a post. Using wp_link_pages() you can generate the pagination links.
The problem is that you misuse the category field. Use a site meta field (array) and a simple checkbox on each post. When a post is saved add its ID to the site meta array, and if the array is longer than 5 drop the last ID from it. The query for featured post will … Read more
A simple way to achieve this would be to do something like the following; <?php $user_id = get_current_user_id(); $post_count = count_user_posts($user_id); if ($post_count >= 50 && $post_count < 100) { // Congratulations you have submitted 50 posts! } elseif ($post_count >= 100) { // etc etc… } else { // do something else, or nothing. … Read more
wp_get_attachment_image_src will return false if there is no image. So before you echo the image add if ($image !=false)
There is no mandatory class name for posts. Many themes use the post_class() if that is needed but you cannot rely on it. To change the output of the_content() add a filter to ‘the_content’.
Use wp_list_categories instead, <?php $args = array( ‘hierarchical’ => true, ‘child_of’ => 42, //parent category ‘hide_empty’ => 1, //hide empty categories (set to 0 to show) ); wp_list_categories($args); ?> A full list of parameters for wp_list_categories can be found HERE As you can see its highly customizable simply by adding extra arguements to the array … Read more
Try using $_POST[‘post_id’] in the upload area as file.php does not include the global $post object.
It seems you’re actually looking for the the_content filter. add_filter(‘the_content’, ‘modify_content’); function modify_content($content) { global $post; if ($post->ID != $desired_id) return $content; $modified_content = /* modify content here */; return $modified_content; }
set the $stripteaser parameter to true; the_content(‘readmore’, true); http://codex.wordpress.org/Function_Reference/the_content
You have three loops, two nested inside the main loop. The main loop display the posts e.g. in category_a. What does the second nested loop display? It seems this loops also display the posts from the samne category as the main loop. So try to remove the second nested loop.