Support

Account

Home Forums ACF PRO Including accordion in the theme

Solved

Including accordion in the theme

  • In https://github.com/bvdr/acf-accordion we have:

    ACF Accordion can be included in the theme by using the acf/accordion/dir filter.

    and in https://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/#including-fields we have:

    Include the main plugin file

    but how you do that exactly?

    I already did:

    1. Copy the acf-accordion folder into your wp-content/plugins folder
    2. Activate the Accordion Tab plugin via the plugins admin page
    3. Create a new field via ACF and select the Accordion Tab type

    Any help? Thanks.

  • Hi @labanino

    I’m sorry I don’t understand the issue. Could you please explain it in more detail to me? If you can share some screenshots of the issue, that would be great!

    Thanks 🙂

  • I have to include this code:

    include_once( 'includes/acf-accordion/acf-accordion.php' );
    
    add_filter( 'acf/accordion/dir', 'acf_accordion_dir' );
    function acf_accordion_dir( $dir ) {
        $dir = get_template_directory_uri() . '/includes/acf-accordion/';
    
        return $dir;
    }

    somewhere to get accordion to work, but I have no idea where. On github I was expecting something like: go to this file and paste this but they are not clear about it. Sorry, I am a bloody designer, can’t figure out this by myself. Thanks.

  • Hi @labanino

    Usually, you need to add it in the functions.php file. But to be sure, could you please contact them instead as that plugin is not officially made by ACF.

    Thanks 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Including accordion in the theme’ is closed to new replies.