Questions tagged [endpoints]
Custom additions to permalinks for any kind of type (archives, posts, root).
132 questions
1
vote
1
answer
239
views
Using Nested Blocks With Custom Query Block
I'm experimenting with a custom query block for the fun of it. I would like to leverage the components that come with core query inner blocks (title, excerpt, featured image, etc..). For this test, I'...
0
votes
2
answers
146
views
trying to send request-body to rest_api custom csp-endpoint
Set a target endpoint for the browser to send the report:
function add_csp_header() {
header("Content-Security-Policy-Report-Only:
report-uri ".get_bloginfo('url')."/csp-endpoint;
...
0
votes
1
answer
80
views
What is different about using admin-ajax.php in an endpoint and just submitting a form from the front end?
I have created an endpoint with the following php code. The code is currently allowing me to receive the correct pdf but none of the information from the $page is populated in the pdf.
The $page is a ...
0
votes
0
answers
159
views
REST API Plugin Update call back not updating the plugin
I am working on a custom CRM which includes keeping an eye on my clients WordPress sites so I have created some custom REST API endpoints to collect different types of data like the installed plugins &...
0
votes
0
answers
299
views
How do i set up ajax nonce
Follow the doc, I tried to set up X-WP-NONCE before ajax sent data to custom route, but it show wpApiSettings.nonce not defined. If don't set beforeSend, on the back end still can pass the nonce ...
0
votes
1
answer
78
views
How do I add multiple custom menu Woo-commerce my account page?
How do I add multiple custom menu Woo-commerce my account page?
this code works but how do i show content for each my custom menus?
function pa_custom_endpoint() {
foreach(pa_custom_endpoint_keys()...
0
votes
1
answer
118
views
Custom EndPoint not working when strip child category in URL
I have created a custom endpoint for Download page with Permalink setting:
/%category%/%postname%/
The URL as below:
domain.com/top-category/child-category/post-slug/download
function themes_download(...
0
votes
1
answer
685
views
Delete row from table using custom endpoint via API
I would like to delete a row from a table in the database using a custom endpoint via the API. Using an example in the WordPress REST API Handbook, I put together the following code and placed it in ...
1
vote
1
answer
775
views
Filter out posts based on a certain post_meta on the WordPress REST API
So I'm going to explain this the best way possible, and see if someone might be able to help me out.
Website 1 (Posts located here):
Let's say that our WordPress REST API endpoint is: https://example-...
0
votes
1
answer
1k
views
Can't retrieve body params from PUT endpoint using formdata
I have one endpoint to create players, which is a PUT request to a certain route. While I was sending parameters via JSON, it was working fine, but now I need to upload a picture with data, so I ...
1
vote
1
answer
268
views
Exclude posts w/ specific post_meta on Rest API endpoint
So WordPress offers the default Rest API endpoint, which is: https://example.com/wp-json/wp/v2/posts which pulls in all the posts.
Is there a way to configure and modify the existing /wp/v2/posts ...
1
vote
0
answers
274
views
WP Remote Request not returning all of content via request
EDIT: I think I discovered the issue, the endpoint is truncating the content response, does anyone know how to send over all of the data without it being truncated?
So I stumbled across some ...
1
vote
0
answers
426
views
Custom WP rest api endpoint only working on non https?
I'm googling like an hour for a possible solution while im trying to create my first custom wordpress rest api endpoint.
If i call the endpoint by postman it just works, but if i try with jquery, it ...
0
votes
0
answers
847
views
Rest API Paginate until all posts are imported
So I wanted to see if someone might be able to help me with this, so below I will explain what I've done:
I am using wp_remote_get to grab the posts from another website with the arguments page and ...
0
votes
1
answer
440
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 ...