numberposts? showposts? posts_per_page?

In my opinion, deprecating numberposts would not make sense, as numberposts is used to query x amount of posts, whilst posts_per_page is used to denote how many posts per page are being shown during pagination. If you were to deprecate numberposts in favor of simply posts_per_page, then pagination would not exist. ie: “numberposts” => 50, … Read more

is_plugin_active function doesn’t exist

That’s because the file in which is_plugin_active() is defined – wp-admin/includes/plugin.php – is only loaded in the admin, after your plugin is loaded. Thus, you can only call it after ‘admin_init’ has fired: function check_some_other_plugin() { if ( is_plugin_active(‘some-plugin.php’) ) { … } } add_action( ‘admin_init’, ‘check_some_other_plugin’ );

Where are Additional CSS files stored

It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug. There you also have the related customize_changeset and revision post types. The custom css post ID is also stored in the wp_options table under each theme mods, e.g. theme_mods_twentysixteen for Twenty Sixteen. It’s … Read more

Why have on every line

This is not recommended in any WordPress style guide, and I think it is a bad coding style. Beginners are using this style, maybe because it feels more like HTML … Unfortunately, the default themes are using this style way too often, so some beginners might think it is part of a code style. One … Read more

What SQL Query to do a simple find and replace

The table where your URL is saved is wp_options. You should do an update on the columns that use the URL for your site: UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “siteurl” UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “home” I might be missing some value, but … Read more

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