Undefined index: hook_suffix
Undefined index: hook_suffix
Undefined index: hook_suffix
Ok i see my WHERE mistake I made this working solution doesn’t look pretty $i =0; foreach( $searchcol as $col) { if($i==0) { $sqlterm = ‘WHERE’; } else { $sqlterm = ‘OR’; } if(!empty($_REQUEST[“s”])) {$query .= ‘ ‘.$sqlterm.’ ‘.$col.’ LIKE “%’.$search.’%”‘;} $i++; }
Well, the yellow comes from <tr class=”unapproved”> and this is, in crass contrast to what the usual WP_List_Table introduction might suggest, not an automatism, but generated very verbatim: See e.g. single_row() in wp-admin/includes/class-wp-comments-list-table.php: function single_row( $a_comment ) { global $post, $comment; $comment = $a_comment; $the_comment_class = join( ‘ ‘, get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) ); … Read more
First of all note that a post can have more than one category, also posts can have no category, what you’ll do in that cases? And what about post update? That said, if you look at the url when in edit.php and select a category by clicking on its name, you’ll notice that the only … Read more
This is done by wp_admin_canonical_url: It calls wp_removable_query_args to fetch a list of query string parameters to remove, which includes settings-updated. It then writes some script into the page header to use window.history.replaceState to remove the query string from your browser’s URL bar. <link id=”wp-admin-canonical” rel=”canonical” href=”http://example.com/wp-admin/admin.php?page=xyz”> <script> if ( window.history.replaceState ) { window.history.replaceState( null, … Read more
You’re going to have to use the filters for each post type anyway. If you plan to leverage a bunch of dynamic filters that all call for all 7 post type slugs you could stick them in an array and loop through the filters with a foreach. Saves a little bit of code at least. … Read more
I don’t think you can do this. Maybe you could use a whole new database, but it seems unlikely you could add a new table for managing a custom post type. For one thing, a custom post type is stored in the wp_posts table, but some of the data for it gets stored in the … Read more
I think what you need is the set of filters and actions to add custom columns to post edit screens: manage_edit-post_type_columns: used to add columns manage_posts_custom_column: used to print the content of each row of the column manage_edit-post_type_sortable_columns: used to register sortable columns. Undocumented. request: you may need to use this filter in combination with … Read more
You can filter the posts list by appending ?category_name=xx to the admin posts list URL, and you can add a submenu page with that URL as the target via add_submenu_page: add_action( ‘admin_menu’, ‘wpd_admin_menu_item’ ); function wpd_admin_menu_item(){ add_submenu_page( ‘edit.php’, ‘Page title’, ‘Menu item title’, ‘edit_posts’, ‘edit.php?category_name=somecat’ ); }
I solved my issue by passing the page variable as a hidden field: <form method=”get”> <input type=”hidden” name=”page” value=”<?php echo $_REQUEST[‘page’] ?>” /> <?php $this->customers_obj->prepare_items(); $this->customers_obj->search_box(‘Search’, ‘search’); $this->customers_obj->display(); ?> </form>