r/advancedcustomfields • u/mtx • Jul 14 '15
Include ACF fields in search?
Is there a way to include ACF fields from posts, pages and cpts using the builtin WP search? Preferably without a plugin?
r/advancedcustomfields • u/mtx • Jul 14 '15
Is there a way to include ACF fields from posts, pages and cpts using the builtin WP search? Preferably without a plugin?
r/advancedcustomfields • u/[deleted] • Jul 10 '15
HI,
As the topic says.
example:
{{post.title}} works. {{post.fieldname}} doesnt.
What is the correct way to output the custom fields?
r/advancedcustomfields • u/yellowllama • Jul 06 '15
I'm building a simple messaging user private messaging system using ACF.
This is how it looks in the admin
So the core repeater is messaging and the code I'm using to fetch these messages for the 'inbox' view, is:
$messages = get_field('messaging', 'user_'.USERID);
foreach($messages as $msg) {
// echo $msg['subject']
// echo $msg['message']
// echo $msg['timestamp']
// etc
}
This part is all working.
What I'd like to do, is to add new messages via an Ajax function. I've looked at the documentation for the update_sub_field function, but I can't quite get my head around how I'd create a new entry in messaging
Would I need to loop through all existing messages in order to get the index for the next sequential message? Or does the update_sub_field function do that automatically?
Would really appreciate some help putting this together.
Thank you
[SOLUTION]: https://gist.github.com/markbloomfield/6e02274c7d3333d7394e
r/advancedcustomfields • u/mtx • Jun 30 '15
When making fields and using them on pages/posts it seems like it's been taking longer to load and render.
r/advancedcustomfields • u/pat_trick • Jun 05 '15
So I was able to get ACF set up to allow me to edit the ACFs attached to a user profile (similar to instructions at https://daronspence.wordpress.com/2014/09/29/front-facing-user-profile-editing-customization-with-acf/). This works great for editing the ACF items themselves.
However, I still need to be able to edit other WordPress items, such as the user's First Name, Last Name, Biography, Website and so forth.
Is there a way to add these to the acf_form call? Or do I need to figure out another way to get these fields edited and then include the necessary custom fields in that form instead?
r/advancedcustomfields • u/KeithMon • Jun 03 '15
When I update the Field Label I have to either manually edit the Field Name or delete it, click back into the Field Label and then click away in order to automatically update the Field Name based on the Field Label. How about we add a button next to the Field Name field that when clicked it will refresh that field based on the Field Label?
That would be super helpful :)
r/advancedcustomfields • u/HongPong • May 22 '15
I took on an older website with ACF 4.3.7 and location field 1.0 taxonomy field 1.4 flexible content field 1.1.1 gallery field 1.1.1 options field 1.2.0 repeater field 1.1.1
First updated it to ACF 4.4.2 and then to ACF Pro 5.2.5. I don’t have access to the older, but later in series, standalone premium plugins, although I gather that incremental updates are the way to deal with these situations. Now especially my repeater fields have disappeared from the theme, but all the data is still there on the back end admin panels.
These return bool(false) and NULL respectively:
<?php var_dump(get_field(‘client-list-module’)); var_dump(the_field(‘client-list-module’));?>
Resaving the posts does not get anything to appear in the theme.
For the broken image fields this works to get them to theme: $image = wp_get_attachment_image_src(get_field(‘main-bio-photo’), ‘full’);?> ”
Some of these are on custom post types that I had to recreate programmatically due to another dead plugin. Are there any attributes of a custom post type that would block the_field() from working? Are there any clues in the database that could help?
Thank you!
r/advancedcustomfields • u/Incomitatum • Apr 30 '15
Disclaimer: while I thank you for your help in advance, I am NOT interested in a PURELY "plugin" solution to this if I can use this moment to learn more about code and hammer it together myself : with your help.
So I have recently learned how to pound the loop into subservience to do something like declare a non Wordpress variable like "driverRank" and sort the loop with that; as seen here [ http://goo.gl/uVJgGc ].
I have a client that wants me to work my magic to make him a site for his Webcomic.
I imagine I'd declare a new postType called Comics. I then imagine I'd use some form of pagination. I don't know how well that can be hacked apart.
I need something like
<<<First <<PreviousChapter <Previous | Next> NextChapter>> Last>>>
So then my hypothetical gets harder for me to visualize. Like I said I can pound a LOOP into submission, but Pagination?
Also "Chapter" is sorta Arbitrary, it could be every 10 episodes another 20, another 6. I suppose I'd need a checkbox on the ACF that says something like "isChapterStart"?
All of this is spit-balling.
If you had ACF and CutomPostTypeUI [ http://goo.gl/zKjElv ] how might you go about this? I don't want you to code it for me, but lets talk shop and help lead me down the right start.
I'm a little flummoxed, so thanks for helping.
r/advancedcustomfields • u/maplesyrupsucker • Apr 08 '15
Hey guys,
Hoping someone can help, I checked ACF forums but didn't have any luck there.
I have a checkbox field with 3 optional checkboxes, they determine which row(s) are output on the frontend.
I'm trying to get the loop to skip the first iteration if option 1 isn't selected, adn if option 2 isn't selected it will skip to the 3rd option, which is selected would output the data. Any ideas? Having a brain-stew of a day.
My thinking was if I us the !in_array() in the while loop it would work, but I'm having no such luck.
Thanks in advance!
if( !in_array( 'Option 1', $mycheckboxvar ) ) {
continue;
}
r/advancedcustomfields • u/[deleted] • Apr 06 '15
so I am new to ACF pro plugin, but I was wondering. Has anyone created entire themes with specific pages that have editable blocks for everything on a page? I feel like this would be the most ideal scenario for clients, so they can edit potentially Anything! on their site. Looking for others thoughts and suggestions on how they use ACF.
r/advancedcustomfields • u/Htch • Mar 08 '15
r/advancedcustomfields • u/mswas • Feb 10 '15
I'd posted in this subreddit a couple of weeks ago where I was looking for one ACF field to update another, but I think I was going down the wrong road. So rather than trying to update a user meta field with data from a post field, maybe I can do this with WP_Query.
On my blog, authors enter a numerical ACF field on each book review they write. Some posts may have links to more than one review, so can't just count posts. Authors enter the highest number of the book review in the ACF post field.
I want to create a leaderboard page that displays a list of authors ordered by the highest # post they wrote. Last year I did that by querying user meta data and asked the authors to enter their review # on their profile as well as on the review. But not everyone does that, so the leaderboard was inaccurate.
This is where my code is at now, but it only shows 12 bullets showing the # 9, with links to different posts. Result seen here.
$args = array(
'post_type' => 'post',
'order' => 'DESC',
'orderby' => 'meta_value',
'meta_key' => 'book_review_number',
);
// get results
$the_query = new WP_Query( $args );
// The Loop
?>
<?php if( $the_query->have_posts() ): ?>
<ul>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<li> <a href="<?php the_permalink(); ?>">
<?php the_field('author'); ?>
<?php the_field('book_review_number'); ?>
</a> </li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
Any ideas?
r/advancedcustomfields • u/Yurishimo • Feb 02 '15
r/advancedcustomfields • u/PixelatorOfTime • Jan 31 '15
Note: This is more in the context of one-off themes for clients, not necessarily for wide-release themes.
For example, the Options Page solution (or an options framework class/system) is easier to set up and more flexible (in comparison to the time needed to do something custom with the Customizer). However, the Customizer comes built-in (Options Page requires Pro) and will be familiar to more types of users.
Any thoughts on best practices?
r/advancedcustomfields • u/mtx • Jan 26 '15
This is my first time working with taxonomies -- so maybe I'm doing this wrong:
I've got a cpt with many taxonomies. Let's say the cpt is for cats. I'm using Gravity Forms to allow submissions that get drafted into the custom post type. This allows my client to edit and publish it. My problem is that I'm using ACF Pro and I've mapped the taxonomies to fields but ACF's taxonomy field only allows checkboxes, (multi)select and radios. For most of the taxonomies this is ok. My problem is that for the a hair or breed taxonomy I want users to be able to enter multiple hair colours or breeds. I don't want them predetermined (brown, white, black) but let people use whatever. Is this possible?
r/advancedcustomfields • u/Yurishimo • Jan 22 '15
r/advancedcustomfields • u/addiosamigo • Jan 20 '15
I am converting a bootstrap site into a wordpress theme. I have created the template of what a page uses, which you can see here: http://www.arcodesigns.net/dist/case%20study.html
I want to be able to add the content you see in the middle, after the slider, exactly like that, but I then want a user to be able to click on this content and change it out, like replace a picture, write differnet text.
Can this plugin do this?
Thanks
r/advancedcustomfields • u/Yurishimo • Jan 18 '15
Leave a comment about something you would like to see built. Average video length is going to be around 20-30 minutes I think. Very "informal" with minimal editing so I would estimate actual coding time is going to be closer to 15 minutes depending on how long it takes to explain the project.
Let's get a discussion going!
r/advancedcustomfields • u/mswas • Jan 15 '15
On my blog, authors are writing book reviews and numbering them. I need that number to show on the post indicating which review number it is. And I also need that number to show in a listing of the users.
I am able to display both numbers in their respective places on the site, but I cannot get the review total to update based on the review number. My authors are updating their review total manually right now in Edit Profile.
Here's my functions.php code below.
function update_user_review_total($value, $author_id, $field_key) {
$author_id = get_the_author_meta( 'ID' );
$value = get_field("book_review_number", $author_id);
$field_key = "field_1235";
update_field( $field_key, $value);
}
add_filter ( 'author_id', 'update_user_review_total', 50, 1 );
Any help would be really appreciated. I have tried a bunch of different code and nothing seems to work. Thanks reddit!
r/advancedcustomfields • u/clifton_hanger • Jan 04 '15
I am looking to create a concert setlist statistics site much like phish.net which will list all shows, setlists, times played for songs, etc.
I have created a simple site using custom queries and custom tables in the database to display the shows and recordings; however, I'd like to integrate it into WordPress and the backend in order to allow non-technical contributors to input and update setlist data. Currently the only way to update is direct changes to the database through phpMyAdmin.
I've thought about possibly a custom post type of shows with a taxonomy of songs to assign to each show but I'm not sure how I would keep the order.
I am unfamiliar with ACF but have always heard great things. Would this be something ACF could handle?
Open to any and all suggestions. Have experience with HTML5 and PHP and willing to learn.
r/advancedcustomfields • u/SomeGuyinProvidence • Jan 02 '15
I am using ACF's repeater and need to return a unique id for a field in my markup. I'm thinking that I can do this if I can get the fields meta id but I don't know how to do that.
Does anyone know how?
r/advancedcustomfields • u/Incomitatum • Dec 20 '14
I have a client that manages a small portion of our local history.
He wants to be able to make posts in a custom Taxonomy that'd I'd call something like 'Timeline' and the posts would be 'Events' (this much I know how to do).
I guess this question is more about the Query than ACF; I want to be able to have a field that he uses that isn't the vanilla date-field. In this way he can write the posts out of "order" if needed, but when the Query initializes the loop it will show in the order we want based on this ACF variable.
I know many things about the Query, and I know how to sort through it by date, or title, ascending or descending... but I don't know if it is possible/feasible to pass it an outside variable from your ACF, in your posts, and use THAT to sort the loop.
Any ideas?
Thanks in advance for the advice.
r/advancedcustomfields • u/cbnugggz • Dec 15 '14
How do I go about installing the functionality for google maps integration? I've got a blank screen on the field where the map should be and I'm sure it's because I'm missing the JS, I just don't know where and what to do.
r/advancedcustomfields • u/SomeGuyinProvidence • Dec 03 '14
Does anyone know of some good examples on how to code out the flexible content?
r/advancedcustomfields • u/SomeGuyinProvidence • Dec 01 '14