- This topic has 13 replies, 4 voices, and was last updated 2 years, 12 months ago by
Fernando.
-
AuthorPosts
-
March 4, 2023 at 9:08 am #2555523
ROHART
Hi,
I am currently changing my wordpress theme to GeneratePress (which I already use on other blogs). For this, I do it on a clone site with the WP Staging Pro plugin.
I want to edit the archive and add the date, post author name, post categories and number of comments.
I checked the boxes in Personalization ▸ Layout ▸ Blog. But nothing is displayed. I saw the tutorial to add a piece of code in the function.php file here https://docs.generatepress.com/article/option_generate_blog_settings/ but even by adding this code, nothing is displayed.
Do you have an idea to help me to resolve the problem ?

Gregory
March 4, 2023 at 12:17 pm #2555689Leo
StaffCustomer SupportHi Gregory,
I checked the boxes in Personalization ▸ Layout ▸ Blog. But nothing is displayed.
Can you make sure the Blog module is activated?
https://docs.generatepress.com/article/blog-content-layout/
https://docs.generatepress.com/article/blog-content-layout/#archivesYou can also consider using a block element post meta as well if you prefer to create a custom layout:
https://docs.generatepress.com/article/block-element-post-meta-template/Let me know if this helps 🙂
March 4, 2023 at 3:46 pm #2555815ROHART
YHi Leo,
Yes, blog module is active. You can see here https://www.i-trekkings.net/wp-content/uploads/2023/03/capture-generatepress-archives-scaled.jpg.
March 4, 2023 at 5:40 pm #2555859Leo
StaffCustomer SupportThat link isn’t working for me.
Can you check? and please also take a screenshot of the Blog panel in the customizer.
Let me know 🙂
March 9, 2023 at 6:10 am #2561443ROHART
Sorry for the wrong link. You can see the screenshot here https://www.i-trekkings.net/wp-content/uploads/2023/03/screenshot-generatepress-scaled.jpg
March 9, 2023 at 6:50 am #2561490David
StaffCustomer SupportHi there,
is it possible to see the staging site ?
March 9, 2023 at 7:15 am #2561524ROHART
Yes, you can see my problem here https://clone.i-trekkings.net/destination/afrique/
March 9, 2023 at 7:53 am #2561663David
StaffCustomer SupportAh its a Custom Post Type (?) – if so then you need to tell GP to include the meta on that post type.
See here:https://docs.generatepress.com/article/generate_entry_meta_post_types/
March 10, 2023 at 12:16 am #2562507ROHART
Yes, it is. Thanks, I will check that.
March 10, 2023 at 3:44 am #2562705David
StaffCustomer SupportYou’re welcome
March 20, 2023 at 1:22 am #2573711ROHART
I managed to display the date, the author’s name but I can’t display the custom taxonomies. How I can do that?
March 20, 2023 at 1:54 am #2573749Fernando Customer Support
Hi Rohart,
Try adding a snippet to create a Shortcode for your custom taxonomy. See here for an example: https://stackoverflow.com/questions/40595724/display-custom-taxonomy-by-shortcode#:~:text=By%20default%20add_shortcode%20return%20html.%20You%20can%20try%20the%20following%20code%3A
Example:
add_shortcode( 'YOUR_SHORTCODE_NAME', 'category_in_content' ); function category_in_content($atts){ global $post; $html = ''; $taxonomy = 'YOUR-CUSTOM-TAXONOMY-SLUG'; $terms = get_the_terms( $post, $taxonomy ); if ( !empty( $terms ) ) { foreach ($terms as $term) { $html .= '<a href="' . get_term_link( $term, $taxonomy ) . '">' . $term->name . '</a>'; } } return $html; }Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
You may then add the shortcode
[YOUR_SHORTCODE_NAME]through a Shortcode Block.March 20, 2023 at 2:14 am #2573770ROHART
I find the solution in the same time. Thanks for your help.
March 20, 2023 at 5:17 pm #2574821Fernando Customer Support
You’re welcome, Rohart!
-
AuthorPosts
- You must be logged in to reply to this topic.