Forum Replies Created
-
AuthorPosts
-
sbn128Member
Thank you very much, Victor. It's work.
sbn128MemberBut how to make that work?
My single-answers.php code:
<?php /** * Answers post type single post template */ add_action('genesis_post_info', 'answer_author_name'); function answer_author_name() { if ( is_single() && genesis_get_custom_field('wpcf-name-author') ) echo '<span class="entry-author">Answer by: '. genesis_get_custom_field('wpcf-name-author') .'</span>'; return $post_info; } //* Customize the post info function add_filter( 'genesis_post_info', 'sp_post_info_filter' ); function sp_post_info_filter($post_info) { if ( !is_page() ) { $post_info = '[post_date]'; return $post_info; }} genesis();
And it works partly, but appears in the wrong place:
sbn128MemberThank you, Brad. I Understood.
sbn128Memberis tax not work. Please help.
/* Reverse Post Order for Post Archives on the Genesis Framework
add_action( 'pre_get_posts', 'prefix_reverse_post_order' );
function prefix_reverse_post_order( $query ) {
if ( is_admin() )
return;// Only change the query for post archives.
if ( $query->is_main_query() && is_tax('portfolio') && ! is_post_type_archive() ) {
$query->set( ‘orderby’, ‘date’ );
$query->set( ‘order’, ‘ASC’ );
}
}sbn128MemberIt looks like I found a solution. I've tried, but helped only this plugin: https://wordpress.org/support/plugin/remove-slug-from-custom-post-type
sbn128MemberI created CTP via function.php. I did not understand. What is CTP definition? Sorry for my bad English.
sbn128Member -
AuthorPosts