Filter to strip unnecessary attributes

To make it more clear: (From the comments on the question) Q: The “output” or “HTML” of which function exactly? A: Any. I’d like these attributes removed from my whole theme. WP & Functions: WordPress has around 2.5k functions with the current version 3.4.2. Now imagine, that we would (or even could) check each function … Read more

How can I add authors to my blog pages?

Add some more authors in wp-admin, and if You would like to show author under a post, place: <?php the_author(); ?> in index.php, single.php or any other template file, that Your theme is using to show blog posts, single post, archive etc.

new to javascript – using in instead of functions.php, not loading correctly

Start by putting your JS in an appropriate .js file in your theme directory. Use the wp_enqueue_scripts hook (this is where you will enqueue/load any of your custom javascripts). Within that hook, use wp_enqueue_script() to load your script(s). Example: add_action( ‘wp_enqueue_scripts’, ‘enqueue_my_stuff’ ); function enqueue_my_stuff () { wp_enqueue_script(‘slug_for_your_script’ , get_template_directory_uri() . ‘/path/to/yourscripts.js’, array(‘jquery’) ); }

Integrating CSS Into a WP Function Call [closed]

Apart from the fact, that the conditional is based on a WordPress option, this is pure PHP, but anyhoo: <?php $show_views = get_option( ‘to_post_views’ ); if ( ‘Yes’ === $show_views ) { echo ‘<div class=”postviews”>’ . getPostViews( get_the_ID() ) . ‘</div>’; } ?>

Image width issue in IE [closed]

The issue was related to width: 100%; being applied by WordPress to all images. The code below fixes this issue – i applied this only to IE 8 and lower, as these are the browsers that have issues with the code. img.size-full, img.size-large, img.header-image, img.wp-post-image { max-width: none !important; }

Ajax calls in wordpress

your ajax url is wrong i think. ajax link should be admin_url( ‘admin-ajax.php’ ). That means wp_localize_script(‘history_script’, ‘myAjax’, array(‘ajaxurl’ => get_template_directory_uri().’/functions.php’)); will be this wp_localize_script(‘history_script’, ‘myAjax’, array(‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ));

Call a function with href

You can echo the return value of a function: <a href=”https://wordpress.stackexchange.com/questions/102196/<?php echo plugin_function(); ?>”> But without seeing the actual function, there is no way to give a more specific answer.