Extracting attachments from PST files can be done either manually or by using a dedicated tool, depending on your needs. While manual methods through Outlook may work for a small number of emails, they can be time-consuming and risky for large PST files. A more effective approach is to use the MailsDaddy PST Attachment Extractor tool that allows you to quickly scan the PST file and extract attachments in bulk while maintaining the original folder structure and data integrity. The tool supports all versions of Microsoft Outlook and Windows OS.
A while ago, I had a bunch of old email files in EML format, but I didn’t know how to get them on my computer. At first, I tried several email programs but they were confusing and didn’t always show the emails correctly. I found a simple solution that worked for me after searching around. I started utilizing the GainTools Free EML Viewer and the process became easier. I didn’t have to install email program to open and read my emails and attachments. If you want a quick way to open EML files, then this tool is worth trying.
I use ACF Pro to build custom page builder interfaces for clients. Each field group is identified by a headline, which works fine when there are only a few groups — but as the number of groups grows, navigating by name alone becomes slow and error-prone for end users.
The request
It would be great if ACF allowed an optional image or icon (including SVGs) to be associated with each field group. This image would appear alongside the group name when selecting a group, making it much faster to visually identify the right one at a glance.
Why it would help
Clients and editors often struggle to identify the correct group by name alone
A visual cue dramatically speeds up selection, especially in content-heavy setups
SVG support would allow clean, scalable icons that match a brand’s design system
Possible implementation ideas
A simple image upload field in the Field Group settings
Alternatively, an icon picker or the ability to paste an SVG
The image could display in the group selection UI as a thumbnail or icon
This would be a relatively small addition that could make a big difference to the usability of custom page builder setups. Happy to provide more detail or mockups if helpful!
I can’t seem to add Conditions – Rules, there is no add new rules button?
Also in the File Upload field, changes to allow multiple uploads and acccepted file types will not save, but changing Maximum file size & Required will save?
Any ideas what could be causing this?
The DX of interacting with the subfields inside of group fields is a little clunky, often requiring that you store the entire group value in variable and then use array notation on it.
If often find the clunkiness of this (the way it breaks up my template mark-up) dissuades me from using a group field even when it would be appropriate or useful in the back-end.
I’d like to propose allowing the use of dot notation in get_field and the_field functions to access the subfields of groups. This would allow us to write templates in a more ergonomic way.
For example,
`php
<?php
$address = get_field( ‘address’ );
?>
<p>
<?php echo esc_html( $address[‘street’] ); ?>
</p>
<p>
<?php echo esc_html( $address[‘city’] ); ?>
</p>
`
Would be equivalent to,
`php
<p>
<?php the_field( ‘address.street’ ); ?>
</p>
<p>
<?php the_field( ‘address.city’ ); ?>
</p>
`
For backwards compatibility I’d assume there’d need to be some mechanism for ensuring this isn’t overriding a field which does have the name of ‘address.street’ (if periods are allowed in field names?).
Hello,
I have a question regarding ACF PRO licensing for client projects.
I am developing a website for a client (an organization), and I plan to use ACF PRO to implement custom fields. I would like to clarify the correct and recommended way to handle the license in this situation.
1. Should the client purchase the ACF PRO license under their own account, or is it acceptable for me (as the developer) to purchase and use my license for their website?
2. After the project is completed and handed over, what is the recommended setup?
3. If the subscription needs to be renewed annually, does the client need to manage and pay for the renewal themselves?
4. How does the renewal process work for organizations?
5. What happens if the license is not renewed — will the existing PRO fields continue to function normally?
I would appreciate clarification on best practices for handling licensing in commercial client projects.
Thank you in advance.
Best regards,
Denys
I get the warning that $rule[‘value’] in ACF_Location::compare_to_rule is undefined. I checked the values and the $rule parameter only has “param” and “operator” set.
The warnings all look like this:
Warning: Undefined array key "value" in /home/u680869368/domains/jaisamusic.schonbald.live/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/locations/abstract-acf-location.php on line 183
(each time with line 183 and 186 of course)
The $rule looks like this:
array(2) { ["param"]=> string(4) "post" ["operator"]=> string(2) "==" }
To get rid of the warning I added the following line at the beginning of the function.
if (!isset($rule['value'])) return false;
Edit: Ok, now I understand where this issue comes from. I have some component field groups that are solely used in clone fields by other field groups. To be sure that they are never shown on any other location, I selected post as rule without a value.
So this isn’t really an issue with the ACF location class. But it shows a different issue: it should be possible to select “nowhere” as a location for field groups that are only intended to be imported via clone fields.
To style the Relation output we need unique CSS ID for each list
Hello,
Do you see any concerns with using a dynamic post_id in the acf_add_options_page() function?
For example:
'post_id' => "user_{$dynamic_user_id}",
What we are trying to do is create an options page where we can edit some user meta for a selected user.
We don’t want to use the regular Edit User screen, since that page allows editing more information than we want to make available to our Editors.
Thanks in advanced for your help!
Hey I recently updated my ACF from ACF pro and using WP Ultimate CSV Importer.
After an upgrade, I am unable to export ACF data. Is there any settings or requirements need to be done?
For my custom coded theme I created a export / import functionality available on the page template that uses a flexible field.
The whole thing works decently well and succeeds in exporting / importing complex pages built with the flexible field, that saves a lot of time when deploying content from (1) local to (2) dev and then to the (3) live sites.
My biggest problems comes when I export fields containing shortcodes. I retrieve the ACF flexible field using the function get_field('content_rows', $page_id) and it already has converted the shortcodes to the resulting html. I also tried using get_field('content_rows', $page_id, $format_value = fase) and this one returns the right content, but does not return the names of the subfields, but their subfield codes (eg. field_68258f19060e1).
The next solution I tried was to disable the shortcode functionality before calling the get_field('content_rows', $page_id) function. This worked partially: the shortcodes are not run, but all the quotes inside these shortcodes are converted to Unicode characters (UTF left quote / right quote). My final workaround was to do a string replace, replacing these UTF characters inside [] with the normal double quote character.
While this solution does work at the moment, it seems really fragile. Is there any relatively simple way of getting the content of the fields as returned by get_field('content_rows', $page_id, $format_value = fase) but with the keys returned by get_field('content_rows', $page_id)?
Hello,
I’m having some issues using acf pro in an iFrame, what I’m doing is very simple, I have a page that contains an iFrame, in this iFrame I load the wp-laod:
require_once '../../../wp-load.php';
I can load a normal field in a page, but I can’t load any option fields (or repeater or layout), for example this doesn’t work:
`
get_field( ‘key’, ‘option’ )
`
This might not be an acf issue but rather something missing on my side on how I load wordpress. Do you have any idea how I can fix this?
Hello all,
I’ve started using ACF for a project of mine that works as business directory. For each business (place) I want to register the working days and hours.
The structure I created is like this:
[Group Field] Name of the day (Monday, Tuesday, etc)
[True/False Field] Open All Day
[True/False Field] Closed All Day
[Repeater Field] Time Entries
[Time Picker Field. Display/Return Format H:i] Open Time
[Time Picker Field. Display/Return Format H:i] Closing Time
Using code to create entries, I’ve managed to set the Open/Closed All Day fields, but I am not able to set the Time Entries.
I’ve tried several different formats of this code:
foreach ( $workingHours as $workingHour ) {
$day = $workingHour->en;
// Update all day open/closed fields
update_field( "{$day}_all_day_open", $workingHour->allDayOpen, $post_id );
update_field( "{$day}_all_day_close", $workingHour->allDayClosed, $post_id );
if (
true === $workingHour->allDayOpen ||
true === $workingHour->allDayClosed
) {
continue;
}
$time_entries = [];
if ( ! empty( $workingHour->workingHours ) ) {
foreach ( $workingHour->workingHours as $hour ) {
$time_entries[] = [
"open_time" => $hour->opening,
"closing_time" => $hour->closing,
];
}
}
update_field( "{$day}_time_entries", $time_entries, $post_id );
}
Can someone help fix that issue?
Polyester (PET) is everywhere – from fashion and furniture to tote bags and outdoor gear. Its strength, affordability, and easy care have made it one of the most widely used materials in the world. But as plastic pollution grows, the environmental cost of polyester has become impossible to ignore. Is this everyday fabric a modern marvel or an ecological mistake? Let’s find out.
Table of Contents
1. Is polyester bad?
As plastic pollution becomes a global concern, polyester has come under growing scrutiny. It is the world’s most widely used synthetic fiber, but its production depends heavily on fossil fuels. According to research by EarthDay.org, around 342 million barrels of oil are used every year to produce synthetic fibers like polyester, making it one of the most resource-intensive materials in the textile industry.
Polyester’s fossil origin is more than symbolic – it means constant consumption of nonrenewable resources. The production process emits greenhouse gases, uses toxic dyes, and releases microfibers into waterways. Every wash of polyester clothing contributes countless plastic particles into the environment.
Yet, polyester is not inherently flawed. It remains one of the most efficient and high-performing fibers available today: strong, lightweight, water-repellent, and cheap. Its widespread use in fashion and accessories stems from these very attributes. The real issue lies in how we produce, use, and discard polyester – not merely its existence.
Is polyester bad?
2. Pros and cons of polyester
Polyester’s dominance in the textile and bag industry comes from its impressive performance, low cost, and versatility. Yet, these very strengths also contribute to its environmental drawbacks. Understanding both sides helps balance practicality with sustainability.
2.1 Pros of polyester
Durability and strength: Polyester is one of the toughest fibers in modern textiles. It resists stretching, shrinking, and abrasion, which allows bags and apparel to maintain their shape and structure after years of use. This makes it a reliable choice for reusable shopping bags, travel accessories, and outdoor gear that must withstand daily wear and tear.
Water Resistance and easy maintenance: The fabric is naturally hydrophobic, meaning it repels moisture and dries quickly. This makes polyester ideal for rain-friendly or sport-oriented bags. It can be machine-washed, dries fast, and rarely needs ironing – reducing care time for users.
Lightweight and cost-effective: Polyester offers excellent strength-to-weight ratio: it’s light but tough. It’s also significantly cheaper to produce than natural fibers like cotton or technical fibers like nylon, which helps brands lower manufacturing costs and consumers access affordable, long-lasting products.
Color retention and versatility: Polyester absorbs dye evenly and holds color well over time. It doesn’t easily fade under sunlight, giving it a bright, lasting appearance. The material can also mimic the look and feel of silk, canvas, or even leather, offering design flexibility for brands.
Pros of polyester
1.2 Cons of polyester
Fossil fuel dependency: Polyester is derived from petroleum, a nonrenewable resource. Its production consumes vast amounts of oil and energy. According to EarthDay.org, roughly 342 million barrels of oil are used annually for synthetic fiber production. This reliance on fossil fuels makes polyester one of the least sustainable mainstream fabrics.
High carbon emissions and energy use: Manufacturing polyester is energy-intensive, often involving high-temperature polymerization processes that emit large quantities of greenhouse gases. Producing one kilogram of woven polyester can release 20–27 kg of CO₂, several times more than cotton.
Microplastic pollution: Every wash of polyester fabrics sheds thousands of microscopic plastic fibers. These particles flow into rivers and oceans, where they harm aquatic life and eventually enter the human food chain. Studies estimate that over one-third of all ocean microplastics originate from synthetic textiles.
Non-biodegradable and persistent: Unlike natural fibers such as cotton or hemp, polyester doesn’t decompose. It can remain in landfills or the environment for hundreds of years, breaking down only into smaller microplastic particles rather than fully returning to nature.
Comfort limitations: Polyester is less breathable than natural fabrics and tends to trap heat and odors. Some coatings and dyes used in its finishing process may also cause irritation for sensitive skin.
In short, polyester delivers outstanding performance at a low cost, which explains its global dominance. But those benefits come at a high environmental price. The key to responsible use lies in rethinking production and end-of-life management — shifting toward recycled polyester (rPET), reducing overuse, and encouraging longer product lifecycles.
2. Is polyester good for bags?
Yes – polyester is an excellent material for bags when judged by functionality, durability, and cost-effectiveness. It combines strength, lightness, and resistance to wear, which makes it one of the most practical choices for everyday and commercial use. While it raises environmental concerns, from a performance standpoint, polyester consistently meets the demands of both consumers and manufacturers.
2.1 Durability and load capacity
Polyester’s tensile strength and abrasion resistance allow it to carry heavy loads without stretching or tearing. Bags made from polyester maintain their shape even after repeated use, making them suitable for shopping, travel, or outdoor activities. This reliability reduces the need for frequent replacement, indirectly lowering waste over time.
2.2 Water resistance and weather protection
Polyester naturally repels water thanks to its hydrophobic surface. It won’t absorb moisture like cotton or canvas, helping to protect belongings from light rain and humidity. For complete waterproofing, additional coatings such as PU (polyurethane) or PVC (polyvinyl chloride) are often applied, making polyester bags ideal for outdoor, beach, or sports settings.
2.3 Lightweight and convenient
Compared with nylon or canvas, polyester is lighter while still maintaining good structural integrity. This makes it comfortable to carry for long periods and practical for travel or promotional use where portability matters.
2.4 Color customization and branding
Polyester accepts dye and heat transfer printing exceptionally well. The fabric’s smooth texture allows for sharp, vibrant graphics and logos that don’t fade easily under sunlight. This property gives brands wide creative freedom in bag design and marketing.
2.5 Cost efficiency
From a manufacturing perspective, polyester offers an unbeatable balance between price and performance. It is cheaper than nylon and requires less maintenance than cotton, making it an ideal choice for mass production, promotional campaigns, and private-label collections.
3. Sustainable alternatives to polyester
As awareness of environmental impact grows, both brands and consumers are seeking materials that deliver performance without compromising sustainability. Polyester remains useful, but shifting toward more eco-friendly alternatives helps reduce dependence on fossil fuels and plastic waste.
3.1 Recycled polyester (rPET)
Recycled polyester, or rPET, is currently the most practical and scalable alternative to virgin polyester. It is made by reprocessing used plastic bottles or discarded polyester fabrics into new fibers. This approach reduces oil consumption, cuts carbon emissions by up to 30–60%, and diverts large amounts of plastic from landfills and oceans.
From a technical standpoint, rPET performs almost identically to traditional polyester: it is strong, lightweight, water-resistant, and easy to print or dye. For brands, switching to rPET doesn’t require changes in production technology but demonstrates a clear commitment to sustainability. For consumers, choosing rPET bags is a small but powerful act – it turns waste into something useful and allows people to carry everyday products with pride, knowing they support cleaner manufacturing and circular design.
RPET reusable white shopping bag with flower design – K015
RPET reusable white shopping bag with flower design – K015
3.2 Natural and renewable fibers
Other promising substitutes come from renewable, biodegradable sources. Organic cotton and recycled canvas are soft, breathable, and easy to print on, suitable for fashion and lifestyle bags. Jute and hemp offer a more rustic, durable texture with a much lower environmental footprint – both grow quickly with minimal water and chemicals while absorbing carbon during cultivation.
Custom Cotton Canvas Bags & Totes
3.3 Innovative bio-based materials
For brands exploring premium or experimental designs, next-generation materials such as Tencel (Lyocell), cork, and Piñatex (made from pineapple leaves) offer unique textures and strong eco-appeal. These options combine natural aesthetics with lower emissions and biodegradability, fitting well with sustainable or vegan product lines.
Conclusion
Transitioning away from virgin polyester is no longer just a trend – it’s a necessary evolution for modern brands. Adopting rPET or other sustainable fibers allows businesses to maintain product quality while aligning with global environmental goals. For consumers, supporting these materials turns everyday choices into meaningful contributions toward a cleaner, more responsible textile industry.
Hello there,
I have big struggle with one thing.
I am using ACF PRO plugin and also Elementor PRO.
Using elementor Single Post template for all our branches I displaying informations from CPT “branches”.
These CPTs have an assigned ACF group of fields “branch info”, where for example there is an address, contact, but also “Advisors at the branch”, which is a Post object (CPT “Advisors”), with a return value of post object.
Therefore, in the CPT of any branch I correctly assign the given advisors (multiple), which is saved without any problems and works.
However, the problem occurs in a situation where I want to add an Elementor Grid loop to a single post template, when the source query unfortunately does not offer me the given post object. Of course, it offers me information about the branch, contacts, address, etc. But the post object cannot be found in the select and it also cannot be displayed via the Query ID “bus-advisors” (our field name).
Have any of you guys better skill then me and could help me find out solution?
Thank you in advice,
Filip
Posted on 07/10/2025
by Mr. Tony Phuc
At global trade shows and industry exhibitions like technology fairs in Las Vegas or business expos in Dubai one simple item consistently attracts attention: the trade show bag.
Almost every attendee carries one. Each logo printed on it travels through aisles, airports, and offices-turning an everyday object into a moving ad. Unlike flyers that get thrown away, a well-designed bag stays with people, holding samples, notes, and memories from the event.
For businesses, it means long-lasting brand visibility. For attendees, it’s a useful, practical gift they actually keep. The key is knowing how to use trade show bags differently for each industry. The next sections show how companies in various sectors can apply them effectively to strengthen their brand and connect with their audience.
Table of Contents
Why trade show bags work across industries?
Trade show bags are one of the few marketing tools that deliver both reach and relevance across industries. Unlike brochures or single-use merchandise, they travel through every hall, taxi, airport, and even into daily routines creating thousands of brand impressions long after the event ends.
According to the Global Ad Impressions Study by the Advertising Specialty Institute (ASI), a single custom-printed promotional bag generates an average of 5,983 impressions throughout its lifetime. This number ranks bags among the highest-performing promotional items in terms of visibility per dollar spent. Because people keep and reuse them, bags extend exposure far beyond the event floor, offering long-term, low-cost visibility for brands of all sizes.
But their real strength lies in adaptability. In healthcare, a clean and simple bag conveys trust and professionalism. In technology, it signals innovation and practicality. In education, it fosters belonging and inspiration. In retail, it turns customers into walking brand ambassadors. And in real estate, it embodies the quality and stability that high-value clients expect.
For businesses, trade show bags reinforce brand perception and offer measurable returns on engagement. For attendees, they provide real, lasting usefulness – something they want to keep, not discard. This dual value is what makes trade show bags one of the most enduring and cost-effective cross-industry marketing tools today.
Applying trade show bags across industries
Trade show bags work best when tailored to the unique goals and audiences of each industry. A hospital, a tech company, and a consumer brand won’t use the same design or message and they shouldn’t. By understanding what matters most to your target sector, you can turn a simple giveaway into a lasting brand asset.
Below are five industries where trade show bags can deliver the strongest results, along with practical ways to make them truly effective.
1. Healthcare and wellness branding
In healthcare, trust is everything. At medical conferences, pharmaceutical expos, or wellness conventions, attendees are doctors, researchers, and patients – people who value clarity and credibility. A trade show bag in this setting should feel clean, responsible, and calm.
Neutral colors like white, mint, or light blue instantly signal hygiene and care. Materials such as non-woven polypropylene or recycled cotton are practical and easy to clean, reinforcing the sense of professionalism. Avoid aggressive branding; a small, well-placed logo paired with a simple symbol such as a cross or heartbeat can communicate reliability better than any slogan.
For businesses, these bags subtly reinforce brand integrity. Each time a medical professional reuses the bag, they associate your company with organization and quality. For the end user, the bag is genuinely useful – spacious enough for medical notes or personal essentials, light to carry, and elegant enough for daily use. When a giveaway becomes part of someone’s routine, the brand wins trust by association.
Healthcare trade show bags design
Clean, professional trade show bag for healthcare events, designed to build trust and highlight brand credibility.
2. Technology and telecom branding
Tech audiences expect design that feels modern and purposeful. At software expos or telecom summits, the trade show bag can become a physical reflection of your company’s innovation.
Opt for sleek materials – matte nylon, grey canvas, or recycled PET fabric. Keep the design minimal, with bold typography and subtle color contrasts. Add practical details such as an inner pocket for cables or a padded sleeve for a tablet. Consider embedding an NFC tag or a QR code that links to your app, demo, or landing page.
For a tech company, the bag demonstrates innovation beyond the booth. It becomes proof that you care about functionality and user experience, not just your product. For recipients, it’s genuinely useful: they can store devices, chargers, and materials without clutter. When a bag makes their conference experience easier, your brand feels smarter, more thoughtful, and more human.
Tech trade show bags design
Modern, functional trade show bag for tech and telecom events, showcasing innovation and smart brand design.
3. Marketing for education and training
Educational events are about inspiration and belonging. At open days, alumni gatherings, or education fairs, trade show bags act as more than containers—they become emotional tokens of a learning community.
A well-designed canvas or polyester tote in the institution’s colors helps attendees feel part of something bigger. Including a motivational quote like “Learn. Grow. Lead.” connects emotionally while remaining professional. Inside, a QR code linking to an online course catalog or campus tour extends engagement after the event.
For schools and universities, the bag increases brand recall long after the event. A student who continues to use it daily will think of your institution repeatedly, often in public spaces – each use a small endorsement. For recipients, it’s a convenient, sturdy item that also carries meaning; it’s not just another freebie, but a small piece of identity that represents ambition and growth.
Education trade show bags design
Practical, inspiring trade show bag for schools and training events, designed to foster connection and brand recall.
4. Retail and FMCG branding
In retail and consumer goods expos, where color and energy dominate, trade show bags become the bridge between brand and lifestyle. A striking design can make your booth stand out and turn customers into brand carriers even outside the event.
Use bright, lively colors reds, yellows, or trending pastels and large, confident branding. Choose lightweight materials that fold easily, with comfortable handles for all-day use. Add small but clever incentives such as discount QR codes, vouchers, or a printed call to join your online community.
For businesses, every reused bag becomes a micro-advertisement, reminding people of the brand’s personality and product line. For customers, it’s both a fashion and practical choice they can use it again for groceries, travel, or work. The fact that they keep it means they’ve accepted your brand into their daily lives, which is a deeper form of loyalty than a one-time purchase.
Retail trade show bags design
Vibrant, eye-catching trade show bag for retail and FMCG brands, turning everyday use into continuous brand exposure.
5. Real estate and construction branding
Real estate buyers and investors judge brands by the quality they project. At property expos or construction trade shows, a high-quality tote or brief-style bag can say more about your brand than any brochure.
Choose thick canvas, jute, or faux leather materials that feel substantial. Go for neutral tones like navy, sand, or dark grey, with your logo subtly embossed or printed in metallic ink. Avoid bright or playful colors; the goal is elegance and authority. These bags should feel premium, limited, and worth keeping.
For real estate and construction firms, this approach reinforces brand perception. A well-made bag signals attention to detail and long-term value-the same qualities buyers look for in property developers. For recipients, the experience of receiving and using a well-crafted bag creates a sense of exclusivity. They remember your brand as polished and trustworthy, not because you told them so, but because they felt it in their hands.
Real estate trade show bags design
Premium, durable trade show bag for real estate and construction events, reflecting stability, trust, and lasting value.
How to make trade show bags drive real brand recall
A trade show bag can capture attention, but lasting recall comes from the full experience surrounding it. When attendees interact with your booth, they don’t just see your logo; they feel your professionalism. The tone of your team, the layout of your booth, and even how you hand over the bag all shape the memory attached to your brand.
Choose a bag that represents your business values: clean for healthcare, innovative for tech, premium for real estate. But make sure the quality of your service matches it. A high-end bag means nothing if the booth experience feels rushed or unhelpful.
Finally, connect the physical with the digital. Add QR codes that lead to follow-up offers, contact forms, or thank-you pages. After the event, send a short note or email referencing the bag (“We hope you’re still enjoying your tote from TechExpo 2025”). Small gestures like this turn a freebie into a long-term brand impression.
Conclusion
Trade show bags may look simple, but when executed with purpose, they become one of the most effective marketing tools at any event. The right bag design catches attention; the right experience makes people remember you.
Across industries, success lies in alignment between design, service quality, and brand message. When your bag, your booth, and your follow-up all tell the same story, the impression lasts far beyond the exhibition floor.
In the end, people don’t just take your bag home. They take your brand with them and that is the real measure of effective marketing.
I have a bit of html code and javascript which produces a scrolling bit of text in a div on a specific Elementor web page. It is for a non-profit organization and I try to keep down the cost and keep plugins to a minimum. Currently I update the site when necessary but am moving towards staff members doing this themselves.
To update the scrolling text I just edit the div content manually but I am looking for a way to make this easier for the site owners.
My thought was that if I created an ACF text field and added that to the wordpress page I could pull that into the html but so far I am failing to do that. I am comfortable with editing functions.php and the site uses several custom queries but the solution to this is evading me.
Here is the relevant bit of code and what I have tried adding – the acf field is called ‘marquee_txt’.
<div>.
<div class=”loop”><div class=”content”> <?php the_field (‘marquee_txt’) ;?> See calendar for details ✦</div></div>
</div>
The acf field is associated with the page and is called marquee_txt. People on this forum are very generous with their help but as someone who only occasionally codes I need to have my hand held and have the code in its entirety .
I guess what I am trying to do is to surface the acf value in the same way that this is possible in an elementor widget using the dynamic data option – but using html/php/ javascript or what ever is necessary.
Any help gratefully received
Hello. I’m using this in an ACF child block to get a field value from the parent block:
// Get the context from the parent block
$fields = isset($context['acf/fields']) && is_array($context['acf/fields']) ? $context['acf/fields'] : [];
$sidebars = $fields['field_68a35548a985c'] ?? ($fields['sidebars'] ?? null);
I use $sidebars to conditionally show or hide the sidebars (a template part) on my pages. It works fine in the site editor and the post editor, but is completely ignored on the front end.
I use !is_preview and echo $context to render the block on the front end unless $sidebars is equal to no-sidebars, but it simply won’t work when $is_preview is false. How do I get around this?
I also tried $sidebars = get_field('sidebars', get_the_ID()); but that didn’t work either.
Hi,
I managed to set up a percentage of completion of specific fields, everything works but one thing: I need to save the post 2 times for it to update the average of this percentage across every post.
I’ll start with the whole procedure:
1. I have a group of fields where I need to import files, I created a PHP snippet that detects if a file is inserted into the field and return a completion percentage. Coding is not my thing so there is probably a shorter way of doing it.
<?php
$values1 = get_field( 'cni' );
$values2 = get_field( 'rib' );
$values3 = get_field( 'justif' );
$values4 = get_field( 'lettre' );
$values5 = get_field( 'der' );
$values6 = get_field( 'situation' );
if(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==1){
//only 1 variable is not empty
echo '17';
}
elseif(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==2){
//only 1 variable is not empty
echo '33';
}
elseif(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==3){
//only 1 variable is not empty
echo '50';
}
elseif(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==4){
//only 1 variable is not empty
echo '67';
}
elseif(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==5){
//only 1 variable is not empty
echo '83';
}
elseif(count(array_filter(array($values1,$values2,$values3,$values4,$values5,$values6)))==6){
//only 1 variable is not empty
echo '100';
}
else {
echo '0%';
}?>
2. In hook-functions.php, I added this code that adds the percentage as a field so I can call it somewhere else (which works):
function my_acf_load_value11( $value, $post_id, $field )
{
// run the_content filter on all textarea values
$value = do_shortcode( '[xyz-ips snippet="test"]' );
return $value;
}
3. I can display the field just fine but then when I use this code, it doesn’t update right away, it keeps the last update which forces me to update the post 2 times for it to show the right number.
$args = array(
'posts_per_page' => -1,
'post_type' => 'post',
'meta_key' => 'sum',
'meta_value' => '100',
);
// The Query
$the_query = new WP_Query( $args );
// Counting the results
$the_count = count($the_query->posts);
//* Restore original Post Data
wp_reset_postdata();
echo $the_count;
I can’t find the problem, my suggestion would be the saving order of the post and the field but I don’t know how to solve it.
Thank you for the help, I tried my best to explain but it’s pretty complex to me.
I have a website with a few thousand products in Woo. I’m using the Woo import/export feature to export, edit then re-import product data. All of my products have custom ACF fields with files uploaded.
Woo exports as a CSV which is fine, but when I re-upload the CSV, the products no longer have the uploaded files in place.
I have a few questions!
1. Is there a way to stop these file connections being broken during the update?
2. Is there a way to update files through this csv? Currently ACF names these fields as ‘field_xyz’ rather than the direct URL of the file. Is there a way to have ACF return the exact file URL?
Really appreciate any help on this one. I’m no coder, so its all a bit scary!
I’m brand new to ACF and attempting and failing to use it for the first time. My goal is to use ACF to help populate an image module with a category archive title.
The problem is that when I go into the category archive template I built, I can’t see the ACF field group I created as an option to add.
Even though I’ve been reading and watching videos on the ACF site, I’m still struggling with the terminology and the concept of ACF.
How I have it set up:
Field Group
1. Field type: Text
Field Label: catname1
Field Name: catname1
Default Value: blank because I have no idea what I’d input on this one.
2. Field type: Image
Field Label: catimage1
Field Name:catimage1
Default Value: blank
Under Settings I input:
Taxonomy is equal to Category (category)
Under Post Types
Plural Label: Category Headers
Singular Label: Category Header
Post Type Key: category-header
Taxonomies: Category (category)
Set to Public but Hierarchical is toggled off.
Under Taxonomies
Plural Label: Category Headers
Singular Label: Category Header
Post Types: Post (post)
Set to Public but Hierarchical is toggled off.
I notice this comes up when I hit Save but I’m unsure if I’m supposed to do anything with these:
Category Headers taxonomy updated
Add fields
Link field groups
Create taxonomy
Duplicate taxonomy
Create post type
Essentially I don’t know enough to know if I’ve set this up incorrectly or if I’m missing a vital step in the process.
Addendum question: am I required to install a child theme (plugin) in order to not lose my ACF fields? In other words, when I next update my theme or wordpress, am I going to lose all of the work I did in the ACF plugin?
New to the forums and using ACF. I’m not a developer, but know my way around PHP and building website for myself.
I have my current site built with Kirby. and want to rebuild it in WordPress. So I started building and found I needed ACF. Installed it and found it wasn’t retaining any data, so using the snippets it wawasn’t showing anything.
Ok, maybe it was my coding. So I installed the basicWP theme But it was still not doing anything.
One more test… I build a ’nothing’ theme where I had only a title and one ACF field. Still not showing or retaining any data.
So now I’m stuck. That’s even after watching videos, reading the requirements and doing a bunch of research.
Here’s what I have tried…
Local:
– MAMP pro
– PHP 8.3 (and 8.2)
– mysqli 5.7.39
– mysqlnd 8.3.0
– Fresh install of WordPress 6.8.2
– Theme: Twenty Twenty three
– ACF 6.5.0
Server:
– Lightspeed
– PHP 8.2.29
– mysli 10.6.22-MariaDB-cll-lve
– mysqlnd 8.2.29
– Fresh install of WordPress 6.8.2
– Theme: Twenty Twenty three
– ACF 6.5.0
What am I missing? Or is this a bug of some sort?
Any help would be appreciated!
The documentation doesn’t appear to answer a couple of issues I am having.
1. There seems to be a limit to the earliest year you can go back to – 1925. Is there a way around this?
2. If I only have a year, rather than a full date, obviously I can’t use the date picker function BUT even if I type it in manually into the field it doesn’t seem to retain the data. Is this due to a wordpress limitation – that it only store dates in the YYYYMMDD format?
Context: I have a site which contains biographies of people, mostly bornin ain the 1800s. For many of those people I only have a year of birth (or approximate year of birth) and not a specific date. Can I use the date picker to record/retain this data or is the only solution to use a free text field? If anyone has any ideas around this I;d love tto hear them.
Thank you 🙂
I’m using WordPress, Divi Theme, ACF free version.
Hi!
I noticed a problem when I create custom blocks that contain <InnerBlocks/>. In that case, I am not able to retrieve the $block object in the js script fired in the backend.
function.php
——————
add_action('init', 'register_acf_blocks');
function register_acf_blocks() {
wp_register_script('accordion-script', get_stylesheet_directory_uri() . '/blocks/accordion/script.js');
register_block_type(get_template_directory() . '/blocks/accordion/block.json');
}
block.json
————–
{
"name": "accordion",
"title": "Accordion",
"description": "Accordion to hide large amounts of text in drop-down sections.",
"category": "my-category",
"icon": "media-code",
"keywords": [
"accordion"
],
"acf": {
"mode": "preview",
"renderTemplate": "render.php"
},
"script": "accordion-script",
"supports": {
"layout": false,
"align": false,
"customClassName": false
},
"example": {
"viewportWidth": 800
}
}
render.php
—————-
<InnerBlocks/>
script.js
———–
(function($){
var initializeBlock = function($block) {
console.log($block); // HERE IS THE PROBLEM!!! IN CONSOLE: e.<computed> {length: 0, prevObject: e.<computed>}
}
if( window.acf ) {
window.acf.addAction( 'render_block_preview/type=accordion', initializeBlock );
}
})(jQuery);
The problem disappears when I insert any HTML instead of InnerBlocks in render.php
WP version: 6.8.1
ACF version 6.4.2
I love the local JSON files feature and use it in all my projects, both ones where I’m the only developer and others where we are several developers.
What we run into ever so often is that we end up losing changes because somebody modifies an ACF field group that has newer changes in the local JSON file that had not been sync’ed yet. For example when working on different branches and switching between them, or when different developers make changes to the field groups and commit the changes to .git.
Luckily, we all our JSON files in git, so we can always go back and find the changes that have been overwritten. But it’s not our favorite way of spending our time 🙂
P.S.: I’ve already implemented a hook for this as part of my projects where I now show a warning on the “Edit field group” screen if the field group has unsync’ed changes. But I think it would be amazing to have something similar in the core product to everyone’s benefit. See the attached screenshot to see how my own little hack looks.
The code for my workaround:
// Show a warning when editing an ACF Field Group that has not been sync'ed yet
function unsynced_acf_field_group_warning_hook() {
global $post;
$group_key = $post->post_name;
$json = acf_get_local_json_files($post->post_type);
if (isset($json[$group_key])) {
// HACK: At this point in the life cycle, the ACF field groups are not loaded
// So we simply read the JSON file and compare the timestamps
$json_file = $json[$group_key];
if (file_exists($json_file)) {
$json_data = json_decode(file_get_contents($json_file), true);
$json_modified = $json_data['modified'] ?? 0;
$db_modified = get_post_modified_time('U', true, $post->ID);
if ($json_modified > $db_modified) {
add_action('admin_notices', function () {
echo '<div class="notice notice-error"><p>The local JSON file has unsynced changes. <a href="' . admin_url('edit.php?post_type=acf-field-group&post_status=sync') . '">Sync now</a></p></div>';
echo '<style> #wpcontent { background: rgba(255 0 0 / 0.05); } </style>';
});
}
}
}
}
add_action('acf/field_group/admin_head', 'unsynced_acf_field_group_warning_hook');