Archived topic
I want to move entry-meta after the content but i could not.
5 replies · Started by Gopi on June 6, 2021
i want to move the tag link and cat links to the end.
add_action( 'after_setup_theme', function() {
remove_action( 'generate_after_entry_title', 'generate_post_meta' );
add_action( 'generate_after_entry_content', 'generate_post_meta', 15 );
} );
add_action( 'generate_after_entry_title', 'tu_add_meta_below_title' );
function tu_add_meta_below_title() {
$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
$categories_list = sprintf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
_x( 'Categories', 'Used before category names.', 'generatepress' ),
$categories_list
);
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
$tags_list = sprintf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ),
$tags_list
);
?>
<?php
}
Hi there,
Can you point us to where exactly you want to move the tags? So we can confirm if the right hook is being used.
Also, can you tell us how you're adding the snippet?
Let us know.
i want to move after the content.
Hi there,
you don't need that code to display the Cat / Tag links after the content as thats its default position.
So you can remove that code and in Customizer > Layout > Blog --> Content, click the Single Tab and check the Display post categories and Display post tags
i want to make it on single line
i want to make it on single line
We can do this with CSS.
Try adding this:
span.cat-links, span.tags-links {
display: inline;
}