filter custom field with checkboxes and show it with one shortcode

add_shortcode( “Querbett”, “bettenaert”); add_shortcode( “Alkovenbett”, “bettenaert”); add_shortcode( “Queensbett”, “bettenaert”); add_shortcode( “Hubbett”, “bettenaert”); function bettenaert ( $atts, $content = null, $tag ) { modell_nach_bettenart_2( $tag ); } Now use shortcode [Querbett], [Alkovenbett], [Queensbett] or[Hubbett] as required. I hope this may help.

How can I hide the ACF shortcode when empty

the code needs some modification. see below. /***************************************************************************************************************************************************** * * Usage: [acf_href href_before=”mailto:” href=”acf:field_name” text=”acf:field_name”] * * acf:fieldname will retrieve the value of the specified “fieldname” and use that. * get:url_variable will grab a variable from the URL and use that. * * [acf_href href=”acf:my_link” text=”Link to web site”] * [acf_href href_before=”mailto:” href=”acf:email_address” text=”acf:user_name” post_id=”get:post_id”] … Read more

How to enable on custom shortcodes

You are using esc_attr in your table_data function. This will encode the html in your variable in such a way that it is no longer recognized as html. So the browser will display “<br>” rather than insert a line break.