Last active
June 11, 2020 07:47
-
-
Save SuryawanshiPrajakta/a1e30fd10d2d73cae2d2c7ebad5dcefa to your computer and use it in GitHub Desktop.
Display meta above title
This file contains hidden or 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
1) Put the following in the active theme's functions.php | |
function title_before( $post_id, $settings ) { | |
?> | |
<div class="uael-post__meta-data custom"> | |
<span class="uael-post__author"><?php the_author(); ?></span> | |
<span class="uael-post__date"> <?php echo wp_kses_post( apply_filters( 'uael_post_the_date_format', get_the_date(), get_the_ID(), get_option( 'date_format' ), '', '' ) ); | |
?> | |
</span> | |
</div> | |
<?php | |
} | |
add_action( 'uael_single_post_before_title', 'title_before', 10, 2 ); | |
2) Put the following CSS - | |
.uael-post__meta-data { | |
display:none; | |
} | |
.uael-post__meta-data.custom { | |
display: inline-block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment