Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

For plugins it is: $plugin_url = plugin_dir_url( __FILE__ ); This works even if wp-content is on a separate domain. You may get problems if your class is in a subdirectory of the plugin – you should probably make the __FILE__ a parameter for a function: public function get_plugin_url( $base = __FILE__ ) { return plugin_dir_url( … Read more

Custom meta box includes

Debugging in WordPress The following could/should be set in the wp-config.php file of your local(!!) installation – never do this on a live site, especially not when you got caching activated! define( ‘WP_CACHE’, false ); // Show the development files for scripts/stylesheets and don’t combine them define( ‘COMPRESS_CSS’, false ); define( ‘SCRIPT_DEBUG’, true ); define( … Read more

WordPress blog set up

It sounds like you should be looking into WordPress multisite. Multisite is a way to run multiple sites on a single installation of WordPress. WordPress.com is an example. One big advantage of multisite is that it runs off a single set of plugins and themes. That means you can allow separate users/authors to only have … Read more

post content includes and seo vs. duplicate content

If the resources and the products are accessible on different unique URLs, but those pages shown the same content in certain areas, it could definitely be flagged as duplicate content. Sometimes you can’t avoid duplicate content. An example, to stay on the WordPress topic, is when you have blog posts, and category pages that list … Read more

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