Closed onepoint0 closed 6 years ago
@onepoint0
why not use the dynamic tags for ACF?
HI @bainternet, thanks for the response. Do you mean just getting the value out of the settings with something like this:
echo $this->get_settings_for_display( 'text_1' ); echo $this->get_settings_for_display( 'text_2' ); echo $this->get_settings_for_display( 'text_3' );
I've tried that and it's getting the value of the correct ACF fields, but the value for the first post is being repeated on all of the posts, ie
| POST_1 | POST_2 | POST_2 | | ACF_P1_V1 | ACF_P1_V1 | ACF_P1_V1 | | ACF_P1_V2 | ACF_P1_V2 | ACF_P1_V2 | | ACF_P1_V3 | ACF_P1_V3 | ACF_P1_V3 |
As opposed to:
| ACF_P1_V1 | ACF_P2_V1 | ACF_P3_V1 |
I thought because of that the array is not designed to be used in this way.
Or do you mean something else altogether?
something else altogether, https://youtu.be/DC7wlmHO8Lo?t=8m32s
Yeh, that's exactly what I'm doing and it's not working for the post type widget.
Hi @bainternet - could you help me with getting the values for each post? The values for the first post are printing on all posts on the page.
Is this a request to have ACF repeatable fields available within Elementor? If so, add my vote! :) I see there are a number of fields available, but apparently the repeater is not. In my use case, I would like to create a repeatable set of dates/times for classes. I can add a single date but not a repeater that has multiple dates.
Below is a link to the fields that are supported by Elementor: https://docs.elementor.com/article/381-elementor-integration-with-acf
+1
+1 it is very powerful if this feature will be added
We can build much reacher and better lists from food menus, immobile, services, offers, etc. anything that can be put in a list and has additional features that should be displayed as well
+1 I really need this. Has anyone found an alternative solution?
+1 This would be a great feature - in the meantime I found that dynamic.ooo post widget supports ACF (albeit has some quirks).
Plugin (addon) AnyWhere Elementor Pro is also a good option until Elementor Pro enables editing the block layout in archive templates.
Yes, maybe we can get a "dynamic" option in the "Meta Data" field. For example, I'm currently doing a real estate website with custom fields for "price", "sqft" "bedrooms", etc. I'd really like to add those fields to the posts widget.
Here's an image to help illustrate the idea...
+1 Meanwhile, this free plugin is the answer: Elementor custom skin. It's perfect! https://wordpress.org/plugins/ele-custom-skin/
+1 @margotmate you are a Lifesaver today. I would like to write beautiful words for you but I am out of time ;)
@margotmate you are a rockstar
Is there a way to apply the free version to custom post types?
+1 That's strange it's still not possible
I think this ticket was closed in error. The original request by @onepoint0 was to have the Posts WIDGET show custom fields. The video tutorial example given by @bainternet shows how to use ACF on a Post TEMPLATE. (Which is very nice and clear and beyond beta, at this point.)
The difference is that a Posts WIDGET would be an element on the page, that would loop through all Posts of a certain query, and within that loop print out the custom fields for each Post.
Unless there is some way to make a Post Template be a "style" output for the Posts Widget. That would be a really cool way to do it, things could be very modular that way. (That is, suppose the Posts Widget were extended so that instead of the pre-determined fields such as Post Author, Date, Title, Excerpt, you could indicate a Post Template for the styling and content of the data.)
Elementor Developers: Could you contact the creator of the Elementor Custom Skin plugin and purchase/licence/otherwise add it to the Pro version of Elementor?
This ticket was definitely closed for no reason. The feature is still needed and should be accessible out of the box, not requiring 3rd-party solutions. +1
+1
@onepoint0
why not use the dynamic tags for ACF?
Because there are no dynamic Tags in the "Meta Data" - Field of the "Posts Widget"
I also have contacted Elementor support for the same issue this week. They sent me the details about the post template, which I've already read, and isn't relevant.
+1 to this thread!
Prerequisites
What problem is your feature request going to solve? Please describe. I would like to display Advanced Custom Fields in the Post Type widget ie,
Describe the solution you'd like In the post type widget have a section with a series of repeatable dynamic selects which allow you to select the ACF fields that you want to show on the posts that are output. EG a list of dropdowns like you have in the price list widget, but dynamic so that an ACF field can be selected from it. These fields are then displayed in posts that are output on the page.
Either this or store the ACF field name in its own element in the settings array so that it can be passed into the ACF's get_field function and the field can be displayed on the output.
Describe alternatives you've considered I can't find a way to do this without coding it. I've tried to code it by using the existing post type query code from the post widget and then adding some dynamic selects to get the ACF fields:
Then in the render function, use the ACF get_field function to get the value of the field (this is pseudocode, as it doesn't work this way):
The problem is I need to pass the field name into the first get_fields parameter but I can't easily get the field_name from the settings function without doing string manipulation on the embedded settings string:
I think string splitting the field name out of the settings might not always work or the array could change in later versions of Elementor. I can't find another place where the field name is stored. If the field name could be stored as its own array element it could easily be passed to the ACF function.
If this is the wrong angle or there is another way to do this, I would be happy to try that!
Additional context Add any other context or screenshots about the feature request here.