Comments (14)
Hi @airesvsg .
Version 5.3.8.1 Pro Version
Thanks
from acf-to-rest-api-example.
Thank you , Is all right now . Thanks for your work
Best regards
from acf-to-rest-api-example.
Hi @roladn,
please, read the documentation about authentication
http://v2.wp-api.org/guide/authentication/
Thanks
from acf-to-rest-api-example.
Thanks For Reply , The authentication is all right ,I'm authenticated but the only one problem i have is to update the ACF options field.
Thanks
from acf-to-rest-api-example.
I'm testing this using postman and nothing is happening.
Something is not correct , or I'm not sending the correct parameter to the PUT request .
Please check this
from acf-to-rest-api-example.
Hi @roladn,
what's the version of your ACF?
Thanks
from acf-to-rest-api-example.
Hi @roladn,
please put this snippet in your functions.php
add_filter( 'acf/location/rule_match/options_page', function(){
return true;
} );
add_filter( 'acf/rest_api/option/prepare_item', function( $item ){
if ( isset( $item['id'] ) ) {
$item['id'] = 'options';
}
return $item;
});
Thanks
from acf-to-rest-api-example.
Hello , everything is ok with this solution , but there is another bug coming by this functions .
The acf field for options now are showed in every post type .
This must be only at theme options
Thank you
from acf-to-rest-api-example.
As i checked this function :
add_filter( 'acf/location/rule_match/options_page', function(){
return true;
} );
is returning true in every post type
from acf-to-rest-api-example.
Hi, Could you help me in editing a notes field of acf. Here is the response which I have when called this http://test.localhost/wp-json/acf/v2/user/279 using the method GET
{
"acf": {
"notes": [
{
"note": "test test",
"user_id": "3",
"col1": null,
"user_name": "siteadmin",
"col2": null,
"created_at": "08/05/2016 09:08:55 am",
"col3": null,
"modified": "08/05/2016 09:09:39 am"
},
{
"note": "test2 test2",
"user_id": "3",
"col1": null,
"user_name": "siteadmin",
"col2": null,
"created_at": "08/05/2016 09:08:55 am",
"col3": null,
"modified": "08/05/2016 09:09:40 am"
}
]
I would like to add another notes. I tried with PUT method and it says
{
"code": "cant_update_item",
"message": "Cannot update item",
"data": {
"status": 500
}
}
I have tried via postman.Its would be great if you could help me on this.
from acf-to-rest-api-example.
from acf-to-rest-api-example.
Yes, I tried with Basic Auth authentication
from acf-to-rest-api-example.
`add_filter( 'acf/location/rule_match/options_page', function(){
return true;
} );
add_filter( 'acf/rest_api/option/prepare_item', function( $item ){
if ( isset( $item['id'] ) ) {
$item['id'] = 'options';
}
return $item;
}); `
Did you ad this snippet at your function.php
from acf-to-rest-api-example.
As I need to edit on my user custom field I provided like this in function.php
add_filter( 'acf/location/rule_match/user', function(){
return true;
} );
But nothing worked out
from acf-to-rest-api-example.
Related Issues (14)
- Can't update user custom field HOT 20
- Add more data without deleting old one HOT 8
- Can't add new repeater field
- Solution: display in RTL
- Missing example with POST/CREATE new cpt
- Help With Post Data HOT 3
- Why not use the acf front end form?
- acf is false when data is imported into wordpress
- Leading underscore at _checked-function? HOT 3
- No issues but this really is an exciting chapter in WP and decoupling.... Such respect for this source and what it enables. Thanks again! HOT 1
- Problem with posting date with jquary date- piker . HOT 5
- Theme options is now in all post types pages.
- Returning "cant_update_item" error when editing Media field HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-to-rest-api-example.