- This topic has 42 replies, 4 voices, and was last updated 1 year, 10 months ago by Ying.
-
AuthorPosts
-
October 18, 2022 at 4:23 am #2377302Paul
hello david
thanks for your help.
now they are all separate page.
So, need to create Taxonomies Under the menu of Pages. just like the Taxonomies Under the menu of Posts. https://prnt.sc/5FJPxSmDNYsy
But, it is the defaul Taxonomies from the wordpress for The Posts.
Now need me to create a plugin in order to add Taxonomies for my pages, it is difficult for me to create a plugin.
so,
option 1, can you tell me how to add it or tell me the code, i will it to Additional CSS?
option 2, can you tell me if there is ready-made wordpress Taxonomies plugin?awaiting your reply and thanks in advance, have a great day.
October 18, 2022 at 4:56 am #2377330DavidStaffCustomer SupportFor your Pages taxonomy – Do you want to use the same Categories and Tags you have for Posts?
e.g i create a Post Category of
Metal
, do you want Pages to also see Category > MetalOctober 18, 2022 at 6:50 am #2377438PaulHello David
The method you recommend is really good.
My products are stainless steel, aluminum, titanium
For posts, I can write blog posts about stainless steel, aluminum, and titanium separately.
I could use the words Stainless Steel, Aluminum, Titanium as Categories or Tags.
In the same way, I can also classify the taxonomy of products by Categories or Tags.
Please see the screenshot https://prnt.sc/nZj0b7oGGD-D, there is no Categories or Tags under my Page
Fernando gave me a link before, they are in the screenshot in the article https://prnt.sc/AYWPGDNq_bCW, which has Categories or Tags under the Page, why it has them?
If so, how would that be done? Need CSS code or a plugin to add Categories or Tags?
Another, if i don’t want to use the same Categories and Tags as Posts, then how to do that?
thanks in advance
October 18, 2022 at 7:34 am #2377495DavidStaffCustomer SupportOption 1 – use the Post categories and tags on Pages:
Add this PHP Snippet to your site:
function add_categories_to_pages() { register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_categories_to_pages' ); function add_tags_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); } add_action( 'init', 'add_tags_to_pages');
Option 2 – a custom taxonomy for pages and categories is much more complicated, and would either require custom development or a more complex plugin
October 18, 2022 at 7:47 am #2377511Paulhello david
thanks for help
PHP snippet wil be added to Additional CSS from this screenshot https://prnt.sc/hyGeKNJYUcfa?
i never did that before and dont know to to do that?
1. is it possible to make the video guide for me?
2. If solving this issue of Taxonomies, then i will add the section of “related to products” at end of the product pges?
3. If solving this issue of Taxonomies, i can add the BreadCrumbs for all pages and achives?4. This PHP Snippet can be added or deleted by myself based on my requirement? it will not effecth theme php if i delete it in the future? right? pls explain and confirm that, thanks in advance.
October 18, 2022 at 8:12 am #2377725DavidStaffCustomer SupportNo PHP is not CSS. This document explains how to add PHP:
https://docs.generatepress.com/article/adding-php/
TLDR:
Are you using a Child Theme?
If YES, then the PHP gets added to the Child Theme > functions.php
If NO, install the Code Snippets plugin, then in Snippets > Add New, paste in the code, and Save it.Answers to 2, 3 and 4 = Yes.
October 18, 2022 at 8:24 am #2377754Paulhello david
Are you using a Child Theme?
If YES, then the PHP gets added to the Child Theme > functions.php
If NO, install the Code Snippets plugin, then in Snippets > Add New, paste in the code, and Save it.What is a Child Theme? im using GeneratePress + GP Premium + GenerateBlocks Pro
Also, although we are using Child Theme, can i use Code Snippets plugin?
October 18, 2022 at 10:00 am #2377849YingStaffCustomer SupportHow to use a child theme: https://docs.generatepress.com/article/using-child-theme/
Yes, even if you are using a child theme (but I don’t think you are using one), you can still use code snippet plugin.
October 18, 2022 at 6:48 pm #2378196Paulhello how are you
1. i downloaded the child theme. it seems that this child theme is also done by Generatepress.
To be honest, i never heard of this child them since i bought this theme.
I would like to know when we can consider using this child theme?
when you bought this theme, i only know to use GP Premium and GeneratePress, never see this child theme in Downloads of the account?
2. although i am not good dat Child Theme and how to use functions.php, could yuou give some blog article or docs , or video from generatetheme? I want to check them and learn them well for the future use?
thanks in advance
October 18, 2022 at 7:25 pm #2378211Fernando Customer SupportA Child theme is a WordPress concept. The “Child” theme you downloaded is a child theme to GeneratePress theme. Intrinsically, you’re still using GeneratePress theme
To make it simple, generally, child theme are used if you’ll be making edits to the theme’s files. This is because if you make edits on the Parent theme(Original GeneratePress theme), the changes you’ll be making will be deleted once there is an update.
With that said, if you’re not planning to make any kind of “change/edit” to the files of GeneratePress code-wise, and you’re just planning to “add” code, then using Code snippets would be good.
For more reading on Child themes, I found this on Google: https://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/
October 19, 2022 at 12:39 am #2378352Paulhello
yes, i dont want to make big or many chagnes for orignial generatepress theme
Child theme is mainly for Designers and developers with big customized task
if only adding few or small funciton, better to use code snippet plugin
October 19, 2022 at 12:51 am #2378364Fernando Customer SupportI see. Then Code Snippets Plugin is definitely the way to go.
You can find it here: https://wordpress.org/plugins/code-snippets/ or in Plugins > Add new in your admin dashboard.
October 19, 2022 at 1:01 am #2378376PaulHi Fernando
Thanks for quick rely.
Now i will add PHP snippet from this screenshot https://prnt.sc/_M_PxyyONk0y by Code Snippets Plugin
Once the above is done, then i will see the result from the screenshot https://prnt.sc/ID7GEgxrwbSM
Just As David told me yesterday, Pages taxonomy and Posts taxonomy – use the same taxonomy including Categories and Tags?
thanks for checking them for me again and thanks in advance
October 19, 2022 at 1:10 am #2378383Fernando Customer SupportYes, that’s correct.
October 19, 2022 at 1:21 am #2378392Paulthanks for all
so the final result is like this https://prnt.sc/Ms17zWL97SOW
1, 2 , 3, are the same as the picture
5, 6 is blankthen save.
-
AuthorPosts
- You must be logged in to reply to this topic.