Created
August 20, 2019 05:28
-
-
Save Swapnildhanrale/27f292b8625203f07f1b7cb85b3c65a9 to your computer and use it in GitHub Desktop.
Add category above the title in Astra Theme
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 | |
/** | |
* Add category above the title in Astra Theme | |
* | |
* @todo Change the `prefix_` and with your own unique prefix. | |
* | |
* @since 1.0.0 | |
*/ | |
if( ! function_exists( 'prefix_function_name' ) ) : | |
function prefix_function_name() { | |
?> | |
<div class="categories"> | |
<?php echo astra_post_categories(); ?> | |
</div> | |
<?php | |
} | |
add_action( 'astra_single_post_title_before', 'prefix_function_name' ); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment