Comments (7)
In simple terms WordPlate is basically a different folder structure for WordPress. It should work as any other WordPress installation.
from wordplate.
Well...
It's not really the kind of answer I was expecting.
Normally I should be able to have this code structure :
`
add_action( 'acf/include_fields', function() {
if ( ! function_exists( 'acf_add_local_field_group' ) ) {
return;
}
acf_add_local_field_group( array(
'key' => 'group_65d314a11e8d3',
[... all the field group attributes]
'show_in_rest' => 1,
) );
} );
`
But I can't see anywhere where it's declared like that.
Even functions.php isn't in the available files
from wordplate.
@steve-ref it's kind of hard to understand what your issue is imo. retrieving acf content via rest should be the same whether you're using wordplate or plain wordpress. have you tried the code above in your application? have you tried within a new wordpress installation (without wordplate)?
why are you even expecting the code to be present in your codebase if you're implementing a non-existent feature?
afaik acf/include_fields
is a acf pro feature, and it looks like it should be used from within plugins (the manual doesn't mention it either). do you have acf pro installed? have you tried the code above without the filter?
from wordplate.
@fiskhandlarn
Actually, I don't think I understand how ACF works with Wordplate.
If I understand correctly, to create my blocks, I need to call upon the different PHP files present in the Wordplate folder (for example: WysiwygEditor.php).
This means that in the project I've been assigned, I end up with a line of code like this: WysiwygEditor::make('something', 'something').
My question was whether there is a resource available for enabling the "Show in REST API" option for Wordplate because I don't have access to the user interface to do it in my WordPress admin with Wordplate (it works fine with another installation).
On a fresh WordPress installation with ACF PRO, I can either create my ACF fields and activate "Show In REST API" via the user interface or through functions.php, but I don't have access to either method with Wordplate (I don't have a functions.php, nor a checkbox in the admin).
Sorry for all these questions, I'm just trying to understand how it works.
from wordplate.
@fiskhandlarn Actually, I don't think I understand how ACF works with Wordplate.
i think they work just fine together. :)
My question was whether there is a resource available for enabling the "Show in REST API" option for Wordplate because I don't have access to the user interface to do it in my WordPress admin with Wordplate (it works fine with another installation).
it seems to me that you are confusing this package with vinkla/extended-acf. eitherway, all properties available in the wp-admin gui for acf is available programmatically, so try this:
acf_add_local_field_group([
// ...
'show_in_rest' => true,
]);
from wordplate.
i think they work just fine together. :)
Oh well yeah, It's me who doesn't understand how it works ^^, this is not a package problem, didn't want to offense.
Indeed, you're right, it's an outdated version of ExtendedACF but the imports are from Wordplate so I thought it was related to Wordplate itself.
My other question was:
I usually put functions in functions.php because that's what I've always been told. Where could I put this function without that file and without breaking the current code?
Thanks for your help
from wordplate.
I usually put functions in functions.php because that's what I've always been told. Where could I put this function without that file and without breaking the current code?
anywhere you like, as long as you include/require it from functions.php
. if you don't have a functions.php
file present in your theme i suggest you create it. if you can't create it, i can't think of another way besides creating a plugin.
from wordplate.
Related Issues (20)
- mix.sourceMaps() not working HOT 1
- Sharing database for collaborative development HOT 1
- Configuration on apache
- Wordplate don't use the configured language HOT 4
- wordplate/uuid - not found HOT 4
- Can you integrate a docker integration in the project ? HOT 1
- Can't use background-image css properties with vitejs HOT 1
- Connection not found critical error public\wordpress\wp-includes\wp-db.php on line 1785 HOT 1
- Deprecated code in WordPress 5.9.2 HOT 3
- More information about Vite? HOT 3
- Any guide for moving existing default wordpress to wordplate? HOT 1
- Can not choose language during installation HOT 5
- How do you dockerize a WordPlate setup?
- Bunch of deprecations after fresh installation HOT 1
- Best option to load fonts locally HOT 1
- Deployment to production HOT 2
- Warning: Undefined array key HOT 2
- Public directory HOT 1
- Replace hacky module script with new WordPress 6.5 `wp_register_module` and `wp_enqueue_module` functions 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 wordplate.