Plugin Author
Tom
(@edge22)
Hi Tom and thanks a lot for your answer 🙂
We read that post and we tried to follow what you suggested there:
– we added in /wp-content/plugins/wp-show-posts/inc this function
add_action( ‘wpsp_before_title’, function( $settings ) {
wpsp_meta( ‘below-title’, $settings );
} );
But the result was now we have a twice category: one before title and one below:
https://www.screencast.com/t/vfnMGZ7J5u
How could we fix it?
Thanks
Just a clarification: we added function at the end of /wp-content/plugins/wp-show-posts/inc/functions.php
We have a solution:
1- open file /wp-content/plugins/wp-show-posts/inc/functions.php
2- at line 129 replace this code:
if ( ! function_exists( 'wpsp_add_post_meta_after_title' ) ) {
add_action( 'wpsp_after_title','wpsp_add_post_meta_after_title' );
function wpsp_add_post_meta_after_title( $settings ) {
if ( ( $settings[ 'include_author' ] && 'below-title' == $settings[ 'author_location' ] ) || ( $settings[ 'include_date' ] && 'below-title' == $settings[ 'date_location' ] ) || ( $settings[ 'include_terms' ] && 'below-title' == $settings[ 'terms_location' ] ) || ( $settings[ 'include_comments' ] && 'below-title' == $settings[ 'comments_location' ] ) ) {
wpsp_meta( 'below-title', $settings );
}
}
}
with this code:
if ( ! function_exists( 'wpsp_add_post_meta_after_title' ) ) {
add_action( 'wpsp_before_title', function( $settings ) {
wpsp_meta( 'below-title', $settings );
} );
}
That’s all.
Thanks Tom for support.