Questions tagged [request-filter]
The request-filter tag has no usage guidance.
37
questions
0
votes
1
answer
73
views
Rewrite permalink with PHP processing
I am creating an unusual URL format for permalinks. I don't think the permalinks can be processed thru mod rewrite, so I need PHP to rewrite the URL somehow.
I was able to create a URL like this:
site....
2
votes
1
answer
470
views
How do you disable the verification process of user email changes?
When you change the email of a user they will receive a confirmation email and only once they verify the email adress it will be changed. How do i change this so that the email will instantly change? ...
0
votes
0
answers
29
views
Filter with two id of the same value CPT UI(taxanomies)
I have a special link with a filter, so I filter things with slugs through the link, for example
mydomain.com/filter/?technology=angular&category=software-development
and it shows the chosen jobs
...
0
votes
1
answer
362
views
Custom endpoint filtering post by custom taxonomies
I am trying to create a custom endpoint by custom taxonomies, I have already created another for the categories and it works well, however there is something I cannot solve with this
function ...
0
votes
0
answers
197
views
Can someone explain what's the use of parse request function in WordPress?
What's the meaning of "Parses the request to find the correct WordPress query" in plain Englush?
Reference: https://developer.wordpress.org/reference/classes/wp/parse_request/
I encountered ...
0
votes
1
answer
337
views
How to query 2 custom post types that need to share a slug?
I'm trying to make 2 custom post types (authors and works) share the same slug. The authors CPT uses an archive page which functions properly, but works CPT does not need one.
CPT 1: https://domain....
0
votes
0
answers
28
views
WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
We have a WordPress 5.4 instance that we query through it's API. I am hoping to find a solution for the following problem that works with newer versions as well.
What I need is an intersection when ...
0
votes
0
answers
254
views
Customizing the wp_video_shortcode output with add_filter
I am trying to add onmouseover="this.play()" onmouseout="this.pause()" to the default <video element in Wordpress. I am using Gutenberg block editor.
By default, this is what ...
2
votes
0
answers
58
views
Hook all http requests
How do I hook all http requests in wordpress? More specifically I am interested in examining an http header in the request and then potentially modifying headers in the request so that other plugins ...
0
votes
1
answer
72
views
How to create filter's for custom taxonomy page
what i want to do it's create filters for my custom taxonomy page.
For example.
I allready have a custom taxonomy created with thumbnails and pagination ready, but i want to add filter's for the girls....
-1
votes
1
answer
64
views
What is the first action or filter executed by wordpress?
To mesure performance of a wordpress website i need what is the first filter or action executed by wordpress ?
it seems that index.php is the input file of server, there is a way to add a global time ...
0
votes
0
answers
28
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
1
answer
316
views
Intercept page request and add value to it
I am trying to intercept the GET request of a post and add a value to it.
function foo($request) {
$request['vid'] = wp_generate_uuid4();
return $request;
}
add_filter( 'request', 'foo' );
...
1
vote
1
answer
5k
views
Block a specific url request
I probably have a plugin that makes a request to an URL slowly down my website. At the moment I'm still debugging the issue but, in the meantime, is there a way to prevent Wordpress to request this ...
0
votes
2
answers
911
views
How to trim white space in search terms?
I'm seeing a weird problem where if someone searches "Test Search" it's returning fine, but if someone searches "Test Search " it's returning some weird posts that don't seem relevant.
How do I go ...
2
votes
1
answer
2k
views
Is it possible to filter the wp_footer() scripts, read the content, and insert them inline?
I need to intercept the scripts that are added in the footer and head through the wp_footer() and wp_head() functions, something like add_filter('wp_footer', my_function) and then in my_function, I ...
1
vote
1
answer
211
views
action is not called after a php request
I want to send a download link to user by mailchimp, after they filled out a email form.
The PHP Request listener is calling my_function(), but inside this function the action is not called.
The ...
0
votes
0
answers
659
views
ACF Taxonomy search on backend (Relationship field)
I'm working on a project where I have to filter every Products:product_cat type of taxonomies on ACF. I need those product post type values which contains these taxonomy on the search field. Sadly ACF ...
1
vote
1
answer
76
views
WordPress request fiter order by related post's post_title
I have created two WordPresss custom post types (school, person). Each person is related to a school and the related school's post ID is stored in wp_postmeta under the person's post ID with meta_key =...
1
vote
1
answer
2k
views
Front-end only $_POST and $_POST requests handling in WordPress plugin
I just created a WordPress plugin with a custom template that handles a $_GET request before the HTML code. Wordpress team is asking me to put this code inside a function.
I understand that for admin ...
1
vote
1
answer
1k
views
How get child posts in custom post type by ajax?
I get posts and filter ayahs by tags. I get all the posts. This works well. But when I get to the parent page of the post, I need to get only child posts and filter them. I use 'post_parent' => $ post-...
0
votes
1
answer
2k
views
Custom query filter by ACF date custom field
I'm using a custom query to filter posts by date range, i read the documentation and i searched for many examples, but this code seems right to me and i don't know why it is not working ! please help ...
0
votes
1
answer
2k
views
How to create frontend Post filter using meta query
I have created a post filter like the image below, but I have an issue with selecting multiple values from different fields. All the fields in the filter are custom fields. The thing is, in the admin ...
2
votes
2
answers
4k
views
Handling form request from plugin file
In a plugin I have a payment form that needs to be submitted (via the action= attribute) to a .php file, also located in my plugin directly. After some research, it seems like the "wordpress way" to ...
9
votes
1
answer
11k
views
How to modify posts_where filter only for the search query
I'm using posts_where filter in order to modify the user searches on a web, but i find out that some default widgets like the "more recent posts" uses this filter too and their behaviour are also ...
1
vote
1
answer
338
views
WordPress (admin) posts search GET request filter
I wrote up a plugin that adds a column to the posts, page table (list) in the WordPress Admin panel.
Each row has additional input fields (checkboxes) - allow_comments, allow_pings. These checkboxes ...
4
votes
1
answer
425
views
How can I control the comment counts filtering my CPT replies?
I'm developing a plugin that is using the comments table with custom comment_type for CPT replies. The problem was that, I's getting replies to my CPT in Comments page (/wp-admin/edit-comments.php). ...
0
votes
0
answers
54
views
Search and replace post URL's on page output?
Currently, I'm using pretty permalinks for SEO purposes like this: http://example.com/sample-post. This is great for search engine ranking, but now I am finding this is not so great for mobile app ...
0
votes
2
answers
384
views
Test for post type in request filter?
I'm running into a catch-22 situation running a request filter. I need the request to be correct in order to run the correct filter, but I need the filter to correct the request. GAH!
Here is the ...
-1
votes
1
answer
1k
views
How can i see/log all requests coming from a registration form (not from the UI)?
I am talking about the REGISTER form
PROBLEM: I have some requests that are coming from somewhere else - not from the user interface. I know this, because these requests don't have all the mandatory ...
3
votes
1
answer
827
views
Post Admin - Filter by posts without tags
I am stuck on this one and it's probably a really simple answer but can anyone please shine some light on how to add a filter menu with an option value of 'No Tags' that when clicking the Filter ...
0
votes
2
answers
120
views
Custom search by several options send on form not works
I am using the Advanced Custom Field Plugin to add custom fields for the users profiles and display a list of users in the frontend of site with Simple User Listing Plugin.
I need to filter a list of ...
3
votes
1
answer
2k
views
Modify custom Users Manage page
I'm trying to create a submenu page under 'Users' which is like the 'All Users' page but for listing users of specific roles only. Let's just call this submenu page 'Customer'.
So far I managed to ...
2
votes
1
answer
584
views
Using database meta_values to calculate new post order using pre_get_posts or a 'request' hook
UPDATE: I have worked out my implementation of the selected answer at the bottom of this post.
I'm implementing a sorting algorithm based on Reddit's hotness algorithm, in addition to a time-decay (...
1
vote
1
answer
2k
views
How to query a custom post type with a taxonomy filter but display post type archive page?
I'm filtering the main query of Jigoshop with my own taxonomy with this hook (The file responsible for Jigoshop queries that I'm hooking, Jigoshop hooks onto WP 'request' filter):
add_filter( '...
4
votes
1
answer
1k
views
Enforcing canonical URLs with multiple custom post types
I'm working on a project with several custom post types, where one of the post types is naturally (but not actually in the WordPress sense) the 'parent' of the others. For example, say I have a ...
0
votes
1
answer
857
views
Safe to throw 404 error in request filter?
I am working on a plug-in for my personal site and I would like it have a certain permalink structure (/projects/project-type/sub-type/project). To achieve this, I am using the request filter.
Inside ...