Home › Forums › Support › Changing the layout of the elements of a post This topic has 3 replies, 3 voices, and was last updated 2 years, 3 months ago by Ying. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts December 3, 2021 at 5:47 am #2037049 Patrick Hello, Sorry for the question that you have probably been asked very (too) often. How to remove meta information (date, author, category…) in posts of a certain category? See in the screenshot the elements to remove. https://ndf2.cw56.net/wp-content/uploads/2021/12/2021-12-03-13_43_24-Greenshot.jpg Kind regards December 4, 2021 at 2:10 am #2037946 DavidStaff Customer Support Hi there, sorry for the delay, you’re topic slipped through our system. Try this PHP snippet: add_action( 'wp', function(){ if ( in_category( 'category_slug' ) ) { remove_action( 'generate_after_entry_title','generate_post_meta', 10 ); remove_action( 'generate_after_entry_content','generate_footer_meta', 10 ); } } ); Adding PHP: https://docs.generatepress.com/article/adding-php/ Just update the category_slug to match your requirements. December 4, 2021 at 8:17 am #2038294 Patrick Thank you, It’s ok for my first steps, I figured it out by myself without writing any code. I went to an article and launched the customization. In this one I found Layout / Blog / Articles and I was able to uncheck what did not suit me. Now, I want to understand your proposition: Is the add action(){} to put in child theme/functions.php? It’s what I understand from “Adding PHP: https://docs.generatepress.com/article/adding-php/” And after ? Just update category_slug ? I go to posts categories and I select the category then “enter” December 4, 2021 at 11:22 am #2038444 YingStaff Customer Support Hi Patrick, 1. Yes, copy and paste the code to your child theme’s functions.php file. 2. Find out what the slug of the specific category is, replace the category_slug with it. 3. Save your functions.phpfile. Let me know if this helps 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In