Hey.
You can use $attributes
to check your controls values and return custom output. The $output
variable contains default block output. Also, you can use as many filters, as you want https://developer.wordpress.org/reference/functions/add_filter/
I don’t quite understand your case and the problem.
Regards, nK.
Hi nK,
Thanks for your reply,
I mean to say, can I have a example code of case to understand this.
Let suppose, we have a testimonial block, and I have to design output plan for it, one section have an another field and its html going to change its position too ( instead of coming first , going to come later )
So in simple language let there be thumb image, name, testimonial text, and star rating in a testimonial block. We need an another version of same testimonial but fields in this order – thumb image, name, position ( extra field ), star rating and testimonial text. So how this filter can help us to output the html in that way ?
Thanks
Hozefa
Hey Hozefa.
I think you can check our example of an Alert block. There is an example of PHP output with conditionally displaying the Close button using one of the available block attributes. https://lazyblocks.com/documentation/examples/alert-block-bootstrap/
This is something like basic PHP coding, I don’t think I can help you write the block output, you will need to resolve it by yourself.
Regards, nK.