Support

Account

Home Forums General Issues What am I doing wrong?

Solved

What am I doing wrong?

  • Can’t get my custom fields to render on my pages. I have done the following:

    – Properly created custom fields
    – Created the .xml file then imported it to WP
    – Used the suggested shortcode: [acf field="{$field_name}"] (using my own field name, of course)

    Nothing is showing.

    I should point out that I’ve only been using WP for about a week so I don’t know much about custom fields. Any advice is much appreciated.

  • You may have some things mixed up but I can’t tell from your description. It’s easy to get confused about WP when you first start out.

    Just want to clarify some things.

    Why are you using an XML file to import custom fields, is this part of some site requirement? Is there a reason you’re not adding them directly to the post that the field group is attached to?

    Where are you using the shortcode?

  • The xml thing was just a shot in the dark – I was just throwing everything at the wall to see what stuck. I realised later that I didn’t have to use it.

    I’m using the shortcode on 100+ pages, not posts. I just entered it using WP’s built-in editor. This is sort of what I want the pages to do:

    ———
    We sell apples. Order your apples to (custom field: city).

    Because you live in (custom field: country), you will incur an import tax of (custom field: tax).

    There are some things you should know about regarding applies in your country… (custom field: paragraph on country-specific apple information)

    (custom field: image of an apple)
    ———

    Further research yesterday indicated that I might have to build an entire template just to render custom fields. If that’s what it takes it’s fine – I’ll go ahead and learn it. But I would imagine that by now someone would have built a widget or something that renders custom fields?

  • Actually, no there isn’t anything really that will do the work automatically. There are plugins out there that let you create the field and the templates in the back end for displaying them but ACF is not one of them. ACF is for those of us that are crazy enough to enjoy building custom themes and templates for WP.

    I’ve seen a few people that are attempting to build page builder like plugins using ACF, but I haven’t seen anything complete listed anywhere.

    ACF will actually let you use simple custom fields in the content editor, which is why I asked were you were trying to use them. You may have already seen this http://www.advancedcustomfields.com/resources/shortcode/

    The reason that the xml import probably did not work is that there are two database entries for each custom field and they both need to be there for ACF to work properly. The best explanation of these fields can be found in the documentation here http://www.advancedcustomfields.com/resources/shortcode/

  • Many thanks for the clarification. I’m learning how to make templates now but will probably have to go with Pods for this website due to deadlines.

    Thanks again!

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

The topic ‘What am I doing wrong?’ is closed to new replies.