<section class="bottom-header container-fluid"> <div class="menu"> <ul class="clearfix nav-menu"> <li><a href="#">Admissions and Aid</a> <ul> <div class="container"> <li><h2>School</h2> <ul> <li><a href="#">Lidership</a></li> <li><a href="#">History</a></li> <li><a href="#">Locations</a></li> <li><a href="#">Careers</a></li> </ul> </li> <li><h2>School</h2> <ul> <li><a href="#">Undergraduate</a></li> <li><a href="#">Masters</a></li> <li><a href="#">International</a></li> <li><a href="#">Online</a></li> </ul> </li> <li><h2>School</h2> <ul> <li><a href="#">Undergraduate research</a></li> <li><a href="#">Masters … [Read more...] about Remove unwanted elements for a wp_nav_menu
Get_term_meta() always returns false
function changePostOrder(){ $post_order = get_term_meta($_POST['tag_ID'], 'post-order', true); var_dump($post_order); // $post_order returns false, while it should return oldest or newest ?> <tr class="form-field"> <th scope="row" valign="top"><label for="post-order"><?php _e('Post Order'); ?></label></th> <td> <select name="post-order" id="post-order"> <option <?php if ($post_order == 'oldest') { ?>selected="true" <?php }; ?>value="oldest">oldest</option> <option <?php if ($post_order == 'newest') { ?>selected="true" <?php }; ?>value="newest">newest</option> </select> </td> </tr> <?php } add_action ( 'edit_category_form_fields', 'changePostOrder'); As a result, after page refresh the dropdown list is again the same (oldest is selected), even though in the database the meta_value column is "newest". Am i doing something wrong? I am using the same approach as … [Read more...] about Get_term_meta() always returns false
How to ask WordPress to generate XHTML?
By default, WordPress does not close all paragraphs, i.e. one can have paragraphs that start with <p> but with no closing </p>. The code editor is useless, because paragraph tags do not appear, and if I add them explicitly, they are removed automatically from the editor. … [Read more...] about How to ask WordPress to generate XHTML?
Get user count based on multiple meta key values?
add_shortcode('pbe_storecount', 'pbe_shopcounts'); function pbe_shopcounts($atts) { $atts = shortcode_atts( array( 'state' => '', 'metakey' => 'Group', 'metavalue' => do_shortcode('[display_name]'), 'userrole' => '', ), $atts ); $getQuarter = do_shortcode('[usermeta key="current_quarter" user="717"]'); if ($getQuarter == '1'){ $currentQuarter = 'ranker_q1'; } elseif ($getQuarter == '2'){ $currentQuarter = 'ranker_q1_89'; } elseif ($getQuarter == '3'){ $currentQuarter = 'ranker_q1_90'; } elseif ($getQuarter == '4'){ $currentQuarter = 'ranker_q1_91'; } else { $currentQuarter = ''; } $user_ids = get_users( $args ); $args = array ( 'role__in' => wp_parse_list( $atts['userrole'] ), 'fields' => 'ID', // retrieve just the IDs 'count_total' => false, // no need for FOUND_ROWS() 'meta_query' => array( 'relation' => 'AND', array( 'meta_key' => $atts['metakey'], 'meta_value' => $atts['metavalue'], 'meta_compare' => '=', ), array( 'meta_key' … [Read more...] about Get user count based on multiple meta key values?
21 Best Coffee Shop Themes for WordPress (2019)
We hope this article helped you find the best coffee shop theme for WordPress. You may also want to check out our guide on how to promote your coffee shop with a WordPress giveaway plugin to run viral contests and giveaway marketing campaigns. … [Read more...] about 21 Best Coffee Shop Themes for WordPress (2019)