{"id":98741,"date":"2020-01-20T09:22:38","date_gmt":"2020-01-20T15:22:38","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=98741"},"modified":"2023-10-24T12:42:56","modified_gmt":"2023-10-24T17:42:56","slug":"wordpress-content-filtering-guide","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/","title":{"rendered":"WordPress Content Filtering Guide"},"content":{"rendered":"\n<p>Often the rules for <a href=\"https:\/\/wpengine.com\/resources\/the-ultimate-checklist-for-wordpress-on-page-seo\/\" target=\"_blank\" rel=\"noreferrer noopener\">effective Search Engine Optimization (SEO)<\/a> can come into conflict with what you know your readers want. Resolving and balancing out these differences can be a challenge, especially when it comes to ensuring that your website\u2019s content is easy to sort through.<\/p>\n\n\n\n<p>Fortunately, WordPress enables you to filter content before it\u2019s delivered in a user\u2019s browser. This can provide a much better User Experience (UX) for longer articles. What\u2019s more, it can help you effectively use pieces of content that <a href=\"https:\/\/www.sweor.com\/seocontentlength\">search engines tend to like<\/a>, but some readers might abandon due to length.&nbsp;<\/p>\n\n\n\n<p>In this article, we\u2019ll explore WordPress\u2019 built-in content filtering options. We\u2019ll also take a look at some plugins that can help you use content filtering on your website. There\u2019s a lot to sort through, so let\u2019s get started!<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Built-In Content Filtering<\/h2>\n\n\n\n<p>WordPress does offer some built-in content filtering features. However, in order to really make use of them, you\u2019ll need to understand the <a href=\"https:\/\/torquemag.io\/2015\/09\/complete-newbie-guide-wordpress-hooks\/\">relationship between hooks, filters, parameters, and functions<\/a> in the WordPress codebase. Once you have those concepts down, you\u2019ll be able to investigate some of the more hands-on options for employing content filtering.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Post and Page Filtering<\/h3>\n\n\n\n<p>There is a <a href=\"https:\/\/premium.wpmudev.org\/blog\/add-post-filters\/\">somewhat older way<\/a> to create a front-end filtering feature on your website for users. This provides a drop-down sorting feature for post content, which you can customize. To get started, you\u2019ll need to add a <a href=\"https:\/\/gist.github.com\/danielpataki\/e12c354bc6c9c95c497d#file-filters-html\">snippet of code<\/a> to your theme\u2019s <em>index.php<\/em> file.&nbsp;<\/p>\n\n\n\n<p>Keep in mind that it\u2019s best to <a href=\"https:\/\/wpengine.com\/resources\/create-child-theme-wordpress\/\">create a child<\/a> for the theme you plan to use. Since this method requires adding custom code, you\u2019ll want to protect your parent theme files in case anything breaks.&nbsp;<\/p>\n\n\n\n<p>We tested this approach with WordPress\u2019 <a href=\"https:\/\/wordpress.org\/themes\/twentytwenty\/\">default Twenty Twenty theme<\/a>.<\/p>\n\n\n\n<p>As you can see, you would need to tweak the styling in your Cascading Style Sheet (CSS) file if you want something more aesthetic, but the functionality of this approach works. You can use just about any database information, such as \u2018<em>post_date<\/em>\u2019 or \u2018<em>only_thumbnailed<\/em>\u2019, to create filters for your readers to use.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Functions<\/h3>\n\n\n\n<p>There is another filtering function built into the WordPress codebase. It enables you to create filters for information read from the database, before it\u2019s displayed on a web page or an editing screen.<\/p>\n\n\n\n<p>This feature enables developers to incorporate content filtering functionality into their plugins. There is an expansive <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Filter_Reference#Database_Reads\">list of filter hooks<\/a> available through the WordPress API. These hooks can be used with both the \u2018<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_filter\/\"><em>add_filter<\/em>()<\/a>\u2019 and \u2018<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/the_content\/\"><em>the_content()<\/em><\/a>\u2019 functions. This is where understanding the relationships between hooks, filters, and parameters can come in handy.&nbsp;<\/p>\n\n\n\n<p>When you choose one of these functions, you\u2019ll use hooks and parameters to establish what kind of action you want the call to execute. By using these elements together, you can <a href=\"https:\/\/wpengine.com\/resources\/best-tools-wordpress-plugin-development\/\">create a WordPress plugin<\/a> that will execute the filtering functionality you\u2019re looking for. For example, the \u2018<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/the_content\/\"><em>the_content()<\/em>\u2019 function<\/a> can be combined with \u2018<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/apply_filters\/\"><em>apply_filters()<\/em><\/a>\u2019 to call the callback function of any <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Filter_Reference\">filter hook<\/a>.&nbsp;<\/p>\n\n\n\n<p>In addition, \u2018<a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/the_content\/#parameters\"><em>the_content<\/em><\/a>\u2019 filter hook is often used to establish the content parameters for these functions. To avoid confusion, just remember that functions enclose hooks and parameters inside the parentheses.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Content Filtering Plugins<\/h2>\n\n\n\n<p>If you\u2019re not ready to dive into developing your own plugin just yet, don\u2019t worry. We\u2019re going to share some useful plugins that already exist, which can help you try out content filtering on your website.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <a href=\"https:\/\/wordpress.org\/plugins\/search-filter\/\">Search &amp; Filter<\/a><\/h3>\n\n\n\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/search-filter\/\">Search &amp; Filter<\/a> plugin is a way to enhance the native, simple search bar functionality WordPress offers. You can add results filtering via radio buttons, checkboxes, drop-down menus, and more. Plus, this plugin is designed with a drag-and-drop editor for easy configuration.&nbsp;<\/p>\n\n\n\n<p>Additionally, you can organize the search results by just about any parameter available. This includes meta value, post-ID, author, title, date, and so on. You can access most of the features through the free version of the plugin, and full access for one website is only <a href=\"https:\/\/searchandfilter.com\/#sf-add-to-cart\">$20 per year<\/a>.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <a href=\"https:\/\/pixify.net\/products\/smart-content-filter\/\">Smart Content Filter<\/a><\/h3>\n\n\n\n<p><a href=\"https:\/\/pixify.net\/products\/smart-content-filter\/\">Smart Content Filter<\/a> is a premium content filtering plugin for WordPress. It will work with any theme and custom post type. Rather than creating a database-style search and filter experience, Smart Content Filter helps you build an interactive filter that lives on your blog posts.<\/p>\n\n\n\n<p>These come in the form of clickable buttons, which represent the different content filters available for that page or post. For example, if you have a long blog post that lists the best eCommerce themes for WordPress, your readers might get bored halfway through and jump ship before finishing the article or viewing your Call To Action (CTA).<\/p>\n\n\n\n<p>This plugin can help you create custom, interactive filters that can easily move your readers to the content they\u2019re most interested in. A <a href=\"https:\/\/pixify.net\/products\/smart-content-filter\/#pricing\">starter license is only $19<\/a> for a year of access and support.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <a href=\"https:\/\/facetwp.com\/\">FacetWP<\/a><\/h3>\n\n\n\n<p>If you\u2019re looking for a content filtering solution that\u2019s well-suited for eCommerce, <a href=\"https:\/\/facetwp.com\/\">FacetWP<\/a> might be your answer. This is an AJAX-based plugin that loads selections and filter changes quickly, without reloading the whole page. Your customers can find what they\u2019re looking for much faster with these features.&nbsp;<\/p>\n\n\n\n<p>Additionally, this plugin is ready for integration with <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\">WooCommerce<\/a>, so you can make improvements to your online store\u2019s content filtering capabilities in a snap. One of the only downsides to this plugin is the price tag. It\u2019s a bit more of an investment than some of the other options we\u2019ve looked at.<\/p>\n\n\n\n<p>However, on the Basic plan, you\u2019ll get a <a href=\"https:\/\/facetwp.com\/buy\/\">$99 license<\/a> for one to three websites for one year. That includes support and all of <a href=\"https:\/\/facetwp.com\/add-ons\/\">FacetWP\u2019s professional add-ons<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get the Results You Want With WP Engine<\/h2>\n\n\n\n<p>It\u2019s safe to say that few web users enjoy the \u2018hunt and peck\u2019 method of finding what they\u2019re looking for online. Whether it\u2019s a product they want to purchase, entertainment content, or a key piece of information, providing easy search and filter functionality for your content is one way to improve your website\u2019s UX.&nbsp;<\/p>\n\n\n\n<p>Here at WP Engine, we strive to bring you the best <a href=\"https:\/\/developer.wordpress.org\/\">developer resources<\/a>, so you can build innovative digital experiences for your customers. Check out our <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\">WordPress hosting<\/a> and our <a href=\"https:\/\/wpengine.com\/plans\/\">flexible plans<\/a>, and start improving your website today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often the rules for effective Search Engine Optimization (SEO) can come into conflict with what you know your readers want. Resolving and balancing out these differences can be a challenge, especially when it comes to ensuring that your website\u2019s content is easy to sort through. Fortunately, WordPress enables you to filter content before it\u2019s delivered<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":177,"featured_media":0,"template":"","resource-topic":[904,910,901],"resource-role":[896,897,903,1296],"resource-type":[916],"class_list":["post-98741","resource","type-resource","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress Content Filtering Guide | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Content Filtering Guide | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-24T17:42:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2024\/05\/WPE-IMG-Thumbnail-1200x630-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/\",\"name\":\"WordPress Content Filtering Guide | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2020-01-20T15:22:38+00:00\",\"dateModified\":\"2023-10-24T17:42:56+00:00\",\"description\":\"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WordPress Content Filtering Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad\",\"name\":\"Samantha Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"caption\":\"Samantha Rodriguez\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Content Filtering Guide | WP Engine\u00ae","description":"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"WordPress Content Filtering Guide | WP Engine\u00ae","og_description":"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2023-10-24T17:42:56+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2024\/05\/WPE-IMG-Thumbnail-1200x630-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/","name":"WordPress Content Filtering Guide | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2020-01-20T15:22:38+00:00","dateModified":"2023-10-24T17:42:56+00:00","description":"Content filtering is simple on WordPress if you\u2019ve got the know-how. Learn all about content filtering software and plugins for your WordPress site with WP Engine.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-content-filtering-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"WordPress Content Filtering Guide"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad","name":"Samantha Rodriguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","caption":"Samantha Rodriguez"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/01\/shutterstock_1368350717.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Developer, Freelancer, Marketer, Publisher","topic":"<strong>Topics:<\/strong> Marketing, SEO, WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/98741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/177"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=98741"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=98741"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=98741"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=98741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}