Solved with:
<?php
add_filter( 'body_class', 'alter_body_class', 20, 2 );
function alter_body_class( $classes ) {
foreach( $classes as $key => $value ) {
if ( $value === 'page' ) {
unset( $classes[ $key ] );
}
}
return array_merge( $classes, array( 'home' ) );
}
?>
Related Posts:
- Add post class to the TinyMCE iframe?
- body_class filter – Is there a better way to write this code?
- WordPress php filter admin_body_class not working
- Handling Body class based on Template
- How to add seperate classes to no-search-result and found-search-result pages on wordrpess search – is_search()
- Need to put a script above tag in header.php – WP 5.7.1
- Add class to website based on post taxonomy
- Adding body class to html tag that already has language attrubutes?
- two body tags on all WP pages regardless of theme
- Remove update nags for non-admins [duplicate]
- Are WordPress Heartbeat API ‘beats’ staggered or do they occur simultaneously for all users?
- How to determine if WP_DEBUG is enabled? [duplicate]
- Integrating WordPress to my website, while keeping my own authentication system
- Twitter feed is showing blank in WP site [closed]
- Update Custom Field on Imported Post Creation
- Unique key for each row in a repeater field
- Show different Customizer Settings on Page-Tamplates
- Using a javascript file to access a get posts array
- Add “last” and “first” to WordPress Comment Pagination Links
- Change title and meta description in included page (not template)
- Get first two paragraphs inside one div, and then get the rest under another?
- Customizer Show/Hide
- spliting posts into two columns
- Page Reloads Before AJAX Request Finishes
- I can’t get my custom widget area to show on my WordPress site
- How to restrict page access to logged-in users?
- Ajax return code 400
- Link for Most Recent Post
- wp-load Without Loading the plugins
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- How to load a template-part based on a url wildcard?
- Get updated query results on page after insert in database
- Customising the search function?
- Show wp_die if url form comment not emply
- Create an if is_page statement based on parent page
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- Append query string to all URL’s
- Loading index.php contents which located outside blog folder for post single page
- do_shortcode with custom field
- get post content of particular post by url
- Pull Tags But Not as Links
- Define specific category name in PHP
- Can I get an email notification when media is uploaded to the media library?
- PHP Syntax Error on get_posts
- Convert WordPress date format to jQuery UI Datepicker format
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- WordPress Ajax Always returning 0
- Don’t show certain div on front page?
- Deleting Certain terms from appearing on the front end as links
- Usage of call back function of add_meta_box()
- Please show me how to use an if/else statement in combination with wp_enqueue
- Menu Items fail to save correctly, cause reset of related page metadata
- How do I add more options to the post-new.php page?
- Count foreach and display in menu php
- Four posts per row [closed]
- Genesis / custom template page / setting the page title and meta desc
- First post article different on Archives template
- Shortcode displaying at the top of the page [duplicate]
- Custom Fields Not Showing
- PHP variables in a post?
- Filter wordpress query by numerical order arguments
- Help to modify wp_link_pages()
- How to Insert Related Posts Inside WordPress Post Content
- Order category posts by last word of custom field
- if get_post_meta is empty echo a placeholder or shortcode
- Admin Panel 404 Error after login
- in_array not working on dev server but works on localhost
- How can I properly loop through an array gotten from my wordpress database and display it to my site
- Unable to insert two value in two different columns (WordPress database)
- I cannot find the wordpress.scss file that my live site is pulling from
- How to put a before and after with tags in a wordpress entry?
- How to call a WP Class inside my theme
- HTML Formatting “single_term_title()”?
- Redirect User when they click Menu Option
- Adding a widget under an ‘Add to Cart’ button through a PHP snippet
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Allow Submit Contact Form Default Text In Text Box
- Woocommerce Related Product by 2 taxonomy
- Add Custom Taxonomy into Script
- Add .php to end of all WordPress Pages (multisite)
- How to display custom field from a gallery thumbnail?
- Front end/Database connection in WP
- Display text of price (minus 20%) on every product page in a sentence.
- Getting Member Data From WhishList Member on Register
- Role exception for a settings sub menu
- Div Missing In Custom Loop Query
- media_handle_sideload() returned post_id being incremented
- Global variables and re-use
- WordPress Memory limit not increasing
- Fix incorrect related posts code snippet
- Specific php document for a page
- How I can give a php page a style from my theme
- How to create a loop that will display one post and stop?
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- How to disable page create for custom post type, but allow a page with the post types slug to be created?
- WooCommerce Modal Fly cart on add to cart – With AJAX
- /page/2/ redirect to 404
- How can I trim /page/ URL with PHP in WordPress
- Adding date and time to the same request