Uploading Full Size Image vs Resizing Before Upload

If your server has the right libraries the images are resized on upload so the public facing load time should not suffer. You can add image sizes with add_image_size and retrieve those specialize sizes with functions like get_the_post_thumbnail or get_attachment_image_src, among others. There are also a lot of post here about image sizes. You may … Read more

Inserting into data into external DB using WPDB

You are using $wpdb incorrectly Take a look at these lines: $row = $newdb->get_results(“SELECT * FROM chi_clients WHERE accountNum=’$acctNum'”,ARRAY_A); $name= $row[‘lastName’] . “, ” . $row[‘firstName’]; $wpdb->get_results is going to return an array of “rows”. It is going to multidimensional. You are treating it like it has returned a one-dimensional array. That is, this (completely … Read more

featured images – custom links

Look at the specified link within the featured-image in the last part of your snippet. You’ll have to update the_permalink() with your custom link, too: <div class=”featured-image”> <a href=”https://wordpress.stackexchange.com/questions/106791/<?php echo esc_url( $more_link ); ?>”><?php print_thumbnail( $thumb, $thumbnail[“use_timthumb”], $title, $width, $height, ” ); ?></a> </div> <!– .featured-image –>

Add Metabox to all custom post types

The 4th parameter for add_meta_box() is the post_type. So if you’re calling it with post, it’ll only show on WordPress’s native posts. Try this: add_meta_box( ‘my-meta-box-id2’, ‘Enter your PDF location for your post category below:’, ‘cd2_meta_box_cb’, ‘your_custom_post_type_name’, ‘normal’, ‘high’ ); If you have multiple post types you’d like to attach this to, this should work: … Read more

Need to change contact email depending where user is from

Your themes functions.php is the first file that gets loaded after wordpress, it loads on every page load so you can get a variable with it. You could create a function similar to so and put it in your functions.php of your theme: global $fromwhere; if(isset($_GET[‘from’]) and $_GET[‘from’] == ‘columbiansite’){ global $fromwhere; $fromwhere=”columbia”; } you … Read more