• Author
    Posts
  • geerodge

    Hi

    Any chance you could help me understand how to chuck a page id onto the /account/listings/ pages so I can mess around with the css please? I’ve got this embedded into another theme.

    ihordeveloper

    It’s not possible yet, but you can try using this PHP snippet to add a unique CSS class to every HivePress page:

    add_filter(
    	'body_class',
    	function( $classes ) {
    		if ( function_exists( 'hivepress' ) ) {
    			$route = hivepress()->router->get_current_route_name();
    
    			if ( $route ) {
    				$classes[] = 'hp-template--' . hivepress()->helper->sanitize_slug( $route );
    			}
    		}
    
    		return $classes;
    	}
    );

    Then you can customize the listings page via this CSS class:

    .hp-template--listings-edit-page

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.