Where to find remaining Boldgrid code in WP database?

In case anyone else comes across this, for Boldgrid or any other WordPress plugin. The table, is WP-options; or–[yourPrefix]-options. Some plugins leave data behind after uninstall. This post has a pretty good tutorial on removing the entries. Some Plugin Settings Are Kept After Removal and Reinstall of the Plugin

wp_dropdown_categories() searching is not working with CPT, please review my code

Working drop down in search for CPT <?php $categories = get_categories(‘taxonomy=custom-tax’); $select = “<select name=”cat” id=’cat’ class=”postform”>n”; $select.= “<option value=”-1″>Select category</option>n”; foreach($categories as $category){ if($category->count > 0){ $select.= “<option value=””.$category->slug.””>”.$category->name.”</option>”; } } $select.= “</select>”; echo $select; ?> <script type=”text/javascript”><!– var dropdown = document.getElementById(“cat”); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value != -1 ) { location.href = … Read more

Even/Odd every two posts

Your code, while looking like it could be every other, is based on math, so it will be even and odds as the query goes by iterations counting up. modulus 2 == 0 means even numbers in this sense (iteration / 2 has no remainder has to be an even number) If you’re looking to … Read more

Restrict the shop_manager role to the WooCommerce Orders Page

I finally found the solution. function checkUserPermissionsInThisScreen(){ if (is_admin()){ $currentUserRoles = wp_get_current_user()->roles; if (in_array(‘shop_manager’, $currentUserRoles)){ $a = get_current_screen(); if ($a->id != ‘edit-shop_order’ && $a->post_type != ‘shop_order’){ wp_die(‘you do not have needed permissions to see this page’); } } } } add_action(‘current_screen’, ‘checkUserPermissionsInThisScreen’);

how to handle multiple forloop?

You can do something like this public function getStuffDone() { $order_ids = array( 358,368 ); $items = array(); // contains the names foreach ( $order_ids as $order_id ) { $order = wc_get_order( $order_id ); foreach ( $order->get_items() as $item_values ) { $items[ $order_id ][] = $item_values->get_name(); // add the name to the array } } … Read more