Any way to use a custom Parameter for youtube embed without using an iframe?

No need for a plugin, You can simply use the Oembed class’s oembed_result filter hook like this: function Oembed_youtube_no_title($html,$url,$args){ $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $id); if (isset($id[‘v’])) { return ‘<iframe width=”‘.$args[‘width’].'” height=”‘.$args[‘height’].'” src=”http://www.youtube.com/embed/’.$id[‘v’].’?rel=0&showinfo=0″ frameborder=”0″ allowfullscreen></iframe>’; } return $html; } add_filter(‘oembed_result’,’Oembed_youtube_no_title’,10,3); so just paste this code in your theme’s functions.php file, setup the width and height … Read more

How to Use the Function is_user_logged_in To Display Different Menus?

i just did this for a site i am working on. first i registered 2 menus in functions.php: add_action(‘init’,’kia_menus’); function kia_menus(){ register_nav_menus( array(‘primary-menu’ => __( ‘Primary Menu for Logged In Users’, ‘kia_theme’ ), ‘primary-loggedout’ => __( ‘Primary Menu for Logged Out Visitors’, ‘kia_theme’) )); } and then where i want the 1 menu to appear … Read more

Automatically wrap post image in div

It’s the image_send_to_editor filter: if(is_admin()){ add_filter(‘image_send_to_editor’, ‘wrap_my_div’, 10, 8); function wrap_my_div($html, $id, $caption, $title, $align, $url, $size, $alt){ return ‘<div class=”mydiv” id=”mydiv-‘.$id.'”>’.$html.'</div>’; } } For existing images/posts you can try the regex in the function below

WordPress in “Couch Mode”?

Here’s a method to achieve what you want internally without adding anything to the .htaccess file. It works by adding a rewrite endpoint named read, so any single post permalink with read appended to the end will have a different single post template applied. For example, if your normal single post permalink is: localhost/techylab/some-post-title/ The … Read more

Any Hook Called When Post Becomes Published?

Every time a post changes status, wp_transition_post_status function will be called. This triggers the actions ${old_status}_to_${new_status} and ${new_status}_${post->post_type}, so for example publish_post will be triggered here. A post with a date in the future will have the status future until it is actually published, so this should work for you.

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