Hi! Is it possible to make it so that users with the Editor role can hide blocks from specific users? Now there is a message that only the administrator can use this option. But even when creating an administrator through the Members plugin, this does not work, since only a Super Administrator is needed. Tell me how can I get around this?
Thanks for your plugin, it’s very cool!
The link has blocks on it that are successfully controlled by the plugin, but I am unable to get the individual user visibility to work.
I have tested this on 2 sites and it works in neither case. I am trying to display a shortcode block for an individual user only and it instead removes the block. I also tried to put the shortcode block in a container and to put the user visibility settings on the container and it still did not work. I use GenerateBlocks.
Both of the sites are using the MemberPress plugin. On both sites the User Roles visibility works fine. Its just the individual USERS setting that does not work.
Are there any incompatibilities with the individual user visibility control that you are aware of?
Quick question, if you don’t mind! Will using Block Visibility impact SEO? Just wondering if it might lead to duplicate content in the HTML version. Not too sure how it works behind the scenes. Thanks!
]]>I am new to this plugin, so maybe it is just a setting.
We have alot of posts. In every post we have a hidden block. This hidden block contains a case number and a name. If we on the frontend search for a word that we know exists i the hidden block (for example out students name, which is in every hidden block so far) – the search result will return all posts containing this word. To be far, it is not visible. But is there a way to exclude content i hidden block from search engine?
]]>FSE themes are really missing the option to show/hide a menu item in the navigation. Please add that option! It would make our lives soo much better…!
]]>Hi! I would like to create a rule that shows a block only if the post has any content. What condition should I set?
Thanks ??
]]>Receiving error when trying to ‘Enable Full Control Mode to add visibility controls to?every?block.’.
Error message: ‘Update failed. Try again or get in touch with support.’
WordPress version: 6.6.2
Active plugins:
Block Visibility
Blocksy Companion
Custom Post Type UI
Forminator
Popup Maker
Secure Custom Fields
Stackable – Gutenberg Blocks
WPCode Lite
WPForms Lite
It was working with WAMP.
On the console when loading the ‘edit page’ option, these 2 errors are shown:
Failed to load resource: the server responded with a status of 500 () | wp-json/block-visibility/v1/settings?_locale=user
Failed to load resource: the server responded with a status of 500 () | wp-json/block-visibility/v1/variables?_locale=user
When clicking in any element, the ‘Visibility’ option is not displayed in the Settings tab.
Receiving fatal error after update to v3.6.1
Uncaught Error: Class ‘WP_HTML_Tag_Processor’ not found in /xxxxxxxx/wp-content/plugins/block-visibility/includes/frontend/render-block.php:164
Have rolled back to 2.4.6.
Can supply more details if necessary.
Hi,
I have a WooCommerce website, where on the products pages, I manually added a GeneratePress hook after the product’s info in order to display similar products in a GenerateBlocks Query Loop (products that have the same category).
Just before this loop I have a title that says ‘You may also like’.
I was wondering if it was possible to hide the title if there are no other products in the product’s category (so no products to display)?
Thanks!
]]>Hi!
Discovered a problem with containers from spectra blocks and the block-visibility
I have a parent container and a text block. The text block shows an ACF field text (title 1 for example).
The parent container has configured the BV block option “show this container if title 1 has any value”
Unfortunately, the container is showed, if title 1 has value, or title 1 is empty
]]>I have a Visibility setup based on the Query String. If the word “career” is in the URL, a purple box with a horoscope should appear on the page. It’s not working. Any thoughts?
]]>Hello, first things first: thanks for this more than excellent plugin! Really needed something like this, to be able to quickly show the best parts of a new website to my clients, and hide all the stuff that’s not finished yet. This plugin is just fab!
One question though: when editing a block, the controls are shown at the bottom of the sidebar. See: https://snipboard.io/0mFACl.jpg It would be nice to move them all the way up to the top, so that they are always in sight. Is there a way to move them to the top?
EDIT: I’m using Generatepress (Pro) and Generateblocks (Free); that’s where all the other controls come from.
Other than that: keep up the good work!
]]>Is it possible to hide a grouped block? The only option I get is visibility presets instead of the Hide block from everybody toggle.
]]>This feature used to work fine. I select a date time about one day into the future, but the block still displays “now”. My WordPress Date/Time settings have not changed (Set to Sydney)
]]>I have an Author Block that is appended to the end of every post. I need that block to be hidden on posts with a published date before a certain date. How can I accomplish this?
]]>I have an ACF select field returning a value and used in control sets. Since the 3.6.0 update, all fields have vanished from the ‘Show block if’ dropdown. If I revert to 3.5.0 everything is fine. Just an FYI.
]]>When I choose blockvisibility presets, the visibilty box becomes 338px wide. As a consequence the controls at the right disappear in the overflow and become unusable.
I can repair this by setting
.block-visibility__react-select .react-select__control{
max-width:248px;
}
in admin-style.css.
Could this be due to the lenth of the Dutch translation I am using?
]]>This plugin looks like a great replacement for Widget Visibility plugins as we explore the move from Classic themes to Block Themes.
One feature I’d like to suggest is to add a toggle for including Child pages in the rules–that is, applying a rule to a particular Page (or Term?) and its children. Our use case for this is to handle subsets of navigation for different areas of a website. We would prefer not to create many duplicates of a Page template with slight differences in sidebar content, for example.
It looks like we could work around this using URL Path rules, but may be more prone to breaking in the case of a change of page slug somewhere in the page hierarchy.
Thank you!
]]>I use the Avia Layout Builder that comes with the Enfold theme. Is this compatible with that?
]]>I am trying to hide the form that I created using contact form 7 based on screen size. The one used in the footer. Basically the idea is the current footer one will only appear on desktop screen size and the body form will appear when mobile screen size is detected
Footer code in case it will help
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"30%","layout":{"type":"default"}} -->
<div class="wp-block-column" style="flex-basis:30%"><!-- wp:html -->
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600">Contact Us</h2>
<div class="wp-block-group">
[contact-form-7 id="2c5ab04" title="Contact Us"]
</div>
<!-- /wp:html --></div>
<!-- /wp:column -->
<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"></div>
<!-- /wp:column -->
<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between","verticalAlignment":"top"}} -->
<div class="wp-block-group"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:heading {"className":"has-medium-font-size","style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600">Architecture</h2>
<!-- /wp:heading -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:navigation {"overlayMenu":"never","style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","layout":{"type":"flex","orientation":"vertical"}} -->
<!-- wp:navigation-link {"label":"Products","url":"#"} /-->
<!-- wp:navigation-link {"label":"Resources","url":"#"} /-->
<!-- wp:navigation-link {"label":"Projects","url":"#"} /-->
<!-- wp:navigation-link {"label":"About us","url":"#"} /-->
<!-- wp:navigation-link {"label":"Contact us","url":"#"} /-->
<!-- wp:navigation-link {"label":"Order Form","url":"#"} /-->
<!-- wp:navigation-link {"label":"Warranty Form","url":"#"} /-->
<!-- wp:navigation-link {"label":"Brochures","url":"#"} /-->
<!-- /wp:navigation --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:heading {"className":"has-medium-font-size","style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600">Steel Framing</h2>
<!-- /wp:heading -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:navigation {"overlayMenu":"never","style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","layout":{"type":"flex","orientation":"vertical"}} -->
<!-- wp:navigation-link {"label":"Products","url":"#"} /-->
<!-- wp:navigation-link {"label":"Resources","url":"#"} /-->
<!-- wp:navigation-link {"label":"About Us","url":"#"} /-->
<!-- wp:navigation-link {"label":"Contact Us","url":"#"} /-->
<!-- /wp:navigation --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group"><!-- wp:heading {"className":"has-medium-font-size","style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600">Structural Steel</h2>
<!-- /wp:heading -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group"><!-- wp:navigation {"overlayMenu":"never","style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","layout":{"type":"flex","orientation":"vertical"}} -->
<!-- wp:navigation-link {"label":"Products","url":"#"} /-->
<!-- wp:navigation-link {"label":"Resources","url":"#"} /-->
<!-- wp:navigation-link {"label":"About us","url":"#"} /-->
<!-- wp:navigation-link {"label":"Contact us","url":"#"} /-->
<!-- /wp:navigation --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->
]]>
Hi, just to let you know that I had a problem with PostX plugin and their answer was:
After a thorough investigation, we found that the Block Visibility plugin is causing the Gutenberg editor to behave like a Full Site Editing (FSE) interface( some of the FSE functionalities added).
PostX handles the FSE editor and Gutenberg editor differently. If you deactivate the Block Visibility plugin, both editors should function properly in the case of CSS. Also, save those templates/pages again, the blocks will display properly.
For further assistance with this issue, please reach out to Block Visibility’s support team.
Note:
wp.data.select(‘core/edit-site’)
This functionality only should be accessible only in FSE site editor , not in Gutenberg editor. This information may help them find out the issue.
Thanks for your cooperation. Also, we will give compatibility with this plugin.
For me it’s Ok, I’ve disabled Block Visibility and indeed it solved the problem.
]]>Hello! I could not find any posts that about this:
Under Appearance -> Widgets I see the following notice partially clipped at the top of the page:Notice: Function wp_enqueue_script() was called incorrectly. "wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in \wp-includes\functions.php on line 6085
I disabled my custom theme and went plugin to plugin, disabling them, to narrow it down. Block Visibility, ended up being the culprit.
I understand it is a notice and on my production site it doesn’t appear; Just thought I’d mention it.
Thank you,
Jay
]]>Hi there,
Talking to GeneratePress support, are the assumptions that David made correct
https://generate.support/topic/visibility-conditions-vs-multiple-gp-elements-and-php-rules/
Kind regards,
Will
]]>Logged into a website this morning and all blocks on every page crash in the editor. The front-end is fine. This error in red up top: The “block-visibility-toolbar-options-hide-block” plugin has encountered an error and cannot be rendered.
Disabling this plugin OR restoring my database to an earlier version both fix the issue.
For some reason, not everyone on the team has this issue.
Console shows this:
TypeError: a.every is not a function
at G (block-visibility-editor.js?ver=6e4ba37bcc4395f59607:1:28255)
at block-visibility-editor.js?ver=6e4ba37bcc4395f59607:1:29168
at hu (react-dom.min.js?ver=18.3.1:2:60308)
at _o (react-dom.min.js?ver=18.3.1:2:74386)
at xi (react-dom.min.js?ver=18.3.1:2:120464)
at bs (react-dom.min.js?ver=18.3.1:2:108749)
at vs (react-dom.min.js?ver=18.3.1:2:108677)
at gs (react-dom.min.js?ver=18.3.1:2:108540)
at as (react-dom.min.js?ver=18.3.1:2:105347)
at is (react-dom.min.js?ver=18.3.1:2:105736)
at Hl (react-dom.min.js?ver=18.3.1:2:46663)
at react-dom.min.js?ver=18.3.1:2:103288
Hi!
If I have REQUIRED QUERIES?(ANY)
set to discount=MyDiscount
and there are multiple query strings in the URL the block doesn’t display.
If discount=MyDiscount
is the last query string in the URL the block doesn’t show as you would expect it to.
?utm_source=My-UTM&utm_medium=referral&discount=MyDiscount
But If discount=MyDiscount
is the first query string it works and shows the block.
?discount=MyDiscount&utm_source=My-UTM&utm_medium=referral
I’m assuming there is some logic issue with the ending query string and the &
.
Thanks,
Steve
]]>Hi! I was wondering if it is possible to use this plugin to show/hide content based on the visitors geolocation. If the site is visited from the US, the contact info should display the US contact info. If the site is visited from outside the US, the default contact information for the rest of the world should be displayed. I got the GeoIP module enabled and working on an Apache server. Can this somehow be combined with your plugin, or is a function like this planned for a future update?
]]>I have wordpress configured to show the page called “Home”, how can I hide a block on the home page?
I cannot select the rule using the page ID because the home URL does not contain the page ID.
I mean that when I access the home page I only write
This displays the Home page.
I do not write:
Therefore, the ID does not work as a selector.
I also can’t use a query string because that URL doesn’t have a query string
]]>Hello
3 blocks, block A, B, C.
Identical block short code to a script that randomly choose a post in category.
The only difference is block A choose a random post in category 1, block B in cat 2 and Block C in cat 3.
Posts are only in one category. So except the category ID, block are strictly identicals.
Block visibility rules are exactly the same for each block.
Block A only appears on Category 1
Block B only appears on Category 2
Block C only appears on Category 3
Rules work for block A and B but not for block C.
If I change the order of the block, let say Block A, C, B then rules work for block A and C but not for block B.
I love this plugin, I use it with all my sites…
So WP 6.6 introduced negative margins which should have happened since 2018… however this is the potential issue I’m running into:
Here comes my question(s): Even though everything looks great on all screens, looking at the html source code of the page, the code of both columns are present.
1. Aren’t the search engines going to view this as duplicate content? Or, the search engines are clever enough to understand media queries?
2. A broader question I guess should be why did WP introduce something like, where very easily this can potentially create issues on various screen sizes? What did I miss?
Thanks,
Nick D.A.
]]>Hi, I’m trying to show / hide blocks based on custom fields that are attached to a user on the author archive. (The slug /author/{username})
However I don’t see any settings or options that would allow for this. It wouldn’t be the current logged in user. Do you have any ideas if this is supported or is able to be supported.
Also, do you have any documentation on being able to extend the plugin so I could add my own conditions?
]]>