Support

Account

Home Forums Add-ons Repeater Field How to change the scope of a custom field group?

Solved

How to change the scope of a custom field group?

  • Hello good afternoon.

    Could you please help me to find the best way to solve my problem?

    What I need?
    I need to add a bar with some link images (Spoonsors logos) on my web page, but I want to add this bar on my other web pages, for example if I have added this bar on home.php I need to use this bar in contact.php too.

    How am I adding this?
    I am using a custom file group on my home.php (I am using the “repeater” kind of field) so the final user can add infinite images and links.

    What is the problem?
    The problem is that I don’t know how to change the scope of my vars.
    For example if I take a value in a var like this:

    $image = get_field('home_banner_3_background_image');

    I can use my $image var just in my home.php file, I need to use this var in all my files .php

    How am I doing this?
    I was using $_SESSION vars to move a value to another file, but all is a mess later.

    Please if you know a best practice or a better way to do this please let me know, really this is urgent.

  • Hello again @hube2 thank you very much for the help, your solution was awesome for me; it was the best option to fix my issues.

    I just want to add that we need to be careful using the correct post ID; is different to use the id of your Advanced Custom Field Group and use the id of the web page where you are using the ACFG.

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

The topic ‘How to change the scope of a custom field group?’ is closed to new replies.