Can change twentytwelve_entry_meta “by-author” links?

Well for anyone who may be interested, I worked out that the answer, after adding the my_author_rewrite_rules function as above (thank you), is to edit the twentytwelve_entry_meta() function by replacing this: esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ), with this: esc_url( sprintf( __( home_url().’/author/%d’, ‘twentytwelve’ ), get_the_author_meta(‘ID’) ) ), It also means similarly changing the … Read more

List custom taxonomies associated to an author’s posts

First grab the post ids by the author, and then the terms. $author_id = ‘1234’; $taxonomy = ‘clubs’; $post_ids = get_posts(‘fields=ids&post_type=post&post_status=publish&showposts=-1&author=”. $author_id ); $clubs = wp_get_object_terms($post_ids, array($taxonomy)); $html = “<ul>’; foreach( $clubs as $club ) { $html .= sprintf( ‘<li><a href=”https://wordpress.stackexchange.com/questions/134259/%1$s”>%2$s</a></li>’, get_term_link($club, $taxonomy), $club->name ); } $html .= ‘</ul>’; echo $html;

Saving return value from the_author_posts_link()

The author posts link returns the author name which is linked to posts written by him. I think what you need is the author name of the post. It can be retrieved with <?php echo get_the_author(); ?> and if in case you need the link to the posts by this author then use: <?php echo … Read more

How can i show pagenavi in my author.php?

If you’re using the WP-PageNavi plugin, there are several FAQs on using it with a secondary query loop: http://wordpress.org/plugins/wp-pagenavi/faq/ this code is from one of the pages linked from that FAQ: $my_query = new WP_Query( array( ‘tag’ => ‘foo’, ‘paged’ => get_query_var(‘paged’) ) ); while ( $my_query->have_posts() ) : $my_query->the_post(); the_title(); // more stuff here … Read more

Exclude a category of posts in author template

Never use query_posts, use pre_get_posts to modify any main query. function wpd_exclude_author_category( $query ) { if ( $query->is_author() && $query->is_main_query() ) { $query->set( ‘category__not_in’, array( 42 ) ); } } add_action( ‘pre_get_posts’, ‘wpd_exclude_author_category’ );

Can’t grab author info outside of the loop

For your author box to work, it needs to be inside the loop. You have one fundamental flaw though with your second loop. You are currently using two different loops in one, the first one being the main loop, and the second one a custom loop to fetch related posts As it stand, and where … Read more

Change Author Name to Sitename on Frontend

You could modify it through the the_author filter: /** * Set the author name as the site title. */ ! is_admin() && add_filter( ‘the_author’, function( $author ) { return get_bloginfo( ‘name’ ); } ); where we change the author name to the site name on the frontend with the help of the get_bloginfo() function.

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