We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [filters]

A type of hook that provides a way for content to be overridden programatically

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

how can I edit the HTML of yith ajax product filter

this question is basically the same as How to edit plugin's html? but they also did not get an answer to their question. I am using Yith AJAX Product Filter Premium Plugin and I am in contact with ...
0
votes
0answers
9 views

Woocommerce: How to exclude some products with specific tag ID from Woocommerce REST API

I'm Working on a mobile app using the WooCommerce API and I need to exclude some products with a specific tag id from the /products endpoint. There no options on the docs on how to do this! just ...
0
votes
1answer
20 views

How to Unhook actions/filters in within Class in plugin

I have a business website for vacation home rentals in which the WordPress theme has its own booking system for house bookings only and it has been great! I also, have Tour/Services (not Houses) also ...
0
votes
0answers
11 views

Database & Post Search

Such as my site will include 10.000 posts with wp-category and 10 different taxonomies (age, country etc) and i can filter all posts by taxonomies and category. Which is better for database health? 1 ...
0
votes
0answers
12 views

How to get Wordpress post filter (misha_filter_function) to filter CPT categories associated with a tag

I'm using the misha_filter_function from: https://rudrastyh.com/wordpress/ajax-post-filters.html to filter posts. The initial array is displaying the correct posts by the location_and_season (made ...
3
votes
0answers
88 views
+50

How would one modify the filtering Gutenberg applies to pasted content?

Note: I'm adding information I discover that seems to be leading to a resolution in the note. The Problem: When pasting content from outside of Gutenberg (e.g., Google Docs) into Gutenberg, some ...
0
votes
0answers
16 views

Filter search results to the archive page it is being used on

I am trying to create a shortcode with a search form that will allow the user to get filtered search results based on what page the search is being used on. ie: If it is used in the blog archive, and ...
2
votes
0answers
23 views

Rewriting Woocommerce Product Filters To URL Segments

I'm working with a site where product category pages are filtered using query parameters: ?color=red&brand=nike&size=10 I'd like to use URL segments instead and rewrite the request to the ...
1
vote
1answer
23 views

Add 'data-text' attribute to TagCloud HTML

I am trying to add a data-text attribute to the selected tag in the TagCloud widget. I want to do this to highlight the selected tag. I have so far managed to add a class to it, but the reason I need ...
0
votes
1answer
23 views

Add Search and Filter functionality to custom loop

I have a custom post type and a page where I loop through them. I'm trying to implement the plugin Search and Filter to the page, so people can filter the custom posts. However, it does not work at ...
0
votes
0answers
45 views

login_url filter creates permanent wp-admin -> wp-login redirection loop

I have created a custom login page on my site and used the login_url filter to redirect to that page each time there's a request. The filter looks like: // Login page function my_login_page($...
0
votes
2answers
25 views

Unable to filter on field on edit.php page

I'm borrowing from the code at Add filter menu to admin list of posts (of custom type) to filter posts by custom field values to add a filter to my custom post type with the parse_query filter: ...
0
votes
1answer
16 views

WordPress add_filter to post_date

I using a plugin that it makes posts and etc date to Persian Date but the problem is I just want to convert date in front not admin panel or etc. I found that part make this action: add_filter('...
-1
votes
0answers
21 views

Inserting Page Inside of Tabs Problems [closed]

I am trying to insert a page inside of tabs, using this plugin, here; to be more specific, in the Browse by Specs tab. First Option : Mainly the problem is that this plugin can't insert a Product ...
0
votes
0answers
23 views

Plugin function in child theme

I need to customize a message returned from a plugin function using my child theme. In the plugin: if ( ! class_exists( 'my_class' ) ) { class my_class { if ( ! is_admin() || ( defined( '...
0
votes
0answers
39 views

login_headertitle is deprecated since version 5.2.0

I have an issue my friends. when I got to default logn page in wordpress, I see this error: Notice: login_headertitle is deprecated since version 5.2.0! Use login_headertext instead. Usage of the ...
0
votes
0answers
26 views

how to filter posts by category without page load (ajax) in wordpress?

I Tried this code, here: http://rankonone.com/dev/profdharm/monthly-rashifal/ August, October, September are categories, I want to show post below without page load where currently title and date. ...
0
votes
1answer
10 views

Strange behaviour of REGEX in a Wordpress filter (trying to suppress emtpy paragraphs)

I've been trying to add a filter in Wordpress to suppress empty paragraphs. I found a number of alternatives online (here is one of them https://gomakethings.com/remove-empty-paragraphs-added-by-...
1
vote
2answers
27 views

How to hide category name

I have a category about the catalog, news1 Which I use to get a post on the main page. The problem is that I don't want the news1 category name to appear in these posts, but I want other categories to ...
0
votes
1answer
17 views

Filter get_page_by_path()

Is there a way to filter get_page_by_path()? I am trying to allow duplicate slugs for pages, so that two pages can have the same slug if they have different meta value for a specific meta key. Thanks ...
1
vote
1answer
31 views

Using a filter with multiple parameters and $this

I have seen various questions about this but I am unsure how to apply those methods in this particular case. I am trying to add a filter to a plugin which returns output with the apply_filters hook: ...
0
votes
1answer
26 views

Distinguish between page and post in function

I'm trying to apply some text to the "Featured Image" box. It works fine for a custom post type, but I can't get a specific piece of text appearing on pages rather than posts. add_filter( '...
0
votes
1answer
36 views

How to remove X-Frame-Options: SAMEORIGIN" from WordPress?

I want to temporarily remove X-Frame-Options: SAMEORIGIN and need to allow all domains. I have already tried the following ways. Removing send_frame_options_header from ./wp-includes/default-filters....
0
votes
0answers
38 views

Update / refresh mini cart, after custom AJAX add_to_cart event

I need help In my custom single-product.php template, I added the button public function AddToCartButton() { global $product; if($product->is_type('variable') || $product->...
-1
votes
0answers
19 views

Why does my sidebar module (with widget for product filtering) in wordpress divi builder not filtering my shop module

I am using Product Filter by Nexter in my Wordpress (Divi Builder) website. It works perfectly with the default shop page of my website, but I encountered a problem when I make another page and add a ...
0
votes
2answers
39 views

Change text string in a plugin

I'm using the WooCommerce Waitlist plugin, but I'd like to change it to be for products that haven't been released yet, ie for "expressions of interest". To do this I need to change a lot of strings, ...
0
votes
0answers
19 views

How can I change WPML settings programmatically?

I'm trying to change WPML settings programmatically, as suggested in these posts: Disable auto sign-in programmatically Overriding the WPML settings My goal is to disable a WPML's feature that ...
0
votes
0answers
15 views

Changing the “Post Published. View Post” admin notice message after running `wp_insert_post_data` filter

I am running a validation logic for when a user is attempting to publish a post, the validation is made possible using wp_insert_post_data filter. If a user wish to publish a post, the filter will ...
0
votes
1answer
17 views

WP meta_query args not working in function

I have three query args for filtering posts in grid. By Author and Status works fine, but ACF meta_query not work. I setup field as select: http://prntscr.com/pi6m66 I need when is selected "Ne" ...
0
votes
3answers
38 views

Add filter for specific post type only

My filter works good, but for all pages and I need add filter only for specific post type. I try it via is_singular, but not work. My code: function my_super_filer_function6($query_args){ if (...
0
votes
1answer
23 views

How to add custom checkout field in user details mail template

I need to add custom field from my checkout page to email templates. I already added custom input at checkout page and it shows up in mails but it shows up after products table and I would like it to ...
1
vote
1answer
16 views

Using Ajax to load more posts | Help me change the wording on my button to notify the user

I am having bit of a brain melt situation trying to carry across a style of code I used on a previous website where I would change the wording on the button the user clicks to load more. I have ...
0
votes
0answers
10 views

Filtering custom taxonomy category on admin side

Is there any hook, or maybe there is already a plugin for that. The problem: There are lots of categories and it is difficult to find through so many pages. I need: A dropdown selection filter which ...
0
votes
1answer
27 views

Modify Contextual Help

Currently I have searched a lot of pages and information covering the contextual help tab (much like here:: 50787, 51861, 77308. Search term:: centextual help), and while there are many useful bits ...
1
vote
1answer
14 views

Filter users by custom colum not meta key

I want to add custom filter with a custom column from users table not a metaKey. I find this function to filter by a metaKey: add_filter('pre_get_users', 'filter_users_by_job_role_section'); ...
0
votes
1answer
28 views

Conflict calling an add_filter() twice

'Yoast SEO' plugin has a filter to exclude posts from the sitemap: wpseo_exclude_from_sitemap_by_post_ids This is the adviced usage (from the 'Yoast SEO' official documentation): add_filter( '...
0
votes
0answers
11 views

Show all best selling products using FacetWP

I am using FacetWP plugin in my Woo Commerce shop page. In WooCommerce we can show the best selling products by using the shortcode [best_selling_products]. Using the FacetWP, how can we show the same ...
0
votes
1answer
19 views

How to bind each “the_content” elements to a custom variables

I'm implementing bootstrap theme into wordpress and i need you'r help. In Wordpress i created a simple page with paragraph and a list of 3 item's. Product list one Product one - Link Product two - ...
0
votes
1answer
39 views

How to strip out javascript in wp_posts `post_content`

My website is undergoing an SQL injection attack redirecting to ad site dolohen[dot]com. I need to strip out the javascript before it is served up. Is there a filter I can add or update to remove ...
0
votes
0answers
14 views

Display posts from today and future in Elementor 'posts widget'

According to Elementor documentation https://developers.elementor.com/custom-query-filter/#Multiple_Post_Types_in_Posts_Widget I need to display future posts including the post from today. We want to ...
0
votes
0answers
14 views

Right filter for rewriting page statuscode

I am new to developing wordpress plugins. But I am looking to write a fairly simple plugin. I want to write a plugin that rewrites the returned status code based on some logic that consults a ...
0
votes
1answer
20 views

Unable to defer loading of jquery

I have two render blocking JS from wordpress core. jquery.js and jquery-migrate.min.js. Following this answer on WPSE I was able to add `defer="defer"' to the script tag that calls for jquery-migrate ...
0
votes
1answer
20 views

How to use do_shortcode_tag to modify the output of a shortcode?

I would like to add shortcodes whose content gets processed by plugins before it gets displayed in the page. In particular, I have a plugin which processes content between two $ signs to produce math ...
0
votes
1answer
16 views

Wordpress - Form does not filter the results of taxonomies

I created a plugin that uses an array, specific to which posts I want to give my taxonomy so that I can create custom categories, the name of this taxonomy is: categoria We are talking about an event ...
0
votes
0answers
34 views

Set “woocommerce_is_purchasable” to false for specific “$product->is_stock_status”

I created a plugin to add a new stock status to my woocommerce products. I used this as my reference (copy and pasted into my plugins php file): Create WooCommerce custom stock option that is non-...
0
votes
0answers
24 views

How can I filter same content in page

I have website in wordpress have 2 pages Catalogues and Projects. The problem as the content is the same in both pages, so I would like the administrator can select what content goes in each page, ...
0
votes
1answer
14 views

Changing title using filter not working with argument

I'm trying to change my custom page's title and I'm able to do this with this function: add_filter('the_title','change_title'); function change_title($data){ global $post; return 'Page ID ' . ...
1
vote
1answer
17 views

Passing an array from shortcode-function to filter-function

This might be a php question more than it is a wordpress question. I am not sure though, but please guide me if so. I am working on a trial plugin that I use for my training in the first stages of ...
0
votes
0answers
12 views

How change post_from with query filter?

Hi i m tring to ovveride a plugin query to database. I m succeded to change post_where in this way. remove_filter( 'posts_where', 'gmw_ps_pt_query_keywords', 20 ); add_filter( 'posts_where', '...
0
votes
0answers
10 views

Post title only for front/blog page, category, archive, search etc

On any standard blog page dedicated to listing posts (i.e front, blog, category, archive, search etc.), I want to show just the post title rather than the post content. Example of desired output: &...