Forum Replies Created
-
AuthorPosts
-
sandnsurf
MemberThe issue also occurs on the Essence Pro live demo on the StudioPress website (https://my.studiopress.com/themes/essence/#demo-full) with the delay due to the link to the unpkg.com taking 12 seconds to load. Had no issues with the child theme until recently when load times have blown out. Will explore changing theme for the four sites unless there is a simple fix for the issue?
Example sites: https://milvo.org/sandnsurf
MemberHaving the same problem with //unpkg.com/[email protected]/dist/css/ionicons.min.css?ver=1.2.2 taking 10-12 seconds to load then being cancelled. Running on Kinsta with Essence Pro, the issue only occurs on the 4 sites with this configuration and not with any of the other genesis hosted sites. Have done all the same actions, and started a new site with no plugins and just the theme loaded...it is the child theme. No idea how to fix
March 9, 2018 at 9:18 pm in reply to: Create Author clickable link and author archive for pages #217686sandnsurf
MemberThank you Christoph
I have added the 'Brad Dalton' code to functions.php and now have post author data displayed, thank you
Updated the 'Isabel Castillo' code adding page to array - and now have the author pages and posts displayed on the author archive page.
add_action( 'genesis_entry_header', 'add_post_info_pages' );
function add_post_info_pages() {
if ( is_page() ) {
$post_info = 'by [post_author_posts_link], Last updated [post_modified_date] [post_edit]';
printf( '<p class=”entry-meta”>%s</p>', do_shortcode( $post_info ) );
}
}function custom_post_author_archive($query) {
if ($query->is_author)
$query->set( 'post_type', array('page', 'post') );
remove_action( 'pre_get_posts', 'custom_post_author_archive' );
}
add_action('pre_get_posts', 'custom_post_author_archive');Thank you again
sandnsurf
MemberHave reviewed relevant posts on forum such as here . I understand that the previous code was for XHTML so changed functions.php as per @braddalton with no effect
Not sure what to add next - so have added the global author box code
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );and
//* Display author box on archive pages
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );Will continue to try and fix, but if anyone has anymore suggestions, would love to hear them
Mike
sandnsurf
MemberHave reviewed relevant posts on forum such as here and here
I understand that the previous code was for XHTML so changed functions.php as per @braddalton with no effect
Not sure what to add next - so I added the global author box code
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );and
//* Display author box on archive pages
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );Will continue to try and fix, but if anyone has anymore suggestions, would love to hear them
Mike
sandnsurf
MemberThanks so much @braddalton
Final solution below (changing hook from genesis_after_entry to genesis_before_comments) moved the author box on pages from below to above comments and trackbacks...
/** Add Genesis Author Box on Single Pages**/
add_action('genesis_before_comments', 'add_author_box_singular_pages');
/**
* @link http://wpsmith.net/2011/genesis/add-the-genesis-author-box-to-pages/
*/
function add_author_box_singular_pages() {
if ( !is_page())
return;
if ( get_the_author_meta( 'genesis_author_box_single', get_the_author_meta('ID') ) ) {
genesis_author_box( 'single' );
}
}sandnsurf
Member...and finally if I wanted to put the author box 'above the comments' as per the other post on the blog...could I modify your code from here (http://wpsites.net/best-plugins/re-positioning-shareaholic-sharing-buttons-after-author-box/)?
//* Reposition Author Box
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
add_action( 'genesis_entry_content', 'genesis_do_author_box_single', 11 );//* Hook Shareaholic Apps in Manually
function hook_shareaholic_buttons_genesis() {
if (is_singular('post') ) {
echo do_shortcode ('[shareaholic app="share_buttons" id="562884"]');
echo do_shortcode ('[shareaholic app="recommendations" id="<insert shareaholic app ID here>"]');
}
};
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/best-plugins/re-positioning-shareaholic-sharing-buttons-after-author-box/
*/
add_action('genesis_entry_footer', 'hook_shareaholic_buttons_genesis', 5 );sandnsurf
MemberThank you @braddalton - it worked!
You are a scholar and a gentleman
sandnsurf
MemberThank you @braddalton
Have updated the code to:add_action('genesis_after_entry', 'genesis_do_author_box');
function genesis_do_author_box_page() {
if ( !is_page() )
return;if ( get_the_author_meta('genesis_author_box_single', get_the_author_meta('ID') ) ) {
genesis_author_box('single)');
}
}No luck as yet
Will revisit all functions.php to see what I am missingMike
-
AuthorPosts