Show page if ACF Repeater has value

July 21, 2022 00:59:26
Topics: 4
Messages: 11
I have 3 repeaters one on each page, I want to show the repeater if it has any rows. I'm using a custom shortcode now to output the content to the page which is working really well, thanks for your help on that.

My repeater id is [62] and the page id is 4. I looked at some other posts and thought I had done this right however it either shows the page on both instances where it should only show on one. Can you help?

Thank you
July 21, 2022 01:56:14
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

Inside "Actions" and "Conditions" must be used shortcodes that are available in E2Pdf Template context.

Is it correct that you have 3 different repeaters and each repeater is placed on different pages, if so you can try to check the first repeater row and if it's empty - "Hide" page.

For example, acf has a shortcode that will output a separate row value:

[acf field='my-row_0_full-name' post_id="[id]"]

* where "my-row" repeater field and "full-name" sub-field. So the "Action" to hide page can look like on screenshot attached.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
July 21, 2022 02:07:10
Topics: 4
Messages: 11
That is amazing thank you!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.