Add custom attribute on TD BLOCK shortcode

Posted in: Newspaper
Post count: 22

Hi,

I want to add an additional attribute on the block shortcode:

[td_block_1 sort="" ajax_pagination="" custom_attribute="xxxxx"]

I’ve created a child theme to modify block shortcode
theme-child/includes/shortcodes/td_block1.php

Can you guide me on which file should I be modifying so I can add a custom_attribute on [td_block_1] shortcode so I can use that attribute inside theme-child/includes/shortcodes/td_block1.php ?

Let me know

Thanks

Post count: 22421

Hello,

You can find the block files here: https://www.screencast.com/t/gzxYVAb0

Thank you!

Post count: 22

Hi Bodgan,

Thanks for the feedback.

But if I edit that block template can I add a CUSTOM ATTRIBUTE? My question is a help/guide on how to properly do it and access that attribute inside td_block1.php

[td_block_1 sort="" ajax_pagination="" custom_attribute="xxxxx"]

Let me know

Post count: 20688

Hi,

I could not say how that would be possible and what will it take to achieve it. The block shortcode will only accept predefined parameters that can be set through the composer sidebar
https://www.screencast.com/t/btLMKrNFKp82
https://www.screencast.com/t/IkzH11f6hcha
All these parameters are defined in the theme config file, for example the custom title you set for a block
https://www.screencast.com/t/IdKykxyT0Qc
The theme and the composer do not yet have such an option, they might have in the future, I cannot say exactly.

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.