-
-
Save billerickson/648a49af58f50fed2a4b3a6104980d02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Display Posts Shortcode - Move image after title | |
* @see https://www.billerickson.net/code/using-display-posts-shortcode-output-filter | |
* | |
*/ | |
function be_dps_move_image_after_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) { | |
$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $title . $image . $date . $author . $category_display_text . $excerpt . $content . '</' . $inner_wrapper . '>'; | |
return $output; | |
} | |
add_filter( 'display_posts_shortcode_output', 'be_dps_move_image_after_title', 10, 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same error here as well.