wpdb prepare insert table doesn’t work

I’m pretty sure that first SQL query isn’t correct SQL (insert has different syntax) 😉 It should be: INSERT INTO {$wpdb->prefix}awpcp_adphotos (ad_id, image_name, disabled, isprimary) VALUES (%d, %s, %d,%d) In second example, I’m almost sure that ad_id is not string, and image_name is not a number. Of cours I’m only guessing, because I haven’t seen … Read more

meta box not display data input in the textarea

Ok, you do have a typo : add_action(‘save_post’, ‘vs_save_custom_meta’); should be : add_action(‘save_post’, ‘vs_save_excerpt_meta’); So you meta box does not have a valid callback. Change this and it will work ^^

Deleting Certain terms from appearing on the front end as links

The function get_terms has a convenient $args parameter which allows you to customize your query to meet your needs; in your case, it would be something as simple as: $args = array( ‘exclude’ => array(1,2,3) ); $terms = get_terms(“testimonial_category”, $args); The array to exclude must contain the category ids of the categories you wish to … Read more

Javascript not loading on certain page

Looks like it is your if statement possibly. It’s kind of tricky to say “if it’s not this or if it’s not that, then I want this to happen”. Normally you have to negate and change the operator. Try <?php if (!is_home() && !is_front_page()) { ?> This says “I want this to run on every … Read more

How to integrate noimage picture in this code

Change this: else if ($widget[“image_from”] == “custom”) { $post_custom_id = get_post_meta($row->post_id, $widget[“image_custom”], true); $row->image = get_bloginfo(‘url’).”/scripts/timthumb.php?src=”https://wordpress.stackexchange.com/questions/106998/.get_bloginfo(“url’).”/wp-content/uploads/”.get_post_meta($post_custom_id,”_wp_attached_file”,true).”&amp;h=70&amp;w=55&amp;zc=1″; } To this: } else if ( ‘custom’ == $widget[‘image_from’] ) { $post_custom_id = get_post_meta( $row->post_id, $widget[‘image_custom’], true ); if ( get_post_meta( $post_custom_id, ‘_wp_attached_file’, true ) ) $row->image = get_bloginfo(‘url’) . ‘/scripts/timthumb.php?src=”https://wordpress.stackexchange.com/questions/106998/. get_bloginfo(“url’) . ‘/wp-content/uploads/’ . get_post_meta( $post_custom_id, ‘_wp_attached_file’, … Read more

Could use some help with Shortcodes

First of all… It’s a really poor quality code, I guess. You assume that there will be only one tabs widget on page (it’s recognized by HTML id param, so placing 2 widgets on same page would generate invalid HTML code). You also implement only one shortcode, which parses it’s content. But I don’t think … Read more

Don’t show certain div on front page?

I think japanworm do not want it on the frontpage, the code above let’s it display only on the frontpage. You can exclude something (if not) by putting an ! before the tag. What you want to say is: If it isn’t front page than display the form So it would actually be <?php if( … Read more