WordPress redirect to a subpage – how to create a template for subpage?
WordPress redirect to a subpage – how to create a template for subpage?
WordPress redirect to a subpage – how to create a template for subpage?
How to Add a cutsom slug to my custom author role
Check For get_post_meta on Author Archive Page
Create condition for Author bio Social Links
To check if s/he is the right author, you can use is_author() function using the author id or name as parameter. And, depending on how you set up the settings for displaying author box or last updated. You can put your settings. I am considering your settings are in options table. So I will use … Read more
As the Codex states for the antispambot() function: Return Values (string) Converted email address. You have to do one of the following: echo antispambot( $curauth->publicemail ); // OR… print antispambot( $curauth->publicemail ); So your full example would look like the following: if ( ! empty( $curauth->publicemail ) ) { echo ‘Email <a href=”https://wordpress.stackexchange.com/questions/43732/mailto:”.antispambot( $curauth->publicemail ).’?subject=Webmail”> … Read more
This looks like a simular issue to this one with wp-pageNavi: http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html. Taxonomies and archives should use ‘page’, not ‘paged’ so use that in the urls to begin with. Then, to ensure your pagination script works in all locations you can change the way you get your $paged variable. Something like this should do it: … Read more
You can have as many authors as you’d like. If the artists are not the authors of the blog posts, I would consider using a custom taxonomy instead, because it would be a more accurate model. EDIT As it’s been pointed out in the comments, taxonomies don’t have built-in meta data, and custom post types … Read more
You can modify all main queries before they happen via the pre_get_posts action and a check if is_main_query: function wpa75492_post_type_query( $query ) { if ( $query->is_main_query() ) { $query->set( ‘post_type’, array( ‘book’ ) ); } } add_action( ‘pre_get_posts’, ‘wpa75492_post_type_query’ );
What you need here is to shuffle all the array elements & then display them. But since php’s shuffle() function doesn’t preserve array key associations, here’s a version that does. function shuffle_assoc(&$array) { $keys = array_keys($array); shuffle($keys); foreach($keys as $key) { $new[(string)$key] = $array[$key]; } $array = $new; return true; } Add this function somewhere … Read more