Forked from shubhw12/gist:12f204c61b7d5854507a124676159816
Last active
March 26, 2023 20:49
-
-
Save assoscoupa/e52dac4bc62bce6114360e01baaa7231 to your computer and use it in GitHub Desktop.
Display tags below post 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
add_filter( 'astra_post_tags', 'remove_tags_callback' ); | |
function remove_tags_callback(){ | |
return ' '; | |
} | |
add_action( 'astra_entry_after' , 'add_tags_callback'); | |
function add_tags_callback(){ | |
$output = ''; | |
/* translators: used between list items, there is a space after the comma */ | |
$tags_list = get_the_tag_list( '', __( ', ', 'astra' ) ); | |
if ( $tags_list ) { | |
$output .= '<span class="tags-links">' . $tags_list . '</span>'; | |
} | |
echo $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This places tags at bottom for both archive page / posts page as well as single posts. Any thoughts or suggestions if we only want to do this for singlepost pages.
Found the fix https://wordpress.org/support/topic/how-can-i-show-post-tags-after-post-content-and-help-with-child-theme/