checking the form submit in right order
checking the form submit in right order
checking the form submit in right order
You could proceed like that : add_filter(“login_redirect”, “wpse_113875_login_redirect”, 10, 3); function wpse_113875_login_redirect($redirect_to, $request, $user) { if(is_array($user->roles)) if(in_array(‘administrator’, $user->roles)) return site_url(‘/wp-admin/’); return home_url(); } This will use the WP login system and redirect users according to their role after login. I think this is easier than building your own script in this case. You could easily … Read more
as example of js code that will run on every new post page function admin_footer_se_119285(){ ?> jQuery(window).ready(function(){ if (jQuery(‘#metabox-id-div’).length == 1){ // put your code } }) <?php } ?> Take a look to usefull reference to admin_footer-(plugin_page) action hook
sounds like a htaccess issue… try a .htaccess file in the wordpress root with the content (which differs in one line from your posted blog): # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress from Using_Permalinks
Even if I’m also not quite sure if this question is related to bbPress or BuddyPress, locating (plugin-) template files might always be the same: An easy approach might be to call the body_class() in a file which is definitely active (like header.php). The output will look something like this: class=”forum-archive bbpress archive post-type-archive post-type-archive-forum … Read more
I am using this within a plugin, but it can be used within your theme’s function file. // Create field to track users’ comments numbers function display_educadme_user_comments_number($user_id) { if( is_user_logged_in() ) { global $wpdb; $user_comments_number = $wpdb->get_var(‘SELECT COUNT(comment_ID) FROM ‘ . $wpdb->comments. ‘ WHERE comment_author_email = “‘ . get_comment_author_email() . ‘”‘); ?> <h3><?php _e(‘Participation in … Read more
The only reason i can suggest is that you might not have the news category in your wordpress, else it works perfectly fine if the category is there with either title as news or the category slug as news both works fine. Make sure you have the specified category and if you do have that … Read more
wp_usermeta key problem
Set your permalink structure to: /blog/%postname%/ This won’t affect the URL’s for pages, but will prepend blog to your category & post tag permalinks (unless you have set a category/post tag base, also on the permalinks setting page).
I wonder if you got any term_links-genre filters that could be modifying your get_the_term_list() output? Your code example should in general work as expected, but you might want to use the get_the_terms() function to better control the output to your own likings. Here’s a modifed version of the corresponding Codex example: /** * Customized the … Read more