Is there a plugin for WordPress for creating ‘Accounts’ where all users who belong to that Account can only see Account data? [closed]

This is something that a lot of membership plugins can do, e.g. MemberPress, Restrict Content Pro, or similar membership or user group plugins. Which is best for you depends on your particular setup. From what you’re describing, you only need basic membership/group functionality (without features like payments), so I’d suggest going with a basic, free … Read more

plugin dev – minimum base css specificity?

There’s no standard. CSS specificity in themes varies wildly, and I’m convinced many theme authors are not even aware of the concept given some of the CSS I’ve seen. If something is very important to the appearance of your plugin, then high specificity may be desirable, but in many cases if you’re just styling divs … Read more

flush_rewrite_rules() not working with update_option_{$option}

flush_rewrite_rules() should be called very early within the WordPress initialization. The reason is that the entpoints cannot be changed afterwards. A solution could look like this: function updateMySlugOption($old_value, $value, $option) { if( $old_value != $value ) { set_transient(‘update_slugs’, 1); } } add_action( ‘update_option_mySlug’, ‘updateMySlugOption’, 10, 3); function update_slugs() { if( get_transient(‘update_slugs’) ) { flush_rewrite_rules(); delete_transient(‘update_slugs’); … Read more

Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme

The filter hook you’re using is theme_<post type>_templates, which means that the <post type> part is dynamic and it’s the post type in which you want the custom template be added to the Template dropdown. So since the template is enabled for three post types, you would do so to add the template to the … Read more