Site logo

Archived topic

remove category & author from blog post

5 replies · Started by Vincent on April 23, 2021

Viewing posts 1–6 of 6

Hi guys,

I did uncheck the box for showing the category and & author from blog post it self. But this unchecking doesn't work. Here you can see it;

https://www.testdomein123.be/model-bericht/

Also i did add this code to the content-single.php, this doesn't work either. But maybe i made a misstake with using the code because i don't know much about PHP.

add_filter( 'option_generate_blog_settings', 'lh_custom_search_results_page_settings' );
function lh_custom_search_results_page_settings( $options ) {
if ( is_search() ) {

$options['categories'] = false;

}

return $options;
}

Thanks!

Hi there,

I did uncheck the box for showing the category and & author from blog post it self. But this unchecking doesn’t work.

That's because those elements are added within the page hero using template tags. So you will need to remove them from the page hero content manually:
https://docs.generatepress.com/article/header-element-overview/

Let me know if this helps :)

Nice i think that you mean that i have to use the Edit hook function and than with PHP i can remove the category and author i guess? But the problem is i am a SEO guy not a code guy, i don't know wich code to use and can't find it either. :(

I used the code what i paste above your message, also add a php open and close section to it.

Another short qestion what is important know; at the moment i am building the website, the website is not on the orginal domainname because i have not found jet a good one. I guess i can move the website to the new domainname with al the changes includded?

Thank for your help again, i was looking in the wrong element :(

Problem solved :)

Glad to be of help

This archived topic is closed to new replies.