Could you help, how to get category IDs?
I would like to make some customazitation. Only found get_category, but this show the link, and the name of the category.
Or where manage get_category?
Thanks.
Hi,
Do you need to get the category id in code? This depends on the file you’ll needs to get the category id, you can try this – https://developer.wordpress.org/reference/functions/get_cat_id/
If you want to see the cat id in WordPress then you can use this guide – https://www.wpbeginner.com/beginners-guide/how-to-find-post-category-tag-comments-or-user-id-in-wordpress/
Thank you!
So i mean, i would like some customization in td_module_flex_1.php
I would like to add category picture (i have a shortcode for this), which i need the id of the category.
As i see i need some changes in line 158, I am looking for a solution to this ( get_category() is not a solution).
{ echo $this->get_category(); }
Thanks.
Hi,
I think that I understand what you mean, you use the get_category() from the file td_module_flex_1.php, but the problem is if this has the element you need, for this you need to check the function in wp-content/plugins/td-composer/legacy/common/wp_booster/td_module.php – https://i.imgur.com/Jy19PPp.png the function from there need to be changed to can display the picture.
Thank you!
Thank you, so i found: $selected_category_obj_id
I haven’t found a solution yet for how to print/echo it in the td_module_flex_1.php
Hi,
I’m glad you found something you can use.
I believe that you can try something like this – https://i.imgur.com/t17AK4F.png (of course the code will have to be adapted according to your needs).
Thank you!