how add class in containers

I don’t understand using rigid widgets having the ability to edit the theme. So, I call attention to the wp_nav_menu() for flexibility improvement. functions.php: <?php // register menu in `side_menu` register_nav_menu( ‘side_menu’, __( ‘Sidebar’, ‘theme-slug’ ) ); Now you can build your own menu under Appearance -> Menus. Use wp_nav_menu() function to display your menu … Read more

Vertical Menu for one page only

You’ll want to search your theme files for the part of the page template that is controlling those classes, likely page.php would be a good place to start. Then once you find the part you think is controlling the output, try adding: if( is_page(24331) ) { echo ‘vertical-header’; } For example: <div id=”page” class=”layout-fullwidth <?php … Read more

user update profile for custom code

I can see $topselected= get_the_author_meta( ‘user_top’, $user->ID ); , here you are using “user_top” as the meta_key but while updating you are using “user_chapter” update_usermeta( $user_id, ‘user_chapters’, $_POST[‘user_chapters’] ); Whatever name you are providing in <select name=”user_top” id=”user_top”>, should be used in $_POST[”] So here you are using “user_top” as your select name, so it … Read more

Can’t get_users info by using json_encode

Try this code function get_users(){ $all_users = get_users(); $arr=array(); foreach ($all_users as $val) { $arr[]=array( ‘value’=> $val->data->user_nicename, ‘label’=> $val->data->display_name, ‘icon’ => get_avatar_url($val->ID)); } wp_send_json($arr); }

Creating Log-In Page for backend server

VICTORY. At least…no 404 anymore. I haven’t actually tried to use the script yet, too excited. Thanks for the direction, Nath! Here is what I did. I went to my theme and created a subfolder titled, “js.” In the same theme, I edited header.php to include the following just below : (The part in bold, … Read more