There’s some way to add a wrapper around posted images?

The image_send_to_editor hook passes a whole range of parameters, not just the html. One of them is the size. To get it, hook your filter passing an 8 as the number of supported parameters: add_filter(‘image_send_to_editor’, ‘my_filter_cb’), 10, 8); and modify your function header to grab them all: function my_filter_cb ($html, $id, $caption, $title, $align, $url, … Read more

Styling readme.html in plugin?

It would be better to include your own CSS file that way you can: Use a relative path to your CSS. Avoid problems getting the path right to the wp-admin directory. Not all people put WordPress in the root directory, so your example above would break for them. Possibly redundancy by reusing the CSS in … Read more

How to Make a Custom Grid View

It’s not that difficult at all its simply styling you category loop in to a table something like this: <table> <tr> <th>Photo</th><th>Item Brand, Model</th><th>Description</th><th>PSI</th><th>GPM</th><th>RPM</th><th>HP</th><th>Stock No.</th> </tr> <?php while (have_posts()){ the_post(); ?> <tr> <td> <?php if(has_post_thumbnail()) { the_post_thumbnail(); } else { echo ‘<img src=”‘.get_bloginfo(“template_url”).’/images/img-default.png” />’; } ?> </td> <td> <a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a> </td> … Read more

WordPress Custom Application form

Although a premium plugin, I would like to suggest Gravity Forms (aff link). Due to conditional logic you can easily adapt the form to be(come) an application form instead of the usual contact form.

Counting pageviews on high-traffic cached sites

It really depends what you need to view counts for – if it’s just for seeing traffic stats, then use Google Analytics or any number of javascript tracker based analytics tools. If you need integration of page view counts and the ability to do things like order post by views, then you can either spend … Read more

Custom routing for plugins

The WordPress Way of doing it is using query_vars so first you add you vars to the array: //add to query vars function add_query_vars($vars) { $new_vars = array(‘custom_method’,’cm_parameter’); $vars = $new_vars + $vars; return $vars; } add_filter(‘query_vars’, ‘add_query_vars’); then you can check in your plugin for the vars: global $wp; if (array_key_exists(‘custom_method’, $wp->query_vars) && isset($wp->query_vars[‘custom_method’])){ … Read more