Adding a Tag Parameter / Filter to My Shortcode

That plugin you have is not using the WordPress Shortcode API as it should be. There is not a single add_shortcode to be found. It has basically cooked up its own shortcode ‘feature’ by hooking a preg_replace_calback into the_content define(“categoryThumbnailList_REGEXP”, “/\[categorythumbnaillist ([[:print:]]+)\]/”); define(“categoryThumbnailList_TARGET”, “###CATTHMBLST###”); function categoryThumbnailList_callback($listCatId) { And: function categoryThumbnailList($content) { return (preg_replace_callback(categoryThumbnailList_REGEXP, ‘categoryThumbnailList_callback’, $content)); … Read more

Exclude function from running on a certain page

This works for a page on my site with ID 675: function tst($content) { if (is_page(675)) print(‘howdy’); } add_action(‘wp_footer’,’tst’); I would just interrupt the function right at the top. function keyboard_shortcut_navigation(){ global $paged, $wp_query; if (is_page(2020)) return; // for a post with ID 2020 if (is_page(‘2020’)) return; // for a post with slug or title … Read more

Does WordPress has an automatic link parse function?

There is make_clickable which is applied as a filter on comment_text but not on post/page content. You could add it as a filter with… add_filter(‘the_content’,’make_clickable’); Untested. I have not idea how well that will behave. There may or may not be conflicts with already defined URLs, or other markup. I haven’t investigated that. Be aware.

Function to add custom HTML into head in custom post-type list page

If its okey you can hook into admin_notices. Like this: Change post_type to the real post_type name.. I assumed it would be “program”. function wpse_76471_add_html() { global $pagenow ,$post; if( $post->post_type == ‘program’ && $pagenow == ‘edit.php’ ) { $output=”<div class=”my-div”>”; $output .= ‘<h2>’. __(‘My custom content (HTML/PHP)’, ‘program’) .'</h2>’; $output .= ‘</div>’; echo $output; … Read more

wp_get_archives() output

The date.php, archive.php, and index.php files control the date archive output. You need to check the contents of those files, in respective order, to find the problem. If WordPress can’t find date.php, it will check for archive.php, and load that if found. Otherwise, index.php will be used to display date archives. See my answer on … Read more