Using add_image_size in functions.php to get original uploaded file

You can always get the url for original attachment image. I don’t see any code from you so i don’t know which one is good for you but there are lots of functions on core which will get you the original image. here are some http://codex.wordpress.org/Function_Reference/wp_get_attachment_url http://codex.wordpress.org/Function_Reference/the_post_thumbnail http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src When you scroll down bottom of the … Read more

Post type Echo code is repeating on homepage

just use the code below <?php if ( ! is_home() ) { if ( get_post_type() == ‘pretty-little-liars’ ) { echo ‘<div id=”headerimg”><img src=”http://tv-cafe.com/wp-content/uploads/2012/08/liars.png”></div>’; } if ( get_post_type() == ‘revenge’ ) { echo ‘<div id=”headerimg”><img src=”http://tv-cafe.com/wp-content/uploads/2012/08/revenge.png”></div>’; } }

WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?

You can do that within the loop using wp_get_attachment_image. Something like (not tested): //loop starts //values for get_posts ( or wp query if you prefer) $args = array( ‘post_type’ => ‘attachment’, //gets the attachments aka your images ‘numberposts’ => -1, ‘post_parent’ => $post->ID ); // some attributes you want added to each image $default_attr = … Read more

display custom post on separate page

The simplest way is to create Page (maybe call it “All Codes”). Then, you “hijack” that page’s PHP template by creating a PHP file in your theme’s directory called page-all-codes.php (note how the “all-codes” part corresponds to the slug of the Page you created). You can then use WP_Query to get a list of your … Read more

Page template that uses lightbox to display post images

You could use WordPress’ built-in Thickbox script. Just place the following code somewhere before wp_footer();: add_action( ‘wp_footer’, ‘t5_thickbox_jquery’ ); function t5_thickbox_jquery() { ?> <script> jQuery( ‘a img.size-medium, a img.attachment-thumbnail’ ) .parent() .addClass( ‘thickbox’ ) .attr( ‘rel’, ‘page’ ); </script> <?php add_thickbox(); } See this answer for more details.

Make table disappear when fields are left blank?

Probably the easiest thing to do would be to fetch the fields above your table, and assign them to variables: $anime_anname = get_post_meta($post->ID, ‘anime_anname’, true); $anime_angenre = get_post_meta($post->ID, ‘anime_angenre’, true); … Then just wrap the table in an if statement that looks like the following: if ( !empty($anime_anname) || !empty($anime_angenre) || … ) { // … Read more

Customize field names in backend profile edit page through function.php [duplicate]

What you need to look at is hooking into the user_contactmethods filter. Perhaps something along these lines: function test_new_contact(){ $user_contactmethods = array( ‘aim’ => __(‘AIM’), ‘yim’ => __(‘Yahoo IM’), ‘jabber’ => __(‘Jabber / Google Talk’), ‘twitter’ => __( ‘Enter Twitter ID’ ), ); return $user_contactmethods; } add_filter( ‘user_contactmethods’, ‘test_new_contact’ ); Note the “core” user contact … Read more