i would like to add some additional text on the product archive pages, AFTER the product grid, using ACF (advanced custom field)
add_action( 'woocommerce_after_main_content', 'add_additional_text_function');
function add_additional_text_function() { ?>
<?php if(get_field('add_additional_text_under_products')) { ?>
<div class="more-text"><?php the_field('add_additional_text_under_products'); ?></div>
<?php }
}
what am i doing wrong?
i need help?
i really struggling with woocommerce, nothing seems simple. also i get sooo frustrated that there seems to be nothing on the internet, surely others what or have done this???
]]>srcset
doesn’t seem to be applied automatically to those images.
Is there a way to fetch an image’s Optimole srcset
in PHP as a string?
That would really help me out.
Thanks!
]]>I am unable to see the custom fields I have added in the website.
I have done the following:
I have installed Custom Post Type and Advanced Custom Field plugins. Using them I created a custom post type and field group and associated the field group with post type.
When I go to the new custom post, I see the fields I want. I enter the data and publish. I get a message that the page is published with a link to view it. Until this point everything is good.
When I click on the link, I only see the default fields that come along with WordPress like Title and Body text. The new custom fields which I have added are not displayed.
I am using WordPress 5.7 and the above mentioned plugins are compatible with this WordPress. I have tried it on two default themes Twenty Twenty and Twenty Twenty One.
Thanks for any help!
]]>I would like to use a gallery on my Custom Post Type, using ACF.
Does Nextgen Gallery work with Advanced Custom Fields?
I created a Text Area Field and added this code below:
<h1 id=”myH”></h1>
<p id=”myP”></p>
<script>
/*
The code below will change
the heading with id = “myH”
and the paragraph with id = “myP”
*/
document.getElementById(“myH”).innerHTML = “JavaScript Comments”;
document.getElementById(“myP”).innerHTML = “My first paragraph.”;
</script>
As a result on the front end of my website instead of seeing:
JavaScript Comments
My first paragraph.
I am seeing this:
/* The code below will change the heading with id = “myH” and the paragraph with id = “myP” */ document.getElementById(“myH”).innerHTML = “JavaScript Comments”; document.getElementById(“myP”).innerHTML = “My first paragraph.”;
What am I doing wrong and how to solve it?
I’d be very very grateful if you could help me over here,
Thanks
Marlos
]]>00:00 / 1. Drinkee – Sofi Tukker (2016)
04:40 / 2. No Roots – Alice Merton (2016)
07:16 / 3. Hey Lion – Sofi Tukker (2016)
11:24 / 4. Soft Feelings – Sondre Lerche (2017)
16:50 / 5. Could Be Love – Patawawa (2016)
etc…
But the text shows as a block when published:
00:00 / 1. Drinkee – Sofi Tukker (2016) 04:40 / 2. No Roots – Alice Merton (2016) 07:16 / 3. Hey Lion – Sofi Tukker (2016) 11:24 / 4. Soft Feelings – Sondre Lerche (2017) 16:50 / 5. Could Be Love – Patawawa (2016)
I’d be very grateful if you could help me over here,
Thanks again.
]]>Title: Hamlet
Author: William Shakespeare
The simplest solution is to display the author field I entered in Attributes under Title. I wish I could do this, but I don’t have the skills. Another way is to use the plugin “Advanced Custom Field” to add information to the admin page and frontend. It looks like it can be done by an amateur like me, but I don’t know by doing a lot of research.
The theme used is “Astra” and “WooCommerce” is installed.
]]>here is what i am talking:
static text: https://prnt.sc/rgqty9
custom field: https://prnt.sc/rgqttv
I try using custom field name/key, using AE – ACF field. But the same problem, when i want link it to custom field it doesn’t work. How to solve it?
thanks.
I am trying to activate a single image in an Advanced Custom Field (ACF) WYSIWYG Editor. Here’s the progess I’ve made:
<?php if(get_field('faq')): ?>
<?php while(has_sub_field('faq')): ?>
<h3><?php the_sub_field('question');?></h3>
<?php
$content = the_sub_field('answer');
if ( function_exists('slb_activate') )
$content = slb_activate($content);
echo $content;
?>
<?php endwhile; ?>
<?php endif; ?>
What am I doing wrong? Thanks for your help!
]]>I am trying to add a hidden field to the form in order to know which business opportunity the user is subscribed to.
So I am using ACF text value “code” of each custom post and need it to be added to the submitted form.
I have tried to play around with the solution you suggested on your support forum:
https://premium.wpmudev.org/forums/topic/forminator-pro-autofill-add-custom-field/
But with no luck. I couldn’t replace the “$company = get_user_meta( get_current_user_id(), ‘company’, true );” with the “$confirm = get_field(‘confirm’);” of the text field.
I would really appreciate if you can guide me on that.
Thanks,
Eli.