- This topic has 14 replies, 3 voices, and was last updated 6 years, 2 months ago by Tom.
-
AuthorPosts
-
January 23, 2018 at 4:12 am #477845Aaron
Hello People,
firstly I want to thank you for your great theme.
I have a question about: .cat-link
is it possible that the category will appear the same as the tags look like, for some reason my category looks like a list (ul), and I can’t change it?
and how to move the .cat-links to appear below the post title?
image: https://myherb.co.il/wp-content/uploads/2018/01/myherb-category-fix.jpgThanks,
AaronJanuary 23, 2018 at 7:39 am #478076LeoStaffCustomer SupportHi there,
I’m not quite sure what you mean. Are you able to guide me to the page in question?
Thanks!
January 24, 2018 at 3:46 am #478715AaronHi Leo,
I’m sorry for my English.
here is the link:
link to the page
1. Take a look at the post categories, they appear at the end of the article, I want to move them up, so they will be below the title (above the featured image).
2. Categories show up with bullets for some reason, is it possible to make them show up like the tags look like (take a look at the link I provided).Thanks.
January 24, 2018 at 6:53 am #478912LeoStaffCustomer Support1. https://generatepress.com/forums/topic/display-post-categories-and-tags-below-title/#post-443405
2. Can you disable any caching plugin so I can see the source of the code?
January 25, 2018 at 2:14 pm #480003Aaron1. Thank you, Leo that’s worked. but there is a problem, the commas “,” between cat & tags appear again, is it possible to remove them?.
also, the tags and categories appear at two places at the same time (need to remove them from the end of the post).2. Plugin Disabled.
January 25, 2018 at 9:52 pm #480156TomLead DeveloperLead DeveloperTo remove the commas, you would replace that function with this one:
add_action( 'generate_after_entry_title', 'tu_add_meta_below_title' ); function tu_add_meta_below_title() { $categories_list = get_the_category_list( '' ); $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( '', '' ); $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 ); if ( $tags_list || $categories_list ) : ?> <div class="entry-meta"> <?php if ( $categories_list ) { echo $categories_list; } if ( $tags_list ) { echo $tags_list; } ?> </div> <?php endif; }
January 26, 2018 at 3:06 am #480302AaronHi Tom, thanks for your answer. This code removed the comma, and moved the taxonomies up, but – categories shows as a list item: link
+ at the end of the article you can see category and tags appear with commas: link to the article
January 26, 2018 at 9:41 am #480628TomLead DeveloperLead DeveloperTry adding this CSS:
.entry-meta .post-categories li, .entry-meta .post-categories { display: inline; }
Do you want that post meta at the bottom as well?
January 27, 2018 at 8:12 am #481147AaronIt’s Working great, Thanks Tom!
– the last weird problem: it keeps show taxonomy with a comma at the end of the article</aJanuary 27, 2018 at 9:48 am #481242TomLead DeveloperLead DeveloperDo you want those tags to show up there as well, just without the commas? Or do you want them to go away completely?
January 27, 2018 at 11:29 am #481299AaronJust the commas, please. thanks again.
January 27, 2018 at 11:57 am #481307AaronHow to target specific custom post type , to remove this icon of tags, which is showing up empty without taxonomies. maybe because it has different slug, maybe not.
January 28, 2018 at 1:02 am #481500TomLead DeveloperLead DeveloperThe best thing to do would be to turn them off by default in Customize > Layout > Blog, then add this line of code:
add_action( 'generate_after_entry_content', 'tu_add_meta_below_title' );
I just adjusted the code above so the elements should only display if they exist.
January 29, 2018 at 2:41 am #482290AaronGreat! I learned a lot here. ๐
January 29, 2018 at 10:24 am #482728TomLead DeveloperLead DeveloperGreat to hear! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.