Show prev and next post links for parent post of current image in attachment page?
Show prev and next post links for parent post of current image in attachment page?
Show prev and next post links for parent post of current image in attachment page?
You can move the uploads folder to the sub domain by doing this Open up your wp-config.php file, located at the root of your WordPress installation, and add the following code: define(‘UPLOADS’, ‘http://images.mydomain.com/uploads’); The codex specifies that it should be added before the line that says require_once(ABSPATH.’wp-settings.php’);. Make sure the uploads folder is writable.
I’m running WordPress 3.5.2. The following is an excerpt from my functions.php file, which correctly allows me to select a thumbnail size when I upload an image. // Basic setup for thumbnail support. function themeSetup() { add_theme_support(‘post-thumbnails’); add_image_size(‘tiny’, 128, 79); add_image_size(‘small’, 256, 158); add_image_size(‘medium’, 384, 237); add_image_size(‘large’, 512, 316); } add_action(‘after_setup_theme’, ‘themeSetup’); // Addes custom … Read more
You are asking to load the next page but it doesn’t make sense to load the entire page if all you want is the image. The following will do just that. The HTML At a minimum add a wrapper div to isolate the image we want to replace and so it’s possible to search in … Read more
Since the major adoption of Responsive Images and the addition of new srcset attribute to the <img> element. WordPress has to evolve too. WordPress 4.4 added the responsive images feature. If you inspect the src attribute it might point to the CDN, however, you still need to consider the srcset attribute which might still be … Read more
I have found the problem. Problem was in a .js file. This code is causing the problem : $et_contact_form.live(‘submit’, function() { et_contact_error = false; et_message=”<ul>”; $et_inputs.removeClass(‘et_contact_error’); $et_inputs.each(function(index, domEle){ if ( jQuery(domEle).val() === ” || jQuery(domEle).val() === jQuery(this).siblings(‘label’).text() ) { jQuery(domEle).addClass(‘et_contact_error’); et_contact_error = true; var default_value = jQuery(this).siblings(‘label’).text(); if ( default_value == ” ) default_value = … Read more
Don’t use a relative URL. If you look at the source you are probably trying to load the image from http://sitename.com/images/ when what you likely want is http://sitename.com/wp-content/themes/themename/images/. Assuming the image is in the theme directory in a folder that shares a directory with style.css, do this: <img id=”topL” src=”https://wordpress.stackexchange.com/questions/78271/<?php echo get_stylesheet_directory_uri(); ?>/images/img01.png”/> http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri
Try this first Make sure that the post in question has its Featured Image (formerly Post Thumbnail) set. Then… Going by our comment thread, here’s something else to try. function gangmei_get_the_post_thumbnail_url($post_id = NULL) { /* * global $id; * $post_id = (NULL === $post_id) ? $id : $post_id; * $src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), ‘full’); * $src … Read more
How About you try this code for your attachment $uploaded_file = wp_handle_upload( $file, $upload_overrides ); $attachment = array( ‘post_mime_type’ => $uploaded_file[‘type’], ‘post_title’ => preg_replace(‘/\.[^.]+$/’, ”, basename( $uploaded_file[‘file’] ) ), ‘post_content’ => ”, ‘post_author’ => ”, ‘post_status’ => ‘inherit’, ‘post_type’ => ‘attachment’, ‘post_parent’ => $new_reseller_id, ‘guid’ => $uploaded_file[‘file’] ); $attachment_id = wp_insert_attachment( $attachment, $uploaded_file[‘file’] ); $attach_data … Read more
You will need to paste your code in order for us to review where the issue is, however, I can demonstrate how I accomplish this in WordPress v3.5 Please observe the comments in my_insert_custom_image_sizes: function my_insert_custom_image_sizes( $sizes ) { // get the custom image sizes global $_wp_additional_image_sizes; // if there are none, just return the … Read more