Hi there,
I added a “Limitations” section to the plugin description, as many support questions were related to the plugin not working in certain situations. This is due to the nature of some blocks and how Gutenberg/WordPress treats them. Basically you have to live with those limitations.
When I activate block logic I get the following error:
Warning: Use of undefined constant i – assumed ‘i’ (this will throw an Error in a future version of PHP) in /home/customer/www/amsmotoroils.com/public_html/wp-content/plugins/block-logic/block-logic.php(116) : eval()’d code on line 1
]]>Hello, I am sending a condition, that widget is only displayed on 4 pages, but it does not work, it is not even displayed. what am I doing wrong?
?? https://recordit.co/WuSNMxcbtC
Note: I am using wordpress multisite
]]>Hi – given the shift to Full Site Editing the limited nature of blocks means that having something like this with FSE would be ace.
Problem is – this plugin doesn’t seem to work with FSE?
I have tried it on my production site which uses a TwentyEleven child theme, and local site with a TwentyTwentyThree child theme within a post – it shows Custom HTML and Paragraph blocks correctly with Block Logic
(I am using a conditional on the author name) – get_the_author_meta('user_nicename') == "X
” – get_the_author () == "X"
also works btw).
But as soon as I try to do a conditional with a block in a FSE template, nothing shows. I’ve checked using an Insert PHP Shortcode plugin with:<?php echo get_the_author(); echo get_the_author_meta('user_nicename') ?>
Both show the result correctly on the page, returning the author name, so I am guessing access to the author WP hook is still working within FSE.
Can’t see why it shouldn’t work if those conditionals work in PHP.
Any idea why?
]]>When I add Block Logic to an HTML block, it does not work.
For example –
is_page(‘about’)
If I add that logic to an HTML Block on the Widgets page, and click “update” the logic does not work, and if I refresh the Widgets page, the block logic is no longer present on the HTML Block.
]]>Please where can I find the changelog? Thx
]]>From version 5.8 of WordPress it is possible to insert blocks via widgets.
However, the plugin does not work by adding conditional tags to blocks via widgets.
I believe there will be a great demand for this functionality.
]]>Your plugin is a great solution for showing different widget blocks on different category pages.
However, I noticed that hidden blocks keep their margin and padding, so that even when a block is hidden, there is a bit of white space representing its margin and padding. I have solved it temporarily by custom css but it’s a bit tricky since I of course do want margins and padding on the visible blocks, so I need to customise the css for each block.
Do you know what I mean and is this something that could be fixed?
]]>I don’t know a lot about WordPress PHP. What I’m using is basically current_user_can('level_10')
. However, every time I use it I will need to copy from the FAQ page. I wish some commonly used preset options can be added for better usability.
Hi,
I’m pretty new to conditional logic. I have two membership roles, basic and gold. I would like to show only certain blocks to gold members but I couldn’t find the conditional tag to show it correctly. Could you tell me the tag for user roles please?
]]>