Flexbox shortcodes in composer breaks it.

Posted in: Newspaper
Post count: 50

I need to show a flexblock filtered by tag slug. However the tag slug should be the page name/slug which will be supplied by a php variable. I run a listing site and i want to show on the single listing page all the Posts/articles that have tagged this listing. Basically a ‘related news’ block on the single listing page.

I got it to work on the front end. However it seriously breaks the TD Composer.

I installed PHP Snippets plugin and added this:

[td_flex_block_1 modules_on_row=”eyJhbGwiOiIzMy4zMzMzMzMzMyUiLCJwaG9uZSI6IjEwMCUifQ==” limit=”3″ hide_audio=”yes” show_cat=”none” show_author=”none” show_review=”none” show_com=”none” show_excerpt=”none” show_btn=”none” image_width=”” image_floated=”” meta_padding=”” image_radius=”” image_height=”65″ meta_info_horiz=”” modules_category=”image” modules_category_margin=”” modules_gap=”1.4%” f_title_font_size=”eyJsYW5kc2NhcGUiOiIyMCIsInBvcnRyYWl0IjoiMTciLCJhbGwiOiIxNSJ9″ f_title_font_line_height=”1.3″ f_ex_font_size=”=” f_ex_font_line_height=”” ajax_pagination=”next_prev” custom_title=”ΠΑΡΟΜΟΙΑ ΑΡΘΡΑ” tag_slug=”123test-php code here”]

Then inserted the snippet shortcode in the page.
It works and i get the posts i need. But composer hangs with red errors. Had to edit the database to find a revision.

Even the above code without any php breaks the composer. But why? Try it. Paste the above in a text block or shortcode field and see.

If i can get that to work i will be very happy!

/J

Post count: 21065

Hello @bananaj !

Please note that PHP Snippets plugin is not tested with our theme and we can not provide support for untested plugins.
If I try to add the code into a new page: https://prnt.sc/MmOJmWbyzZKf, then it is working: https://prnt.sc/zhFR79SfoCOl

Thank you!

Post count: 50

You are right that works. It was be something else. I will investigate.

thanks
/J

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