Different permissions for same type of post

The simplest way is to create two custom post types. One will be “news” and one will be “whats-new”. So for example, you could create a plugin in /wp-content/plugins/ called news-post-types.php. The code below will create special permissions that only apply to this post type: <?php /* Plugin Name: Post types and permissions for News … Read more

Function not working inside of a function in functions.php

Remove the function inside the function, and instead call the wp_register_script and register_block_type inside the large function. Finally, remove the inner add_action() call, so you only have the ending one for the large function. function irm_lockdown_author_role() { if (isset($userrole->roles[0])) { $current_role = $userrole->roles[0]; } else { $current_role=”no_role”; } if (‘author’ == $current_role) { /* function … Read more

Which wordpress should be obligatory writeable?

There is no definitive answer to this, but I’d like to share my 2 cents anyways. In practice, many plugins write to custom folders in ./wp-content/. Just checking one client site I see 6 custom folders in there (e.g. from security, backup, caching plugins, etc.). Some themes and plugins may even expect that they are … Read more

Privilege escalation bugs in 2.9?

There are no known security vulnerabilities in 2.9.2 If any new vulnerabilities are discovered the fix will be packported. (This has not happened but if it did we would get a version 2.9.3) WordPress does not have a backport policy that goes further than the previous major release so it is unknown when the 2.9 … Read more

What is this error message?

If you already have the files sitemap.xml and (if you have gzip enabled in Simple Google Sitemap) sitemap.xml.gz in the root directory of your WordPress installation, try deleting them and create new empty files with the correct permissions for that plugin, then manually run the sitemap generator. If these files don’t exist, try creating the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)