how to add wp-user fields to front-end form

Something like this should point you in the right direction: function updateUser($newPassword = ”, $newEmail=””){ $update = array(); if(!empty($newPassword)) $update[‘user_pass’] = $newPassword; if(!empty($newEmail)) $update[‘user_email’] = $newEmail; if(!empty($update)){ $update[‘ID’] = wp_get_current_user_id(); return wp_update_user($update); } return; } See wp_update_user() for more info on how that function works. You should also verify the source of the post data … Read more

How to customize a site hosted on wordpress.com locally [closed]

WordPress com doesn’t allow you to upload any customization, other than CSS via their paid customization feature. Notably you can download WordPress com themes (link is available in sidebar of theme info page) and use them in self hosted installation. However, given that WP com doesn’t provide source for much of its environment, it’s unlikely … Read more

Create a custom admin panel

Your question is pretty broad but provide your client with a custom role and only allow access to the specific pages you want, whether those are Core or created by yourself. That is how I would approach this. You will be working within WordPress and so retain its functionality for yourself but have a truncated … Read more

Make tag archive display post are ordered by post format

You’re right. It isn’t a good structure. You are running three queries on the page– the two you are creating plus the main query that is being completely ignored (plus ancillary queries). You are also clobbering the main query halfway through the page load when you overwrite $wp_query, which can cause unexpected and unpredictable results … Read more

How to have multiple WordPress Menus

There are a few steps you need to take to add menus, the wordpress way. Register the menu in functions.php using register_nav_menus() Codex Link: https://codex.wordpress.org/Function_Reference/register_nav_menus Example: register_nav_menus( array( ‘my_custom_menu’ => ‘My Custom menu’, ‘my_other_menu’ => ‘My Other Menu’, ) ); Now you can create new menus on the back-end Login and go to Appearance -> … Read more

Custom select query two tables by a meta key

First of all you are trying to combine both of the tables by post_parent. $wpdb->posts.post_parent = $wpdb->ftcalendar_events.post_parent I guess data in the ftcalendar_events has children of posts table, try $wpdb->posts.ID = $wpdb->ftcalendar_events.post_parent Also you can try joining tables: SELECT * FROM $wpdb->posts JOIN $wpdb->ftcalendar_events ON $wpdb->posts.ID = $wpdb->ftcalendar_events.post_parent WHERE $wpdb->posts.post_status=”publish” AND $wpdb->posts.post_type=”post” ORDER BY $wpdb->posts.post_date … Read more

Pagination with custom field

As I stated in comments, you need pre_get_posts and a meta_query to exclude posts from a certain custom field with a certain value from the main query. It is really in your best interest to read up on the before mentioned. Just remember, all parameters in WP_Query works on pre_get_posts as WP_Query uses pre_get_posts to … Read more