I don’t understand where you are getting the image from, is this entered into the link text? If it is something is transforming the html. I don’t know what that is.
try dumping the value and see if the HTML is altered before you add the link.
echo '<pre>'; var_dump($button_buy); echo '</pre>';
The issue issue is that that when editing there are no controls on a flex field other than “add new”. Adding an input here would be like adding an input to a text field or a radio field for the user to enter data into. This is not really possible for any type of field.
But if you want to make a request you can contact the devs here https://www.advancedcustomfields.com/contact/.
No, there isn’t any way to add setting to flex fields and adding a field to every layout is the only way to do what you want. I generally do this by creating a “layout settings” group that I clone into all flex layouts.
https://www.advancedcustomfields.com/resources/javascript-api/#acf.field
try this, but I don’t know if it will work. I have not tried it when setting a checkbox field.
var field = acf.getField('field_62d4abc0fbfd4');
field.val([1,3]);
acf_form() has an argument that automatically add a standard WP post title field 'post_title' => true
.
If this will not work for you then you must create an acf/save_post action, as in this example.
It appears that some of your code was removed. Please you code tags from the editor menu when posting code.
You need to give us more information. What is it that you are trying to “Sync”? Where are you trying to do it?
How is $id being set
if( have_rows('page_content', $id )):
I’m not sure, but I think this will work.
$post_id = intval(get_option('your-option-name'));
if (!empty($post_id) {
// set global $post to this page
$post = get_post($post_id);
setup_postdata($post);
get_template_part('page'); // get the page teamplate instead of using this one
exit; // important
}
// if the post id is empty all of the standard/default 404 page below
That would be a simple way to do it yes but you may have issues if someone modifies the post title.
A safer way to do this would be to create an option page or if you have a theme options page to add a field there that allows the user to select a page to use as the 404 page. Then check this value in the 404 template and use that page if set.
If you really want to get fancy, check this out.
You would still need to use acf_form() to do this with 'form; => false
so that ACF does not add the form tags and uses the form tags supplied by WC.
Do the media IDs get saved to the database?
Search wp_postmeta for the post ID and meta key. It should have a serialized value containing the post IDs of the images.
My guess here is that the values are saved but then not rendered properly when the post reloads. This is likely do to functions called when rendering the fields and selected images that may not be captured/filtered/altered by the other plugin that you are using.
These include wp_prepare_attachment_for_js() and get_compat_media_markup()
There isn’t any realistic way of adding classed to the html generated by WP. You would need to use regular expressions to parse the html to add the classes.
The best solution to style paragraphs is to use a CSS selector that targets them based on parent element classes that already exist and not to add a class to every p tag.
Not sure I understand the question.
You say that you want to order categories but you are adding the orderby statement to a post query.
1) There isn’t any way using get_categories()/get_terms() to order terms by a CPT.
2) There isn’t any way using WP_Query() to order posts based on a field that in not saved in as post meta for posts. In this case these values would be saved in term meta for the term.
If your field is on the term then trying to short posts by a non existent meta key will result in no results found. When you specify the meta key the way you have it implies that the meta key must exist.
Try deactivating and reactivating your update license
@d8yhn3 this is not an option in the plugin. This is something you need to add to the code where the link is generations by adding target="_blank"
to the link element.
Sorry, I don’t know much about how elementor works with ACF. That is in their plugin. And I’m not exactly sure what type of field is working. If you are talking about the user field that relates the post to user then this field is saved to post meta for the post and not user meta for the user. In the end this is something you need to resolve with elementor. As I said, more than likely you will need to build custom code in the form of a shortcode to allow showing the field.
The field is saved to the user, not the post. Elementor can only get fields from the post that is being displayed. In this case you would need to get the user id of the user field and then get the correct field from the user.
The only way to do this in elementor is to write custom code with something like a shortcode.
And this is a URL field type, not a link or post object or some other type of field?
Is it a sub field of any kind like in a repeater or group field?
I am assuming that you’re using Elementor Pro.
I do not know why it would not be working. When you look at the source of the page (html) is there any value in the href? if there is, what is it?
A 503 usually means that something is timing out?
Is this on every page of the site?
A specific page?
Front end?
Back end?
Button Widget – What page builder are using?
Someone else mentioned issues with non-English characters in field names, but that affected all posts that had those fields, not just one.
Sizes are in the return array, here’s an example
Array
(
[ID] => 6308
[id] => 6308
[title] => digitalfantasyart03e
[filename] => digitalfantasyart03e.jpg
[filesize] => 156128
[url] => .../wp-content/uploads/2018/09/digitalfantasyart03e.jpg
[link] => .../hello-world/digitalfantasyart03e/
[alt] =>
[author] => 1
[description] =>
[caption] =>
[name] => digitalfantasyart03e
[status] => inherit
[uploaded_to] => 1
[date] => 2021-09-17 12:44:34
[modified] => 2021-09-17 12:44:34
[menu_order] => 0
[mime_type] => image/jpeg
[type] => image
[subtype] => jpeg
[icon] => .../wp-includes/images/media/default.png
[width] => 1024
[height] => 768
[sizes] => Array
(
[thumbnail] => .../wp-content/uploads/2018/09/digitalfantasyart03e-150x113.jpg
[thumbnail-width] => 150
[thumbnail-height] => 113
[medium] => .../wp-content/uploads/2018/09/digitalfantasyart03e-300x225.jpg
[medium-width] => 300
[medium-height] => 225
[medium_large] => .../wp-content/uploads/2018/09/digitalfantasyart03e-768x576.jpg
[medium_large-width] => 525
[medium_large-height] => 394
[large] => .../wp-content/uploads/2018/09/digitalfantasyart03e.jpg
[large-width] => 525
[large-height] => 394
[1536x1536] => .../wp-content/uploads/2018/09/digitalfantasyart03e.jpg
[1536x1536-width] => 1024
[1536x1536-height] => 768
[2048x2048] => .../wp-content/uploads/2018/09/digitalfantasyart03e.jpg
[2048x2048-width] => 1024
[2048x2048-height] => 768
[twentyseventeen-featured-image] => .../wp-content/uploads/2018/09/digitalfantasyart03e.jpg
[twentyseventeen-featured-image-width] => 1024
[twentyseventeen-featured-image-height] => 768
[twentyseventeen-thumbnail-avatar] => .../wp-content/uploads/2018/09/digitalfantasyart03e-100x100.jpg
[twentyseventeen-thumbnail-avatar-width] => 100
[twentyseventeen-thumbnail-avatar-height] => 100
)
)
You need to find where the link to the subscribe is generated in your template file and modify it to add the url query parameter for the course that is being shown.
If you post code of where this link is added someone may be able to help you modify it.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Our guide looks into WordPress custom fields and how they stack up against the possibilities of ACF.
— Advanced Custom Fields (@wp_acf) July 18, 2022
https://t.co/hk3yibkHyk
© 2022 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.