- This topic has 9 replies, 4 voices, and was last updated 4 years, 4 months ago by David.
-
AuthorPosts
-
February 20, 2019 at 7:44 pm #816124Greg
Currently, the Category and Comment meta tag are located on the bottom left of each blog entry and single post entry. How can I move them (category and comment meta tags) below the Blog title on both blog page and single post where the date and blog author name are located. Kinda like this β> where Iβm pulling my inspiration https://www.wpkube.com/
Can you help me with this? Love to get this done.
Thanks,
GregFebruary 21, 2019 at 9:08 am #816799TomLead DeveloperLead DeveloperHi there,
This is going to get much easier in GP 2.3, thankfully.
For now, you can do this:
add_filter( 'generate_post_date_output', function( $output ) { echo $output; $categories_list = get_the_category_list( ', ' ); if ( $categories_list ) { echo '<span class="cat-links">' . $categories_list . '</span>'; } if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo '<span class="comments-link">'; comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); echo '</span>'; } } );
Then you can disable the standard categories and comments links in Customize > Layout > Blog.
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know π
February 21, 2019 at 9:28 am #816821GregThanks, Tom
You can see it live. A couple things. I lost the category folder. But more importantly, can this be on a single line from left to right instead of stacked. Such as Date / Author / Category (with the folder icon) / Comments.
I think that would look much cleaner than a stacked group. Can we make that happen?
Thanks Again, Tom
GregFebruary 21, 2019 at 5:28 pm #817088TomLead DeveloperLead DeveloperI just adjusted the code so the folder will show up: https://generatepress.com/forums/topic/move-categories-and-comments-tags/#post-816799
Your site seems to be under maintenance mode – any chance you can remove that for now?
Let me know π
December 22, 2019 at 12:13 pm #1111511ToniHi Tom
The php code works in the current version of GP?
I need to move comments and cathegory in one single line, and dont work π
I paste the phpcde in Code Snippets and disable the standard categories and comments, but nothing seems to happen.Thanks in advance.
December 22, 2019 at 9:05 pm #1111817TomLead DeveloperLead DeveloperHi there,
Are you wanting to move the comments and categories into the header entry meta (below the post title), or keep them in the footer entry meta?
Let me know π
December 23, 2019 at 1:10 am #1111957ToniHi Tom! nice to meet you. My english is too bad, and i think that a picture is worth more than a thousand words. The picture is my actual footer entry meta and a photoshop montage with my desired footer entry meta.
My idea is all in one line. Date of publish, category, tags… (left align) and right align only comments.December 23, 2019 at 4:06 am #1112043DavidStaffCustomer SupportHi there,
are you able to share a link to your site ?
Might be best to create a New topic where you can share your site privately using the Site URL field.December 23, 2019 at 5:10 am #1112097ToniI’m sorry, I’m a newbie. How do I send you the URL of my website through the forum privately?
December 23, 2019 at 5:36 am #1112131DavidStaffCustomer SupportIf you can raise a new topic – you will see a Site URL field – only GP Support can see the content of that field.
-
AuthorPosts
- You must be logged in to reply to this topic.