Display the latest post from some selected authors

What you can do is the following: http://codex.wordpress.org/Function_Reference/get_posts_by_author_sql <?php $where = get_posts_by_author_sql( ‘post’, true, $user->ID); // get post query global $wpdb; $query = “SELECT ID FROM $wpdb->posts $where”; $post_ids = $wpdb->get_var( $wpdb->prepare( $query, ‘Get all posts’ ) ); ?> Did not try it but something simular in your case should help.

Call image from post on index page?

Use like this: <?php while ( have_posts() ): the_post(); // Display post if ( have_posts() ): the_post_thumbnail(); //call image that you set in featured image in each post on right sidebar of admin panel. the_content(); //call content endif; endwhile; ?>

How to display an icon when a new post is published and then remove it when a specific time past?

Filter the content of post_class(): add_filter( ‘post_class’, function( $classes ) { if ( is_singular() ) return $classes; // now minus last mod time in seconds $diff = time() – mysql2date( ‘U’, $post->post_date ); if ( DAY_IN_SECONDS <= $diff ) $classes[] = ‘new-post’; return $classes; }); Now, in your loop, use post_class(), and you get an … Read more

How to get post_content while the post is being edited

All the rendered content of the page is available to the page. How would it be rendered otherwise? jQuery(‘#content-textarea-clone’).html() gives you the current contents of the editor window, using jQuery. And jQuery(‘textarea#content’).html() holds the initial content of the page (the saved one).

Adding editable content above posts

I have a few thought on this. You can very easily build yourself a dynamic area above your posts for the purpose of information or announcements I prefer to make use of a non-hierarchical custom post type for this purpose. Just something very simple. No taxonomies attached. The custom post type should also not have … Read more

Post gallery as carousel

Use the same gallery shortcode generated in the visual editor, then add an attribute to note carousel. That way you piggyback on all the functionality with very little extra effort required. See this answer for how to approach this by replacing the default gallery shortcode.

Add Image Before Posts Entry Title

This works fine for me when i test it. I did edit your code as you had a small error in the function name not matching. Also, you might want to add a conditional tag and wrap the shortcode in a div but otherwise it works. function adt_abovetitle($title){ //Return new title if called inside loop … Read more

Display only current page -> posts tags in page

First you’ve to know what you want to retrieve, you will have to find something identical for that group of post you want to retrieve. Use the following code to retrieve the post, where $args is the variable what contains the arguments to select the right post ids. $posts = get_posts($args); $terms=array(); foreach($posts as $post) … Read more

Randomize access to post

If I were doing such a thing, I’d do something like the following Determine how to tell which posts people could potentially gain access to, perhaps via a custom field. Store user meta data holding the posts they have gained access to Write a quick class (or a couple of functions) to handle (a) gathering … Read more