Admin Search
Admin Search makes searching your WordPress website easy by bringing results from all your post types, media, taxonomies, comments, users and admin pages together in a single, simple-to-use interface, seamlessly integrated into the WordPress admin interface. Choose which post types and taxonomies are searched and the number of results displayed for each. Admin Search also supports custom post types and taxonomies. Admin Search is a lightweight plugin with filter hooks for deep customization. Features Search everything on your WordPress site, anywhere Simple and easy to use Sources of search results are customizable Extend the search query with filter hooks Configure & Extend Admin Search can be extended by using filter hooks. The following filters are available: admin_search_query to modify the search query string. The filter argument supplied is a string containing the search query admin_search_sources to modify the search sources. The filter argument supplied is an array of sources, add, remove or modify sources admin_search_posts_query to modify the WP_Query arguments array for all searched post types. The filter argument supplied is an array of WP_Query arguments, add, remove or modify supported arguments admin_search_{Post Type}_query to modify the WP_Query arguments array for a specific post type. The filter argument supplied is an array of WP_Query arguments, add, remove or modify supported arguments. Replace {Post Type} with the name of the post type to modify admin_search_terms_query to modify the get_terms arguments array for all searched terms (taxonomies). The filter argument supplied is an array of get_terms arguments, add, remove or modify supported arguments admin_search_{Term}_query to modify the get_terms arguments array for a specific term (taxonomy). The filter argument supplied is an array of get_terms arguments, add, remove or modify supported arguments. Replace {Term} with the name of the term to modify admin_search_comments_query to modify the WP_Comment_Query arguments array for all searched comments. The filter argument supplied is an array of WP_Comment_Query arguments, add, remove or modify supported arguments admin_search_users_query to modify the WP_User_Query arguments array for all searched users. The filter argument supplied is an array of admin_search_users_query arguments, add, remove or modify supported arguments admin_search_website_titles to modify the labels array for external websites. The filter argument supplied is an array of predefined domains and titles, add, remove or modify domains and titles admin_search_pre_results and admin_search_post_results to modify the results array before or after results are appended to the array. The filter argument supplied is an empty array for admin_search_pre_results or search results for a given query for admin_search_post_results, add, remove or modify result items admin_search_fields to modify the searchable fields array. The filter argument supplied is an array of searchable fields (post_title, post_name, post_excerpt and post_content) admin_search_meta_queries to add custom fields to the searchable fields array. The filter argument supplied is an empty array. Use this filter instead of admin_search_fields when adding custom fields Examples: Modify the query string before a search is initiated // Correct the spelling of dog when searching add_filter( 'admin_search_query', function( $query ) { if ( 'dog' === $query ) { $query = 'doggo'; } return $query; } ); Modify the WP_Query parameters before a search is initiated // Exclude post with the ID 96 add_filter( 'admin_search_posts_query', function( $query ) { $query['post__not_in'] = array( 96 ); return $query; } ); Add a custom field to the searchable fields // Add the price custom field to the searchable fields add_filter( 'admin_search_meta_queries', function( $fields, $post_type ) { if ( 'post' === $post_type ) { $fields[] = 'price'; } return $fields; }, 10, 2 ); Modify the search results after a search has initiated // Add custom results from external API add_filter( 'admin_search_post_results', function( $results, $q ) { $results[ 'custom' ][ 'post_type' ] => array( 'name' => 'custom', 'label' => 'Custom' ); $json = file_get_contents( 'https://example.com?search=' . $q ); $obj = json_decode( $json ); foreach ( $obj as $item ) { $results[ 'custom' ][ 'posts' ][] = array( … ); } return $results; }, 10, 2 );
Top keywords
- search37×5.39%
- query28×4.08%
- array25×3.64%
- modify25×3.64%
- admin23×3.35%
- admin search21×3.06%
- filter20×2.92%
- arguments18×2.62%
- post18×2.62%
- add17×2.48%
- results16×2.33%
- argument12×1.75%
oik
Now with 9 blocks: Address – Displays your address from oik-options Contact form – Displays a contact form Contact field – Part of the Contact form Countdown – Countdown / count since timer Dynamic content – Dynamic content block Follow me – Displays your social media links Google Maps – Displays a Google Maps map using oik options PayPal button – PayPal button for: Pay Now, Buy Now, Donate, Add to Cart, and View Cart / Checkout Shortcode block for oik shortcodes – Expands oik shortcodes The oik base plugin provides a series of advanced WordPress shortcodes that help you display dynamic content from your website’s pages, posts, attachments, links and custom post types. The OIK Information Kit uses lazy smart shortcode technology to display your WordPress website’s content including your often included key-information. The functionality in the oik base plugin is used by over 40 other WordPress plugins, providing powerful facilities for an efficient, performant website. oik now provides over 80 shortcodes including: [bw_pages], [bw_posts], [bw_thumbs], [bw_attachments], [bw_images], [bw_pdf] shortcodes to list subpages, posts, attachments or custom post types [bw_cycle] to display content using jQuery cycle. [bw_list], [bw_tree] to display lists of links to pages, posts, attachments or custom post types [bw_table] to tabulate pages, posts or custom post types [bw_bookmarks] to list links [paypal] shortcodes for PayPal buttons: Pay Now, Buy Now, Donate, Add to Cart, View Cart/Checkout [bw_block] & [bw_eblock], [div] & [ediv], [clear] – to create block structures within your pages, posts and even widgets [bw_button], [bw_contact_button] – to provide call-to-action button style links for Artisteer themes helper shortcodes for web designers and developers: [bw_editcss], [bwtrace], [bw_wpadmin], [bw_wtf], [stag] & [etag] oik helps you to display information about you, your company, your social networking ids and your website using standard formats that search engines such as Google recognise. You enter your information once, then use oik shortcodes to display it wherever you want; in titles, post and page content, header, sidebar and footer widgets. Whenever you need to change a value you only need to update it in one place; and your website is updated instantly. Shortcodes to display often included key information include: [bw_contact], [bw_telephone], [bw_mobile], [bw_mailto], [bw_company], [bw_address], [bw_show_googlemap], [bw_directions], [bw_logo], [bw_qrcode], [bw_copyright] For your social networking use the [bw_follow_me] shortcode to display your links to Twitter, Facebook, LinkedIn, etcetera Features: oik provides buttons to help you write the shortcodes, showing you the parameters you can choose and default values oik provides a shortcode discovery page where you can find out about every shortcode which is active in your site lazy programming means that code is only loaded when it’s actually needed smart means that the shortcodes can recognise the content in which they’re used and adjust their behaviour accordingly oik is extendable – plugin developers can build on the oik base functionality using the oik API: help, syntax information, examples AND HTML snippets can be produced for any plugin or theme that provides shortcodes oik is theme independent; meaning that you can change your theme without having to worry about whether or not the shortcodes will still work. oik uses microformats so that Google and other search engines can understand your content. Further reading If you want to read more about the oik plugins then please visit the oik plugin “the oik plugin – for often included key-information” Other plugins Other plugins which depend upon the oik API are available on WordPress.org: bbboing – obfuscate text but leave it readable cookie-cat – [cookies] shortcode to list the cookies your website may use oik-batchmove – batch change post categories or published date oik-nivo-slider – [nivo] shortcode for the jQuery “Nivo slider” for posts, pages, attachments and custom post types oik-privacy-policy – generate a privacy policy page, compliant with UK cookie law (EU cookie directive) oik-read-more – progressively reveal content by clicking on “read more” buttons Plugins which participate with oik shared libraries are: oik-bwtrace – Debug trace for WordPress, including action and filter tracing oik-css – [bw_css] for CSS styling per page uk-tides – [bw_tides] shortcode for tide times and heights in the UK (replaces oik-tides) These plugins are not dependent upon oik: allow-reinstalls – Allow re-installation of plugins and themes by upload oik-weight-zone-shipping – Weight Zone Shipping for WooCommerce oik-weightcountry-shipping – Weight/Country Shipping for WooCommerce More FREE and Premium plugins are available from oik-plugins.com including: diy-oik – Do-It-Yourself shortcodes oik-blocks – WordPress blocks for oik shortcodes oik-External link warning jQuery – Warns visitor about leaving your site oik-fields – custom post type field APIs oik-ms – oik MultiSite shortcodes oik-mshot – Shortcode to display the “mshot” of an URL; oik-fields extension oik-rating – 5 star rating custom field; oik-fields extension oik-testimonials – Manage and display testimonials. oik-todo – TO DO list oik-types – custom content type, field and taxonomy manager oik-user – display oik information for each site user oik plugins are suitable for: WordPress site owners WordPress site administrators WordPress designers WordPress web site developers WordPress plugin developers oik plugins are tested with: WordPress WordPress Multisite PHP 8.1, PHP 8.2, PHP 8.3 & PHP 8.4 PHPUnit 9.6, 10.5 & 11.4 All of the plugins are developed using a set of functions that can make PHP and HTML coding a bit easier. These are known as the OIK Application Programming Interface (OIK API)