1,580 questions
1
vote
0
answers
75
views
WordPress REST API: Large Image Uploads Not Reaching Backend Despite Proper PHP Settings
Problem Description:
I'm developing a chat application with image upload functionality using WordPress REST API. When users attach multiple large images (3 images), the request doesn't reach the ...
0
votes
1
answer
65
views
WordPress REST API: HTML content loses styling when Elementor is active
Stuck on an automation issue and hoping someone here has dealt with this.
Setup:
n8n automation that generates HTML content (articles in Hebrew)
Sending to WordPress via REST API
WordPress site ...
0
votes
1
answer
58
views
WordPress RestAPI in Javascript. How to get array data out of the response
I am working on a Gutenberg block and am modifying the Edit.js file. I want to fetch the root categories in the database. From the reading I have done, it seems a good way to do this is to use the ...
0
votes
0
answers
14
views
I am looking to create an automated export from our MIS - LabelTraxx
We use an MIS called LabelTraxx. Our company manufacturers labels and has 5 production lines. The operator for each production line will key in the details of their job, as well as their production ...
0
votes
0
answers
61
views
WordPress REST API orderby=rand parameter not working - returns same posts instead of random
I'm trying to fetch random posts using the WordPress REST API, but the orderby=rand parameter is not working as expected. Instead of returning random posts on each request, it
consistently returns the ...
0
votes
0
answers
10
views
Update ACF field via Rest API outside wordpress
Im building an IOS/ANDROID app and i need to update from it, some ACF field via REST API from my wordpress website.
I did some researches but coudnt find any good reference.
Any good tutorial online ...
-1
votes
1
answer
161
views
How to exclude specific REST API endpoints from being cached by WP Rocket?
I'm using WP Rocket along with their helper plugin WP Rocket | Cache WP Rest API which allows caching of WordPress REST API endpoints.
I’ve added the following filter to allow REST API caching:
...
1
vote
1
answer
105
views
How to extend WordPress REST API to include custom meta fields for a custom post type?
I'm working on a custom WordPress project where I’ve registered a custom post type called parcel. It has several custom meta fields like pickup_pincode, drop_pincode, and delivery_type.
I want to ...
1
vote
1
answer
43
views
Python cut text in pieces to upload to Wordpress Blog
I have a piece that already has some formatting. Now I need to convert this to a format so I can use the Wordpress API to send it to wordpress.
This is an example of my text:
'**H1: Some text**\n\...
0
votes
0
answers
58
views
How can I send a basic auth http request to a password protected server?
I'm attempting to connect to my wordpress site via API using basic auth. This would be a fairly straightforward task but the server itself is password protected (alert box asking for server username ...
1
vote
1
answer
209
views
Proper use of permission_callback in register_rest_route with JWT?
I'm developing a WordPress plugin that exposes several REST API endpoints — some are public, and others require authentication using a JWT token.
I understand that when using register_rest_route(), it'...
1
vote
0
answers
78
views
Post Rest API nonce verification faild in Wordpress
I was develop a quick form, before deactivated the wordpress plugin. When the user fills out the form and clicks the "Submit" button, a nonce is generated. However, after the plugin is ...
0
votes
0
answers
32
views
Rest API Wordpress : filter acf fields with arrays and getEntityRecords
i'm trying to filter through acf fields in wordpress Blocks. I have a couple of select components fetching all my posts and filtering them based on their acf fields. It's working pretty well except ...
1
vote
0
answers
77
views
Manual changes via WordPress REST API are not applied
When creating the player, there was a need to collect auditions. I set up the collection and everything works.
You need to manually enter the data that is already available.
I added the following code ...
0
votes
0
answers
42
views
Add-To-Cart REST API integration with woocommerce
this is my code for integrate product throught rest API.
Custom REST API endpoint for adding products to the WooCommerce cart.
Register the REST API route for adding to cart.
add_action('rest_api_init'...
3
votes
1
answer
170
views
how customize usage of jwt authentication for woocommerce and wordpress api?
i want create a nextjs via headless woocommerce
how can i add jwt auth to some methods and endpoints and allow others publicly
for example i want restrict POST,DELETE,PUT methods for product and ...
0
votes
0
answers
24
views
Wordpress + ACF | REST API Query the Results by the Initial Character
I’m developing a custom data directory using WordPress and Custom Form Fields, and I’m fetching the data through the WordPress REST API to display it in a Next.js web application.
I need to filter the ...
0
votes
2
answers
59
views
How can I disable the “Linking and Embedding” feature of Wordpress REST API?
In Notion, when I paste a wordpress page or post link into a note, the “mention” feature appears. When you use this feature, it adds the author username of the page or post into the note. I want to ...
0
votes
0
answers
47
views
How do I connect my python api to enable login to my wordpress website
I am creating an api that would allow users of my wordpress website to also login from a mobile device (I am making use of fast-api). but I cannot figure out how to hash the password from python so ...
1
vote
0
answers
87
views
WordPress as headless CMS
I’m consuming WordPress API using it as a headless CMS in a Nextjs blog part of a project. I'm able to fetch blog post and render a list of blogs on a page. However, when I land on a single blog post ...
1
vote
1
answer
76
views
PHP Assign Return Object Value to Local Variable
I am currently working on a WordPress/Woocomerce project I am trying to write a plugin which calls the stripe API using the following method
$stripe = new \Stripe\StripeClient('apikey');
$stripe-&...
1
vote
1
answer
201
views
How to fetch Options in Gutenberg Editor Edit.js file. There seems no easy way to do this
Fetching Options in a php file in WordPress theme or plugin is as easy as typing:
get_option('option_name');
How do we fetch Options in a Gutenberg block, inside the Edit.js file?
Fetching meta value ...
1
vote
1
answer
234
views
elementor pro and Advanced ajax product filters conflict
my wordpress website was working just fine and I could use elementor pro untill I installed "Advanced AJAX Product Filters". upon installing this I couldnt edit pages with elementor anymore ...
0
votes
0
answers
32
views
How to add Multiple field data with WordPress Rest API and Python
I want to add a featured image, and since I am using Yoast SEO, I also want to add a focus keyphrase, SEO title, and meta description using the Python REST API, but I don't know how to proceed further....
0
votes
1
answer
88
views
WordPress REST API to create a post strips some of the content
I am using https://developer.wordpress.org/rest-api/reference/posts/#create-a-post:
$my_post =
"<!-- wp:kadence/rowlayout {'uniqueID':'5331_605d8b-3f','columns':1,'colLayout':'equal','...
0
votes
0
answers
68
views
Nginx location block allow/deny
I've tried to find the answer in this forum, reading Nginx location priority and others, but can't get this to work. It is regarding location blocks in Nginx.
I want to generally deny access to 'data' ...
1
vote
0
answers
291
views
How can i make POST request using JetEngine REST API in Wordpress
I've GET & POST API which i need to implement in wp website.
My goal is, using jetEngine Plugin, i wanna send POST request & make returned response visible in my page using jetEngine Lising ...
-2
votes
1
answer
51
views
Problem with retrieving the checkbox value in WPGetAPI - WordPress
Thank you for your help in advance,
To put it briefly, I have installed the WPGetAPI plugin on WordPress to obtain data from a basic contact form and then transmit it using a post API.
Everything is ...
0
votes
0
answers
50
views
Add new suscriber with Mailster but no is added into data base
I've created a custom WordPress theme and I'm working with Mailster plugin.
According to the documentation if you want to add a new subscriber then you can add to the Mailter list which you've created ...
0
votes
1
answer
121
views
Upload webp images from wordpress api - Wordpress
Using node.
I want to upload some images to wordpress using the wordpress api.
I tested and it works with png.
Is this not possible with webp or maybe my code is wrong?
I tried before with the UI and ...
0
votes
2
answers
290
views
How to redirect using a custom wordpress api endpoint after form submission?
I'm using a custom wordpress endpoint that I have defined in functions.php:
add_action('rest_api_init', function () {
register_rest_route('custom_endpoint', 'submit-application', [
'...
-1
votes
1
answer
104
views
How can i retrieve a list of posts from my wordpress-rest api, with the sticke posts on top?
When I want to get the posts from my Wordpress Rest API, the sticky posts are not at the top, but are sorted by date like the others.
When I try to sort by sticky
wp-json/wp/v2/posts?orderby=sticky
I ...
1
vote
0
answers
112
views
Wordpress REST API The POST Method doesn't work
I used following script for REST API for POST Method in my existing method. this message is showing ""No route was found matching the URL and request method."," where is the error. ...
-1
votes
1
answer
55
views
Unable to Fetch Language Packs for Multiple Themes in Bulk via WordPress API
I'm trying to fetch language packs for multiple themes in bulk using the following WordPress Themes API endpoint:
https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[fields][...
0
votes
1
answer
32
views
PHP function not consuming JSON output body variable when using WordPress REST API POST
I’m attempting to call a PHP function via the WordPress RestAPI and for the life of me cannot figure out how to pass a JSON variable to the following function:
function ...
0
votes
2
answers
806
views
How to Add Meta Description and Focus Keyword to Post via WordPress REST API (wp-json/wp/v2/posts)?
I am using the WordPress REST API (wp-json/wp/v2/posts) to publish posts. The request works, but when I analyze the post in Yoast SEO, it says I need to add a meta description and a focus keyword (...
1
vote
2
answers
179
views
cannot retrieve csp-report request body from report-uri
I’ve tried to follow mozilla guide lines for setting up report-uri in CSP-Report-Only mode. My CSP:
function add_csp_header() {
header("Content-Security-Policy-Report-Only:
report-uri &...
0
votes
1
answer
81
views
Get query using Url Wordpress ? wp rest api
I have a post type Properties. Property have their name(Title) image(Featured Image) and Locations(Acf Field). so i want to extract the exact property. from frontend i have a search form in which i am ...
0
votes
1
answer
85
views
Remove slug before REST API endpoint
I'm using a translation plugin in WordPress which adds the language code as a slug for all internal links like this: domainname.com/en
This also results in some of my plugins endpoints being ...
1
vote
1
answer
100
views
Custom endpoint in REST API - Wordpress
I have a WordPress website and I want to add a custom endpoint that sends the metadata of the users.
Important:
The already API works only by calling it like this "domain-name.com/?rest_route=/wp/...
0
votes
0
answers
62
views
get url of request sender to an endpoint in wp
Is there a PHP/WordPress equivalent to req.hostname from Node.js/Express to get the hostname of the sender of a request?
I'm working on a WordPress REST API endpoint with the following their setup
I ...
1
vote
0
answers
47
views
Test wp.data with Jest in Block Plugin
I am trying to get my head around testing my Wordpress Block Plugin with Jest. I am specifically struggling how to mock calls to wp.data.
See the following function:
import apiFetch from '@wordpress/...
0
votes
0
answers
26
views
How to allow some customers to bypass the website .htaccess
My website www.attractionsofchina.com a strict .htaccess file, that blocks countries like Russia or vietnam. Some of my clients, may - on occasion - travel to such countries.
What is the easiest/...
0
votes
0
answers
21
views
can't get image from wordpress rest api in flutter
i want to fetch the image of my products in my flutter app ...
but i cant it show me this weird error and i don't know what is it for?
and this is my code ( exactly based on a tutorial that worked ...
0
votes
1
answer
195
views
Get rendered HTML block template from Post
I'm not new to WordPress but I have a question for the gutenberg api.
I want to get a single post by id with the rendered post template for this ID. But I don't know how to archieve this problem ...
0
votes
1
answer
228
views
how to show api data in wordpress?
I want a plugin to receive a nested json file from a url and display its information in the form of paged cards with ajax search capability.
Is there such a plugin?
I tested the wpDataTable plugin, ...
0
votes
1
answer
221
views
Why do I get a 403 error when requesting the WordPress API from a Laravel application hosted on Azure App Service?
I have a Laravel application hosted on Azure App Service. When my Laravel app tries to fetch data from the WordPress API, it receives a 403 Forbidden error. Here are some key details:
WordPress API ...
1
vote
1
answer
381
views
401 Error when trying to delete image via REST API Woocommerce
So I am trying to delete the product along with the images via REST API but it deletes everything EXCEPT the images. I've tested it separately to delete an image but it give me this error:
{"...
0
votes
1
answer
97
views
How to update a wordpress page from .NET Core
I have downloaded the WordPressPCL example project in https://github.com/wp-net/WordPressPCL.
What I need is to update a page or post of Wordpress but I don't find any example.
All I find are examples ...
0
votes
1
answer
348
views
401 on wordpress webpage and showing all white
I have a wordpress website that was working fine until this morning. Now, all pages show white.
the funny thing is that if I hover my mouse over the white pages, I can see the links on the back.
When ...