keithfoggan
Forum Replies Created
-
Tried that – seemed to cause a page issue, the site wouldn’t load with that code added, any ideas?
When I try that the posts disappear – doing something wrong?
/**
* DPS – Move category before title
* @see https://www.billerickson.net/code/using-display-posts-shortcode-output-filter
*
*/
function be_dps_move_category_before_title( $output, $original_atts, $image, $category_display_text, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {
$output = ‘<‘ . $inner_wrapper . ‘ class=”‘ . implode( ‘ ‘, $class ) . ‘”>’ . $image . $category_display_text . $title . $excerpt . $content . $date . ‘</’ . $inner_wrapper . ‘>’;
return $output;
}add_filter( ‘display_posts_shortcode_output’, ‘be_dps_move_image_after_title’, 10, 9 );
I’ve followed the instructions and added the code below before the /?> in the functions.php file.
/**
* DPS – Move category before title
* @see https://www.billerickson.net/code/using-display-posts-shortcode-output-filter
*
*/
function be_dps_move_category_before_title( $output, $original_atts, $image, $category_display_text, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {
$output = ‘<‘ . $inner_wrapper . ‘ class=”‘ . implode( ‘ ‘, $class ) . ‘”>’ . $image . $category_display_text . $title . $excerpt . $content . $date . ‘</’ . $inner_wrapper . ‘>’;
return $output;
}Not seeing any change in the site though, category still follows after the other elements (title, date, author).
Am I doing something wrong?