Change the output for [gallery] shortcode

The source for the gallery shortcode is in wp-includes/media.php. There are a couple of hooks in there that might work for you. Without knowing exactly what you want to do, it is impossible to be more specific. If that doesn’t work then you can remove the shortcode: remove_shortcode(‘gallery’); And add another gallery shortcode with the … Read more

stop blog page from using index.php?

Please consult the Template Hierarchy, and ensure that you are using the correct names for template files. index.php should be left as the default fallback for all other template files The site front page template file name is front-page.php. You need to rename your homepage.php as front-page.php The blog posts index page template file name … Read more

Apply template to custom post type

Typically I wouldn’t follow such a strong answer like the one @Milo provided with a post like this. Since I already had this code written for another project I thought I’d share. The code below does everything @Milo summarized in his answer and I’ve ported this across projects before with great success. Here’s the cheat … Read more

wp_get_attachment_image returns different image size

Handle built in sizes right I wrote a class that handles all the different stuff for built in image sizes. To redefine the built in sizes, use an extended class (the upper file in the linked source) To unset a class and skip it’s useage completely, just set w & h to 0. http://static.steffenvogel.de/wp-content/uploads/2011/07/octocat_construction.gif Click … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)