Coder Social home page Coder Social logo

Comments (5)

MaximeCulea avatar MaximeCulea commented on September 26, 2024

Hi @jonatasu,

The best way to include ACF Fields is through PHP, please find more details in ACF's documentation.
Otherwise, to strictly answer your question, we use to include into a plugin or a theme.

The way to do it is the same, it depends only where you put the ACF PHP export file.
If we got a file call fields.php, the path to the fields could be :

  • plugin => wp-content/plugins/my-plugin/assets/acf/php/fields.php
  • theme => wp-content/themes/my-theme/assets/acf/php/fields.php

And then you include it with the following statement :

add_action( 'init', 'bea_register_fields' );
function bea_register_fields() {
	require_once( PATH_TO_FIELDS );
}

Does it sounds better now for you ?

from acf-php-recovery.

jonatasu avatar jonatasu commented on September 26, 2024

Yeah, thanks @MaximeCulea ! I'll try later.

from acf-php-recovery.

MaximeCulea avatar MaximeCulea commented on September 26, 2024

Hi @jonatasu,
Have you tried ?
Can we close this issue ?
Thx

from acf-php-recovery.

jonatasu avatar jonatasu commented on September 26, 2024

Hello @MaximeCulea,
I'm not working on the project anymore, but I did't resolve this issue through a recent version of ACF.

We can close it, thanks!

from acf-php-recovery.

MaximeCulea avatar MaximeCulea commented on September 26, 2024

πŸ‘Œ thx

from acf-php-recovery.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.