Closed globdug closed 3 years ago
Hello @globdug
you could select Shortcode as dynamic-tag and enter your shortcode, than check if it contains <li
.
Thank you!
While I was waiting for a reply, I solved in a similar way. :)
I have changed the return of function in this way:
if( $childpages=='' ){
return '';
}else{
return '<ul>' . $childpages . '</ul>';
}
And in DC I set the condition to "Is not empty".
There could be some issues if I use this approach in your opinion or is better yours?
I don't think it makes a big difference. It's more a matter of taste how to do it.
Ok, thank you very much for your help and time!
Hello, is there a way to show an element only if current post has children?
I would like to show a menu of child pages only if current post has children.
I created a little shortcode that load child pages
I would like to manage the condition with Dynamic Conditions plugin, not via php. Is it possible?