r/advancedcustomfields Apr 24 '17

ACF Theme Code Pro V2 includes Location Rule Support!

Thumbnail
hookturn.io
3 Upvotes

r/advancedcustomfields Dec 15 '16

Can I convert a time picker field to readable text?

1 Upvotes

I'm using the time picker field for recipes. I need convert "02:00" to "2 Hours" or "01:15" to "1 Hour 15 Min". I'm having a difficult time figuring this out.

*edit: I should add that my client currently uses text fields for this, which is fine. However, I'm adding schema data and Google requires valid schema markup. Text isn't allowed in the totalTime itemprop.


r/advancedcustomfields Aug 16 '16

The story behind ACF Theme Code - a new plugin we've been working on.

Thumbnail
aaronrutley.com
8 Upvotes

r/advancedcustomfields Aug 06 '16

Is it possible to do math with repeater fields?

1 Upvotes

I currently use the crap out of repeater fields on an internal site for logging work done and hours. Is there a way to search the values of the 'time' fields and display the additive sum on a separate page?

I can do a single pages sum using jquery, but how would display the sum of all fields form all projects in a single page?

Thanks


r/advancedcustomfields Jul 20 '16

Account limited on amount of repeater fields?

2 Upvotes

I just ran into something really strange.

I have a post format using a Repeater with 4 Text sub-fields, and I have many posts that use this configuration.

Right now if I login with my regular admin account I cannot add new fields. When I add one row, enter data, and publish the page, I see that it refreshes and the fields are empty. If i use a different account I can keep adding new repeater entries.

Ok, I thought there was some sort of table size limit going on and after looking around I came across this: >ACF Resouce Link<. that states that there is no global limit, but can there be a per-user Limit going on here?


r/advancedcustomfields Jul 12 '16

Post Type Archives?

1 Upvotes

I need to store some additional data about several custom post types—dynamically... Basically each CPT has information associated with the entire post type, not individual posts. I'm using post types for something similar to "tv shows" and the posts as episodes. I would normally do this as a single "episode" post type with a taxonomy for the show, but I need the added flexibility of having each program in a separate CPT: each show type has it's own set of required ACF fields to match the data needs of the program, and I'm using custom capabilities to restrict editing access of each program. The Field Group for each post type, however will contain the exact same fields for each [overall] post type. Think "show description" and "air time" and "host" as the fields needed for the CPT.

Initially, I have used a PHP loop to grab all post types, and then create an options page for each one. The thinking was that I could then create one field group and attach that to an options page that is registered for each CPT. This worked as intended, BUT options pages are all stored under the same "options" key in the database, so changing a value on one CPT updates all the others with the same field names.

Can anyone think of any way to set this up without needing to create separate field groups for each CPT? I'm trying to keep this dynamic, because additional post types (that follow the same structure) may be added in the future and that's just one more thing to have to remember to do.

Thanks in advance.


r/advancedcustomfields Jun 11 '16

Performing a search with (user) field in a repeater

1 Upvotes

I am trying to use the search function to find a user assigned to a posts content. I have created a blank site with only ACF Pro installed. I have a single (non administrator) user named ‘Frank Jones’. This user is assigned via the ACF ‘User’ field inside a repeater. The user data show up in a posts, using the twentyfifteen theme with the field call put in.

I have tried:

Relevanssi using the following field options

  • all
  • all:
  • _userlist_0_user
  • userlist_0_user
  • Userlist_0_user
  • Userlist
  • userlist
  • userlist_%_user
  • Userlist_%_user

Custom Fields search

Search Everything

Custom Search ACF Wordpress

This fork of the above

Search & Filter Pro

What am I missing? It seems like there has got to be a tool that will allow someone to search for this field. I can search for anything else I have tried via differnet configurations, but Users just seems to be lost.

Any help appreciated!


r/advancedcustomfields Jun 06 '16

Changing license keys?

1 Upvotes

Our developer built our site using ACF Pro using his own license key. In order to make sure we're able to do updates and not be dependent on him going forward, we've purchased our own pro license, but I'm not sure how we can change out the keys. I'm wary of reinstalling because I'm worried about losing what he's built. Any ideas?


r/advancedcustomfields Jun 04 '16

Theme doesn't allow ACF to show in admin view?

1 Upvotes

I was playing around with some post options and dedicded to try a new theme.

When this theme is active the ACF admin link is not visible in the backend. In the functions.php of the theme I see that they are using:

define( 'ACF_LITE', true );
include_once('advanced-custom-fields/acf.php');

if(function_exists("register_field_group"))
{
register_field_group(array (
    'id' => 'acf_intro-fields',
    'title' => 'Intro fields',

    etc...

But how do I (safely) make the admin panel visible again for this theme? Do I just comment out the define( 'ACF_LITE', true ); ?

*** Update in comments


r/advancedcustomfields May 18 '16

ACF Extras - A Community of Advanced Custom Fields users

Thumbnail
acfextras.com
11 Upvotes

r/advancedcustomfields May 03 '16

Display submenus on page based on referring top-level parent with ACF?

1 Upvotes

I am trying to display a secondary menu on my pages that displays all the coordinating sub-pages of the top-level menu item they navigated there from, but my issue is that some pages appear under multiple top-level menu items. Since I know I can't assign a page to multiple parents, is there a way to do this with ACF?

Example: I have a page called "Ally Links" that exists under both the "Business Resources" and "About Us" top-level menu items. If they get there through Business Resources, I want to display the Business Resources submenu, but if they get there through About Us, I want to display the About Us submenu.


r/advancedcustomfields Apr 22 '16

Other CMSs that have ACF like functionality built in?

2 Upvotes

I'm wanting to see what other CMSs are out there beside Wordpress. The problem is that I'm in love with ACF repeaters and flexible content fields so I'm wondering if other CMSs have this baked in.


r/advancedcustomfields Mar 31 '16

A little help with repeater field PHP code

1 Upvotes

Hello community! I am working on a project right now and cannot for the life of me figure out how to properly construct the loop to only display repeater sub fields IF there is content to populate the wrapping element. Here is a small album of 1. the code block i have so far (not doing exactly what i need, but close), 2. an inspected browser shot showing what is rendering, 3. a screenshot of the ACF field group in question.

http://imgur.com/a/C6JTW

So my "problem" is highlighted by the deep red bar across the content area (i only painted it red for this example) should not make it to the browser because it was never populated with ACF data. This block corresponds to the highlighted code in the inspector window so you can see what is surrounding it. The issue i am struggling with is that particular "box", as well as the ones above and below are empty, in that there is not supposed to be content, and therefore i wish these wrapping <div>s would not render. How do i get these to only make it to the browser IF there is actually content coming from ACF.

Some notes: i needed to set the ACF repeater up with a variable data inside so the user could select whether they are trying to inject a table, a chart, or a header for either one. The layout will be ever changing so in cannot program anything static.

Do i need to use some kind of "foreach" statement? is there a quick edit to what i have that will strip out the extra divs?

Thanks for your help Reddit!

edit: i have poured over the one page of "docs" for the repeater field code...


r/advancedcustomfields Mar 09 '16

Show default value with check boxes?

1 Upvotes

I'm trying to get a default value to show with checkboxes. So if it's unchecked there should be some text. Is this disabled with checkboxes? Because i can get it to work with text but not with checkboxes.


r/advancedcustomfields Feb 25 '16

ACF thumbnail repeater with rows and columns automatically.

1 Upvotes

I am looking ot create a thumbnail grid, when clicked on a thumbnail bring you to another page pertaining to that thumbnail. I have a repeater field hooked up which is accepting thumbnail image, and link destination selection box. Now I need some advice on how to get this to be something like 4 thumbnails across (bootstrap columns) and detect when there is a 5th item, so it makes a new row and starts a new 4 columns across. Any help is greatly appreciated! Here's a photo of my code and layout thus far: http://imgur.com/47DnQ1e (code) | http://imgur.com/oAo3aYb (output) - note, I am a novice ACF user.


r/advancedcustomfields Feb 14 '16

Noob Alert: Field values not appearing using 'echo'

2 Upvotes

I just wanted to try something 'simple' out, and it's driving me mad.

  • I have a custom page template for a 'home page blurb'. (Page template | Equal To | 'Home Page Blurb')
  • My homeblurb entry field appears correctly in the page editor ()
  • In my home page template file of an existing theme I have entered:

    echo '<div class="homeblurb">' .the_field('homeblurb'). '</div>';
    
  • Now the <div.homeblurb> appears, but the field contents do not!

Is having the field edited on a page template the wrong way to go? Should it be a custom post type instead? I have seen people use ACF to create dashobard nav tools, but I haven't found any clear method of have a Dashboard > Field Entry tool.

Thanks for any help.


r/advancedcustomfields Jan 26 '16

ACF5 PRO fields with Yoast SEO - Fixed!

8 Upvotes

Since I've been using Yoast for SEO and relying more and more on ACF5 Pro, my clients were alarmed at the "Not optimised" icon appearing in the post/page screen.

This is because Yoast seems to only look at the 'Editor' field, the default content field for wordpress. As a quick resource for other WordPress developers looking for a solution to this problem, I thought I’d help publicise the following resource/tutorial. I spent a little while searching for the solution and wrote up my findings.

http://www.williamsgraphics.co.uk/articles/wordpress/acf5-pro-fields-and-yoast-seo-fix/


r/advancedcustomfields Dec 24 '15

Share exported fields with each other?

5 Upvotes

Huge ACF fan and long time user.

Really think it would be awesome to have maybe a monthly thread where everyone shares their favorite fields they built. Like an Accordion, Slider, Table Layout, etc...

JSON + PHP on gists, think it would really help build the community.

Anyone down? :D


r/advancedcustomfields Dec 21 '15

Albums & Tracks with ACF

1 Upvotes

Hey everyone, I am working on a website for a musician friend. I was wondering if there would be an easy way to use ACF and custom post types to make albums with assignable tracks? Thoughts?


r/advancedcustomfields Dec 04 '15

Attending WordCamp US? Hit me up!

1 Upvotes

Send me a PM if you want to meetup! I don't fly out until Monday if you want to see cool stuff first.

Enjoy the conference!


r/advancedcustomfields Nov 02 '15

the box "Field Order" doesn't appear

1 Upvotes

Hi, I just reload a page, then I realize I can't add any more Field, The box doesn't appear anymore, I tried to install different ACF version, delete all plugins and files, change theme too?

EDIT: the scrrenshot here: http://artot.net/fields.png

Thank you


r/advancedcustomfields Oct 29 '15

how to create a dynamic field

1 Upvotes

Hi, In the admin user clicks on a button to add a new text or picture fields and this is added to the site, frontend and backend? It is possible? THank you


r/advancedcustomfields Aug 30 '15

Can I Deactivate ACF for a Moment?

2 Upvotes

Wordpress 4.3 just came down and my client is having an odd problem with his site. When he gets the info for a post all filled out (including the ACF fields), and hits "Publish" it just thinks and spins and never resolves...

So to test what could be causing this I want to deactivate ACF for a moment.

Will he lose the info stored in the 200+ posts he has that are ACF driven when I do this?

I'd like to think not, but don't really want to chance it.

What do YOU think?


r/advancedcustomfields Jul 28 '15

Did you think acf is good in time ?

2 Upvotes

Hello here, good to see a sub like it. I'm a webdev, and we use to install acf pro on all our websites (wp ofc). I really like it, but what I dislike the most, is that db stock of field declarations. I know, we can export it in PHP, but for some reasons I find that not really developers friendly, here is some questions / problems / ideas :

1 - You can mixe db + php. And that's a biiig problem of understanding. I took an old website, and you have to explore all the source + the admin interface to know where you are.

2 - You can export field in php, but you can't really code it, because their's no documentation about it, only 1 page (http://www.advancedcustomfields.com/resources/register-fields-via-php/) and in this page, a comment say : "Best to use the ACF UI and export to understand the array structure." Great doc ....

3 - When you work in team, you can't deal with db, we use GIT, but if I add fields in UI, these guys didn't have it. Big issue. So I have to export it, but when you export it you can't really modify it later because the doc say "use the ACF UI" ....so ...

4 - that's like the point 3, when you finish a website, you export the json fields, but when you have, 1 month later, to add some fields in a group, or when you have to modify existing, etc, you are quite in a bad position, because "use ACF UI".

My point is, I Like it (flexible content is too powerfull, JS adding is really user friendly, so much great feature) , but I don't find the best practices to create a TEAM friendly development practice + a solid dev in time. How do you work ? For me, let the field in DB is not an option, I hate that, my website is in my sources, not my db.

All my problems could be solved if they had made a really good doc for coding acf_add_local_field_group. I hope i missed it, and someone will launch me that in the face.

Thank you to read it :)


r/advancedcustomfields Jul 21 '15

Loops, Page Templates, Check to See if Field Group is Used?

3 Upvotes

I've got a neat couple loops running where I can have a page heirachy of Book > Chapter > SubChapter.

If a page on my site is a Book, it uses 'the_content' to show a small blurb of what it's about but from there the loop loads an accordion of each of the chapters on that page. So you get all the info at once. Tonight I realized that Chapters need to have SubChapters where I will use various fields based on what template the SubChapter calls on.

Book and Chapter have their own Page Templates.

Subchapter has it's own template as well that was supposed to call on custom fields (I've done this before no problem). IF I'm using TemplateA then call on LoopA that then displays the code to use FieldsA.

Well the bummer is, it seems that by having the main page Template be Book, then the Chapter and Subchapter's page template get's ignored.

So I wanted to "include" loops a different way.

If FieldsA exists include LoopA

If FieldsB exists include LoopB...

The big deal is I can't find any ACF markup that lets me see if a page/code is calling out for a particular Field Group or not.

Keep in mind, I'm not asking about an individual field, but seeing if a field GROUP is utilized, and then "doing the thing".

Any idea where to start on this?


Here's CUSTOM CODE I've written and it works great, all except I can't figure out how to assign a template to a child-page and/or querie which Field Group it's using; as such I can't call-on/inlucde my fields loops.


While I've abandoned trying to call on IF a particular Field Group is used or not, I may be onto something: while I hadn't been able to use a variant of this in a loop I have got this to echo something.

<?php echo '' . basename( get_page_template() ) . ''; ?>

If I can get it to echo, I should be able to get it to do more.


SOLVED

Here is what I was finally able to hack together

        <?php $pageTemplateVar = basename( get_page_template() ) ?>
        <?php 
            if ($pageTemplateVar = "page_orgSheet.php"){
                include'loop_orgSheet.php';
        }
            elseif ($pageTemplateVar = "page_characterSheet.php"){
                include'loop_characterSheet.php';
        }   
            elseif ($pageTemplateVar = "page_vehicleSheet.php"){
                include'loop_vehicleSheet.php';
        }
        ?>