You’re overcomplicating it a bit. ?um_action=edit
is a query string, and its values are available in the $_GET
superglobal. To check if it exists, and has a specific value, you just need to do this:
function leweb_add_body_class_um_edit_profile( $classes ) {
if ( isset( $_GET['um_action'] ) && 'edit' === $_GET['um_action'] ) {
$classes[] = 'leweb-um-profile-edit';
}
return $classes;
}
add_filter( 'body_class','leweb_add_body_class_um_edit_profile' );
Related Posts:
- wp_remote_get() and javascript/noscript situation
- Order & Orderby Parameters
- Post title as link parameter
- How to change window ratio in teachpress “tplist”
- Why “?v=hash” is added to my URLs? [closed]
- Add post class to the TinyMCE iframe?
- Open WordPress ‘Add New Post’ admin page with parameters set via $_GET
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- get_the_title($postID) OR get_the_title()?
- CPT archive 404ing when using a custom taxonomy name as a variable
- Remove and add class with body_class() function
- How to assign a class to a page with a custom template?
- Making extra parameters optional
- Adding body class to login page?
- Why does rewrite rule work for page not for custom post type post?
- Add attribute to existing Shortcode
- oEmbed vimeo with add_query_arg parameters not inserted to HTML
- Passing a parameter to a permalink
- Determine WP_Query parameters from URL
- Why isn’t is_page_template() adding a body class?
- body_class filter – Is there a better way to write this code?
- append url parameters to all links
- REST API parameters not working with nginx
- Returning a value from a PHP page
- Create URL with parameter for JQuery toggle status
- De-bloating the page classes
- How do I pass arguments for multiple functions hooked to a single action?
- category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3
- Add category to body class
- Query string parameters from custom fields, inconsistent results
- Changing WP_Query params with url Query Var
- Pass GET params to URL from a main menu item
- Get URL Param Plugin and Inserting Result in Widget Code
- Dynamically change page title from URL param
- How to add parameter to wp_enqueue_script?
- Pass additional parameter in the URL
- Rewrite custom post type URL parameters
- Adding parameters to password reset key
- 404 error when passing “cat” parameter to URL
- Assign category to new post via URL
- body_class not working anymore?
- body_class REST field in WP-API
- Making extra parameters optional
- Using different parameters for different queries with pre get posts in functions.php
- how to remove all body classes in wordpress
- Website Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘Wppr_Public’ does not have a method ‘amp_support’
- How to add same body class in multiple pages using their page id?
- post_parent array doesn’t work
- Passing parameters to a static front page
- Add a searchbox to the body of a page
- Need to put a script above tag in header.php – WP 5.7.1
- Add term of current custom post type to admin body class using admin_body_class
- HTTP 403 Error when passing parameters to URL
- How do I add Category Body Classes to Admin?
- missing argument 2 when passing arguments to add_action
- How to parse a custom url (within WP site) and obtain params passed to that URL
- why do I have to use required parametres?
- Passing values through url for checkbox fields with same name to get?
- Custom HTML title based on URL parameter
- Get param from shortcode in plugin function
- shortcode – multiple instances of same parameter name in one shortcode instance
- body_class(); not working with bootstrap navbar fixed top?
- WordPress blog assign unqiue body class
- How to get setting from separate file?
- What is wrong with my WP_Query Arguments?
- How to pass on a value as parameter via url to another page
- Why won’t the action hook wp_head accept parameters?
- How do I pass $in_foooter to wp_enqueue_script() without passing other params?
- Adding a Tag Parameter / Filter to My Shortcode
- Adding query parameter to archive page returns 404
- How to override Plugin javascript function : $(‘body’).on(‘change’,’.class’)
- add_filter ‘body_class’ only working for logged in users
- Problem parsing long parameter in shortcode
- Show data obtained from a function and place it in a shortocode function
- Add top parent page id to body class
- wordpress automatic URL ‘page’ parameter rewrite
- Get posts from year from URL
- add_action with associative array
- How to pass username in url
- Url parameter going to 404 not found
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- add class to all images inside the content
- Shortcode not interpreted if parameter set
- Add post id as body class in wordpress admin dashboard [duplicate]
- Add class when more page is visited
- Pass post title as URL parameter
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- different body classes for each category
- How to list out all values from the get_body_class array
- Add parent ID to body_class
- How to pass parameters thru URL?
- How to pass parameter that ends up being part of a class name with wordpress shortcode
- Custom Post Type URL Rewriting
- Is it possible to change a shortcode parameter based on a media query?
- two body tags on all WP pages regardless of theme
- Non Object Notice Error – How to fix please
- What are the parameters are used in add_action and filters?
- Registration fields prefilled with URL parameters
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- Prevent URL Parameter Affecting other WP Query