This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[aa-author-bio authors='12'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hwl_home_pagesize( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if ( is_home() ) { | |
// Display only 3 posts | |
$query->set( 'posts_per_page', 3 ); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hwl_home_pagesize( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if ( is_home() ) { | |
// Display only 3 posts | |
$query->set( 'posts_per_page', 3 ); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hwl_home_pagesize( $query ) { | |
if ( is_admin() || ! $query->is_main_query() ) | |
return; | |
if ( is_home() ) { | |
// Display only 3 posts | |
$query->set( 'posts_per_page', 3 ); | |
return; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Allow access to own content only | |
*/ | |
function my_authored_content($query) { | |
//get current user info to see if they are allowed to access ANY posts and pages | |
$current_user = wp_get_current_user(); | |
// set current user to $is_user | |
$is_user = $current_user->user_login; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( is_user_logged_in() ) { ?> | |
<?php $user_info = get_userdata(get_current_user_id()); | |
global $current_user; | |
get_currentuserinfo(); | |
echo get_avatar( $current_user->ID, 200 ); | |
echo '<br />'; | |
echo '<br />'; | |
echo 'Welcome, ' . $user_info->user_login . "!" . "\n"; | |
echo '<br />'; | |
echo '<br />'; |