Finding URI in Child Theme

Yes, stylesheet is for child themes, template for parent themes. Andrew Nacin has explained that recently on wp-hackers: child themes were originally just style.css and functions.php. That’s why “template” refers to the parent theme and “stylesheet” refers to the child theme.

How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?

Answered from this thread. Summary: The .htaccess redirect for www/non-www… # www redirect RewriteCond %{HTTP_HOST} ^subdomain.com RewriteRule ^(.*)$ http://www.subdomain.com/$1 [R=301,L] Put it ABOVE your WordPress rules on domain.com. Should work. Example: RewriteEngine On # DOMAIN #1 – Redirect non-www urls to www RewriteCond %{HTTP_HOST} ^domain1.com RewriteRule ^(.*)$ http://www.domain1.com/$1 [R=301,L] # DOMAIN #2 – Redirect non-www … Read more

Using variable to display a page with a different stylesheet

if the url is www.example.com/page?style=alt, you can conditionally check the presence of $_GET[‘style’] when you’re including your styles. Add the following where you are enqueueing your syles(probably in functions.php): if(isset($_GET[‘style’]) && $_GET[‘style’]==’alt’){ wp_enqueue_script(‘alternate_style); else{ wp_enqueue_script(‘normal_style); }

Redirect Old wordpress url to new wordpress url

Maybe you could use an .htaccess rule to manage that, but i don’t know if WordPress handles that. It would have to be something like Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html More info at: How do I redirect my site using a .htaccess file

Replace video url with video player

There appear to be a few problems with your plugin as written. As mentioned in the comments above, WordPress has the built-in ability to automatically embed certain types of media, including YouTube videos, given a URL. See the Codex page on Embeds. So it’s likely that your plugin isn’t necessary, at least for a YouTube … Read more

How can I insert a dynamic URL in my email template?

I have no experience with this plugin, but it looks like you can add extra template variables with a filter named ‘wpbe_tags’: function template_vars_replacement( $template ) { $to_replace = array( ‘blog_url’ => get_option(‘siteurl’), ‘home_url’ => get_option(‘home’), ‘blog_name’ => get_option(‘blogname’), ‘blog_description’ => get_option(‘blogdescription’), ‘admin_email’ => get_option(‘admin_email’), ‘date’ => date_i18n(get_option(‘date_format’)), ‘time’ => date_i18n(get_option(‘time_format’)) ); $to_replace = apply_filters(‘wpbe_tags’, … Read more

Get logged in username in wordpress url

I think this will do what you are looking for. add_action(“template_redirect”, ‘template_redirect’); function template_redirect() { global $wp; if(is_user_logged_in() && !isset($_GET[‘user’])){ $current_user= get_userdata(get_current_user_id()); wp_redirect(add_query_arg(array(‘user’=>$current_user->user_login),home_url($wp->request))); die(); } }

Inserting Media to WordPress Posts

If you use “Insert by URL” the image is loaded from whatever URL your provide. It is not uploaded to your server at all, nor is any information added to the postmeta table as far as I can tell. It seems to be equivalent to simple hand-writing the HTML into the post body. You can … Read more

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