I need to display in the posts of the megamenu the primary category of the single post and not the first one that is loaded.
I found that the file to edit is penci-render.php.
Line 117 $ category = get_the_category (get_the_ID ());
I created the structure of the child theme like that of the original theme but the penci-render.php file is not called even by loading the file in the function.php
You can do that by copy the function penci_return_html_mega_menu on penci-render.php file and paste it to functions.php file from the child theme and edit it.
Note: Remove the function_exists check to get it override to the function from the theme itself:
if ( ! function_exists( 'penci_return_html_mega_menu' ) ) {
And remember to remove the close of this if: } at the end of the function
dear support
I need to display in the posts of the megamenu the primary category of the single post and not the first one that is loaded.
I found that the file to edit is penci-render.php.
Line 117 $ category = get_the_category (get_the_ID ());
I created the structure of the child theme like that of the original theme but the penci-render.php file is not called even by loading the file in the function.php
Can you tell me how I can proceed?
Thank you
Hi,
You can do that by copy the function penci_return_html_mega_menu on penci-render.php file and paste it to functions.php file from the child theme and edit it.
Note: Remove the function_exists check to get it override to the function from the theme itself:
And remember to remove the close of this if: } at the end of the function
Best Regards,
PenciDesign
it worked
thank you