Have posts included on a page that share same category

(…) are pages in fact posts? You won’t think what every thing is a post type in WordPress: Posts, Pages, Links, Nav Menu items… The same goes for Terms, Categories and other things, which are built in Taxonomies. You can take a look at it with adding the following very late in your theme (the … Read more

Approve modified posts

This exact functionality is not available in wordpress core. You may want to completely block them from modifying the published posts. See this capability- http://codex.wordpress.org/Roles_and_Capabilities#edit_published_posts Otherwise you’ll need a plugin

posts going to 2 pages/categories only show up in 1

First thing : you should not use category ids directly. Use slugs instead : it’s easier to maintain. <?php query_posts(‘category_name=portfolio’); ?> Second thing : why did you put a query parameter in the_post ? This function does not accept any parameter (see the Codex). Third thing : the call to query_posts(‘cat=-4’); will show all posts … Read more

Send email to admin with post author

Missing global ? global $post; No global variable available if you are using publish_post action hook! Ref : http://hungred.com/how-to/tutorial-post-id-publishpost-action-hook-wordpress/ Update 2 : or try this $author = get_userdata($post->post_author); So you can use $author where you will 😀

Only show featured image on exerpt and exclude images in post

you need to change the_content(‘Read more’); to the_excerpt(); Then in your functions.php file add_filter(‘excerpt_more’, ‘custom_read_more_link’); function custom_read_more_link($more) { return ‘<a href=”‘get_permalink().'”>Read More</a>’; } Also make sure that you’re calling wp_reset_query() after the while loop. This will achieve what you’re trying to do. A personal suggestion: Please don’t use query_posts, instead create a new instance of … Read more

How to change the order of elements within a post?

Something like (in your single.php) <?php while (have_posts()): the_post(); ?> <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <time class=”post-time” datetime=”<?php the_time(‘Y-m-d’); ?>”><?php the_time(‘F j, Y’); ?></time> <?php if (has_post_thumbnail()): ?> <?php $thumbnail_image = get_posts( array( ‘p’ => get_post_thumbnail_id($post->ID), ‘post_type’ => ‘attachment’, ) ); ?> <p class=”thumbnail-caption”> <?php echo $thumbnail_image[0]->post_excerpt; ?></p> <?php the_post_thumbnail(‘full’); ?> <?php endif; … Read more

Get posts from current category?

function filter_where_older( $where=”” ) { $date = get_the_time(‘Y-m-d H:i:s’); $where .= ” AND post_date < ‘$date'”; return $where; } function filter_where_newer( $where=”” ) { $date = get_the_time(‘Y-m-d H:i:s’); $where .= ” AND post_date > ‘$date'”; return $where; } $category = get_the_category(); if(!empty($category)) { $cat_id = $category[0]->term_id; add_filter( ‘posts_where’, ‘filter_where_older’ ); // retrieve older posts from … Read more