{"id":134,"date":"2011-08-22T11:53:12","date_gmt":"2011-08-22T11:53:12","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=134"},"modified":"2011-08-22T12:01:29","modified_gmt":"2011-08-22T12:01:29","slug":"install-favicon-into-a-wordpress-website","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/install-favicon-into-a-wordpress-website\/","title":{"rendered":"Install Favicon into a WordPress website"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"25\" data-permalink=\"https:\/\/pixert.com\/blog\/how-to-upgrade-wordpress\/wordpresslogo\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" data-orig-size=\"498,113\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"WordPress &amp;#8211; the logo\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?fit=498%2C113&amp;ssl=1\" class=\"aligncenter size-medium wp-image-25\" title=\"WordPress - the logo\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=300%2C68\" alt=\"\" width=\"300\" height=\"68\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?resize=300%2C68&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo.png?w=498&amp;ssl=1 498w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>1. Upload favicon.ico to the theme directory, e.g wp-content\/themes\/twentyeleven<\/p>\n<p>2. Open file header.php, add the following code between &lt;head&gt; and &lt;\/head&gt;<\/p>\n<pre class=\"brush: php; title: Code Block; notranslate\" title=\"Code Block\">&lt;link rel=&quot;shortcut icon&quot; href=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;\/favicon.ico&quot; \/&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. Upload favicon.ico to the theme directory, e.g wp-content\/themes\/twentyeleven 2. Open file header.php, add the following code between &lt;head&gt; and &lt;\/head&gt; &lt;link rel=&quot;shortcut icon&quot; href=&quot;&lt;?php bloginfo(&#8216;stylesheet_directory&#8217;); ?&gt;\/favicon.ico&quot; \/&gt;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[54,5],"tags":[55,6,7],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-wordpress","tag-code-snippet-2","tag-wordpress-2","tag-wp"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-2a","jetpack-related-posts":[{"id":230,"url":"https:\/\/pixert.com\/blog\/disable-all-shortcodes-from-post-content\/","url_meta":{"origin":134,"position":0},"title":"WordPress: Disable All Shortcodes from the_content","author":"Pixel Insert \/ Pixert","date":"May 31, 2012","format":false,"excerpt":"The following code snippet will remove ALL shortcodes from the_content Add the following code snippet to the functions.php of your theme [php] function remove_shortcode_from_index($content) { $content = strip_shortcodes($content); return $content; } add_filter('the_content', 'remove_shortcode_from_index'); [\/php] You can disable shortcodes from particular page, e.g Home Page [php] function remove_shortcode_from_index($content) { if (\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":100,"url":"https:\/\/pixert.com\/blog\/wordpress-automatic-feed-links\/","url_meta":{"origin":134,"position":1},"title":"WordPress: Automatic Feed Links","author":"Pixel Insert \/ Pixert","date":"May 11, 2011","format":false,"excerpt":"WP themes usually have the following code in header.php [php] <link rel=\"alternate\" type=\"application\/rss+xml\" title=\"RSS 2.0\" href=\"<?php bloginfo('rss2_url'); ?>\" \/> <link rel=\"alternate\" type=\"text\/xml\" title=\"RSS .92\" href=\"<?php bloginfo('rss_url'); ?>\" \/> <link rel=\"alternate\" type=\"application\/atom+xml\" title=\"Atom 0.3\" href=\"<?php bloginfo('atom_url'); ?>\" \/ [\/php] Remove above when you are using the following code [php] add_theme_support('automatic-feed-links'); [\/php]\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":101,"url":"https:\/\/pixert.com\/blog\/wordpress-click-an-attachment-image-to-view-next-image-in-order\/","url_meta":{"origin":134,"position":2},"title":"WordPress: Click an attachment image to view next image in order","author":"Pixel Insert \/ Pixert","date":"May 8, 2011","format":false,"excerpt":"Add the following to the top of attachment.php [php] <?php \/\/ code copied from adjacent_image_link() in wp-include\/media.php $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') )); foreach ( $attachments as $k => $attachment ) if (\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":208,"url":"https:\/\/pixert.com\/blog\/how-to-add-a-wordpress-shortcode-outside-post-editor-php-template\/","url_meta":{"origin":134,"position":3},"title":"How to add a WordPress shortcode outside of the post editor or  PHP templates","author":"Pixel Insert \/ Pixert","date":"March 13, 2012","format":false,"excerpt":"Shortcodes were introduced back in WordPress 2.5. Shortcodes are for creating macros to be use in a posts. For instance, the following shortcode (in the post\/page content) would add a photo gallery into the page: [ \u00a0gallery \u00a0] If you want to use that shortcode outside of the WordPress post\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":102,"url":"https:\/\/pixert.com\/blog\/hide-the-wordpress-version-you-are-running\/","url_meta":{"origin":134,"position":4},"title":"Hide the WordPress version you are running","author":"Pixel Insert \/ Pixert","date":"May 17, 2011","format":false,"excerpt":"If you are running an old WordPress version with known vulnerabilities, it is unwise to display this information to the public. Why not simply hide the WordPress version entirely? Add the following to functions.php [php] <?php function pixert_remove_version() { return ''; } add_filter('the_generator', 'pixert_remove_version'); ?> [\/php] or [php] <?php remove_action('wp_head',\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":127,"url":"https:\/\/pixert.com\/blog\/wordpress-sorry-this-file-type-is-not-permitted-for-security-reasons\/","url_meta":{"origin":134,"position":5},"title":"WordPress: Sorry, this file type is not permitted for security reasons.","author":"Pixel Insert \/ Pixert","date":"July 22, 2011","format":false,"excerpt":"Add the following code snippet to functions.php. Change 'filetype' to the file type that is not permitted for security reasons [php] add_filter('upload_mimes', 'custom_upload_mimes'); function custom_upload_mimes ( $existing_mimes=array() ) { \/\/ add the file extension to the array $existing_mimes['filetype'] = 'mime\/type'; \/\/ call the modified list of extensions return $existing_mimes; }\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2011\/03\/wordpresslogo-300x68.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}