Forum Replies Created
-
AuthorPosts
-
tiborMember
Indeed...weird thing is I did try that before, but it didn't work then.. Must have made a typo or something.
tiborMemberYou should indeed never edit any Genesis core files. If you want this on all your pages, just add a new file named page.php to your child theme folder and Genesis will use that instead of it's own.
It should look like this:
<?php add_action( 'genesis_after_post_title', 'my_page_info' ); function my_page_info() { $post_info = '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]'; printf( '<div class="post-info">%s</div>', do_shortcode( $post_info ) ); } genesis();
You could also use it in functions.php, but then you'd first have to check if you're on a page post-type.
Actually you might want to see how Genesis uses the post-info function: look in genesis/lib/structure/post.php, at or around line 252
tiborMemberFound it:
/** Remove Google+ field from profile */
remove_filter( 'user_contactmethods', 'genesis_user_contactmethods' );
tiborMemberSince the genesis_post_info function does not run on pages, you would have to add it to the page first:
Adding this to your page template (page.php) may do the trick:
add_action( 'genesis_after_post_title', 'my_page_info' ); function my_page_info() { $post_info = '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]'; printf( '<div class="post-info">%s</div>', do_shortcode( $post_info ) ); }
tiborMemberI have a client who would be very happy if there is an answer for this...anyone?
tiborMemberYep, I know 🙂 Question is how to do this in a Child Theme... I tried:
remove_action('user_contactmethods', 'genesis_user_contactmethods');
But that doesn't work.
-
AuthorPosts