You are using array_push()
incorrectly.
Do this:
$classes[] = 'new-class';
Or this:
array_push( $classes, 'new-class' );
But not:
$classes[] = array_push( $classes, 'new-class' );
Related Posts:
- Adding first / last CSS classes to menus
- Remove “Insert from URL” link in Media upload – WP 3.5
- WordPress Admin Bar pushed Sticky Footer off the bottom of the page
- How to change the wp-login.php page title?
- Hide custom image sizes from media library
- How to overwrite youtube embed?
- How to change “Shipping Calculator “field label on Cart Page – woocommerce? [closed]
- Filter the blog title displayed in the header
- functions.php not adding css to website?
- body_class filter – Is there a better way to write this code?
- if file_exists not working with wp_enqueue_style
- Want to create Child theme, but already edited Parent theme css files and some php files
- Using PHP to toggle stylesheet and header image, set in cookie
- How To Change The Html of Products filtration sidebar in Woocommerce?
- Get posts with at least one category in common with current post?
- Missing sidebar parameter “fix” – before_content
- Plugin CSS not enqueing
- Is it acceptable to treat a filter like an action?
- How to use my style.css file outside of wordpress subdomain?
- Can I install/embed WordPress on a ‘single page’?
- Edit incorrect password message WordPress
- Add data attribute to each li in menu
- How to design a table based on css values set from admin/dashboard
- Contact Fom 7 – how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?
- How to add an arrow to menu items has submenus
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Best way to schedule daily change in CSS parameter
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- How do I add a custom css to all posts without affecting homepage css? [closed]
- proper way to add css using functions.php?
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- RTL Stylesheet Confusion with WordPress
- Correct way to enqueue page specific CSS file
- Wrapping a Sidebar within
- How to make container class in PHP
- PHP in CSS file?
- Content filter won’t work
- Last class on last headline?
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- Warning: in_array() null given in PHP function
- How to remove sidebar primary widget on Mobile on category page [closed]
- How to Change CSS Colors from Custom Plugin Settings Page
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Get ACF options field in PHP acting as CSS
- How do I create a secondary version of the_content
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Link to page with posts of specific type
- Conditionally load class in the comment section of the post page
- CSS images don’t show up with bloginfo
- Using theme options to change a border-radius value
- Displaying images outside the content
- how to changes mobile menu toggle breakpoint in WordPress
- Applying css in functions.php
- Show related products by attribute based and certain conditions
- How to Create custom block for displaying information in content section which act like shortcode
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- Filter ‘comment_notification_text’ not working
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- PHP function for horizontal Woocommerce thumbnails and badges
- Change the “Show All” button in a WordPress Portfolio Filter
- oceanwp+woo mobile cart sidebar text
- My top header looks different on single pages but is fine on the home page
- Using php code inside style tag
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- How to hide a div section when user is logged in, in single product woocommerce
- Change lost password url to a mailto URL in WordPress
- Remove span tags from WooCommerce Downloads page
- Drop down question
- Can’t display anything through homepage text editor
- Add a top bar to a wordpress theme without editing the header.php file?
- How to print all the inline styles in the WP_Styles instance together with their keys?
- The style.php file inside theme-engine folder has other content on FTP
- How to let mobile navigation menu close when link is clicked?
- Site title not showing. Please help me
- Fix hover images blink
- Hot to edit WooCOmmerce dashboard?
- Blog Image and Title in Right Sidebar
- dynamically change content of div with php
- Target a specific container to style on WordPress storefront theme
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Position a repeated article blocks
- str_replace not preserving whitespace
- Custom Theme, Editor won’t wrap text (i.e. change width)
- Click to expand menu
- Add custom filter to register data in array
- Display a post based on its metabox selection
- Revision History for Entire WordPress Site
- WordPress – Image href for home menu nav not working
- Search box background on a different page template
- WP_Nav Highlight Parent Issue
- Add CSS class to PHP Statement
- How to add margin underneath woocommerce total price amount -> productpages
- Load slideshow.css file only if Slideshow is checked / on
- New to wordpress. Need Help with templates [closed]
- Parse error: syntax error, unexpected ‘}’ in
- Sorting Problem
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- inner-wrap div pushing custom table far down on page
- How to pass value to add_filter wpcf7_form_tag from another function?
- Add text below WooCommerce short description if metabox value is true