Trying to change image funtion from enlarge image to redirect to amazon website

The call to rel=”prettyPhoto” is what makes the lightbox popup the image. If you remove that the lightbox will no longer popup. Now as far as redirecting the user straight to the product page on Amazon, you need to change; href=”https://wordpress.stackexchange.com/questions/104566/<?php get_image_url(); ?>” to… href=”https://wordpress.stackexchange.com/questions/104566/your_link_to_amazon_product_page_jere” I don’t know where you are storing that link, if … Read more

Next Previous Post in wordpress with previous / next link with title?

You can do it like so, I guess: <div class=”alignleftfp”> <?php next_post_link(‘%link’, ‘<img class=”imgalign” src=”‘ . WP_CONTENT_URL . ‘/uploads/1.png” alt=”Next” /> %title’); ?> </div> <div class=”alignrightfp”> <?php previous_post_link(‘%link’, ‘%title <img class=”imgalign” src=”‘ . WP_CONTENT_URL . ‘/uploads/1.png” alt=”Next” />’); ?> </div> PS. You shouldn’t use next_post/previous_post functions – they’re deprecated. EDIT Just read the_content filter docs. … Read more

How can I tell which of my pages are single-view pages?

First off, take a look at Conditional Tags in general. I am trying to understand what the is_singular() function does. Straight from the codex: “This conditional tag checks if a singular post is being displayed, which is the case when one of the following returns true: is_single(), is_page() or is_attachment().“ What I really need to … Read more

Filter unique custom field value based on custom taxonomy category or other custom field

The filtering can be done with this function totally untested function filter_custom_fields($key=”, $terms=””, $tax=”, $selkey=”, $selval=””) { global $wpdb; $include=””; if ( $selkey && $selval && ( is_string($selval) || is_array($selval) ) ) { $include = ” AND post_id IN (” . $wpdb->prepare(“SELECT DISTINCT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value “, $selkey ); … Read more

Change out put of the_post_thumbnail in PHP

Filters are WordPress not PHP. Second, you have called the thumbnail_filter function. You hooked it to post_thumbnail_html so any time a function runs that applies that filter, like the_post_thumbnail, your function runs. If you think about that, you will see that you have a bit of a Loop there. The filter calls a function (twice) … Read more