Prevent author role from editing all posts in custom post type?

You should declare your desired capabilities when you are registering the post type. Justin’s article here is a good one for custom post types: http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress When you are registering your custom post type, you can set this to be standard capabilities for posts, eg: ‘capability_type’ => ‘post’, or to be standard capabilities for pages, eg. … Read more

Get the terms of a custom taxonomy for a specific author in author template

First get a list of the author posts then loop over the each post and get the terms used ex: function list_author_used_terms($author_id){ // get the author’s posts $posts = get_posts( array(‘post_type’ => ‘custom_post_type_name’, ‘posts_per_page’ => -1, ‘author’ => $author_id) ); $author_terms = array(); //loop over the posts and collect the terms foreach ($posts as $p) … Read more

Search by word, category, tag, author

You’ll want to add some radio buttons inside your search form. Then add a filter to your search: function filter_search( $query ) { if( $query->is_search ) { if ( isset($_GET[‘tag’]) ) // alter your search query here. } return $query; } add_filter( ‘pre_get_posts’ , ‘filter_search’ ); Influenced by http://wordpress.org/support/topic/how-to-add-search-filter-by-custom-values#post-1463329

Missing Author Information

To display the author’s avatar within The Loop use get_avatar() like that: <?php print get_avatar(get_the_author_meta(‘ID’), ’30’, ”, ”, [‘class’ => ‘foo-bar’]); ?> To display the author’s display name within The Loop use the_author(): <?php the_author(); ?> So put everything inside The Loop and then: <?php while (have_posts()) : the_post(); ?> <div class=”row”> <div> <h1 class=”primary-color”> … Read more

Get all posts by post_author

The shortest possible answer would be to correct ‘post_author’ to ‘author’, since that is the key WP is looking for. If a key is incorrect or misspelled it will be ignored, as was the case with ‘post_author’.

Get the comment author ID by the comment ID

you should use it: <?php get_comment( $id, $output ); ?> Return comment_ID (integer) The comment ID comment_post_ID (integer) The post ID of the associated post comment_author (string) The comment author’s name comment_author_email (string) The comment author’s email comment_author_url (string) The comment author’s webpage comment_author_IP (string) The comment author’s IP comment_date (string) The datetime of the … Read more

Limit author image size

WordPress automatically resizes uploads into different formats based on the settings on the Settings » Media page: You can set up all of your different default sizes here. Though keep in mind that plug-ins and themes can define their own custom image sizes … so I can’t guarantee perfect operability in all cases.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)