{"id":224,"date":"2012-04-24T14:24:42","date_gmt":"2012-04-24T14:24:42","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=224"},"modified":"2012-04-24T14:24:42","modified_gmt":"2012-04-24T14:24:42","slug":"remove-podpress-code-from-the-excerpt","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/remove-podpress-code-from-the-excerpt\/","title":{"rendered":"WordPress : Remove Podpress code from the_excerpt"},"content":{"rendered":"<p>Add the following to functions.php<\/p>\n<pre class=\"brush: php; title: Code Block; notranslate\" title=\"Code Block\">\r\nadd_action('pre_get_posts', 'remove_podpress_from_automatic_excerpts');\r\nfunction remove_podpress_from_automatic_excerpts() {\r\n\t\/* This function removes podPress elements from post content on the homepage of the blog. It helps especially if the home page shows only excerpts of the posts.*\/\r\n\tif ( is_home() ) {\r\n\t\tglobal $podPress;\r\n\t\tif ( TRUE=== isset($podPress) AND TRUE === is_object($podPress) ) {\r\n\t\t\tremove_filter('the_content', array(&amp;$podPress, 'insert_content'));\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add the following to functions.php add_action(&#8216;pre_get_posts&#8217;, &#8216;remove_podpress_from_automatic_excerpts&#8217;); function remove_podpress_from_automatic_excerpts() { \/* This function removes podPress elements from post content on the homepage of the blog. It helps especially if the home page shows only excerpts of the posts.*\/ if ( is_home() ) { global $podPress; if ( TRUE=== isset($podPress) AND TRUE === is_object($podPress) ) { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":""},"categories":[54,5],"tags":[55,99,98,6,7],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-code-snippet","category-wordpress","tag-code-snippet-2","tag-excerpt","tag-podpress","tag-wordpress-2","tag-wp"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-3C","jetpack-related-posts":[{"id":326,"url":"https:\/\/pixert.com\/blog\/wordpress-how-to-hide-custom-fields-meta-key-from-custom-fields-panel\/","url_meta":{"origin":224,"position":0},"title":"WordPress: How to Hide Custom Field Meta Key from Custom Fields panel","author":"Pixel Insert \/ Pixert","date":"October 31, 2013","format":false,"excerpt":"I learned this trick when someone asked about How to Hide Custom Fields Meta Key from Custom Fields panel. This trick useful when you want to hide certain Custom Fields Meta Key and Value from client or authors Add following code to functions.php [php] add_filter('is_protected_meta', 'my_is_protected_meta_filter1', 10, 2); function my_is_protected_meta_filter1($protected,\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\/2013\/10\/customfields.png?fit=810%2C300&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/10\/customfields.png?fit=810%2C300&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/10\/customfields.png?fit=810%2C300&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/10\/customfields.png?fit=810%2C300&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":230,"url":"https:\/\/pixert.com\/blog\/disable-all-shortcodes-from-post-content\/","url_meta":{"origin":224,"position":1},"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":217,"url":"https:\/\/pixert.com\/blog\/how-to-center-marker-pronamic-google-maps-plugin-wordpress\/","url_meta":{"origin":224,"position":2},"title":"How to center marker with Pronamic Google Maps plugin for WordPress","author":"Pixel Insert \/ Pixert","date":"March 26, 2012","format":false,"excerpt":"We have World map viewed as default map when Google Maps loaded in the website, now we want to make marker centered on the map. \u00a0Put the following JavaScript code snippet below Google Maps mashup code\u00a0 [php] jQuery(document).ready(function($) { \/\/ Mashup jQuery(\".pgmm\").bind(\"pronamic-google-maps-ready\", function(event, map){ map.setCenter(new google.maps.LatLng(latitude, longitude)); }); }); [\/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":"","width":0,"height":0},"classes":[]},{"id":127,"url":"https:\/\/pixert.com\/blog\/wordpress-sorry-this-file-type-is-not-permitted-for-security-reasons\/","url_meta":{"origin":224,"position":3},"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":[]},{"id":102,"url":"https:\/\/pixert.com\/blog\/hide-the-wordpress-version-you-are-running\/","url_meta":{"origin":224,"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":268,"url":"https:\/\/pixert.com\/blog\/wordpress-limit-post\/","url_meta":{"origin":224,"position":5},"title":"WordPress Limit Post","author":"Pixel Insert \/ Pixert","date":"November 30, 2012","format":false,"excerpt":"This function controls the maximum\u00a0amount of characters displayed for an entry on the main page. If the set limit is surpassed, the text on the entry will be chopped\u00a0to that amount of characters, otherwise the content will be showed unchanged. Add following code to functions.php in your theme folder [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":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/224","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=224"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}