Automatically set full size for all my images in all my post and page?

You can use the_content filter to filter all post content and replace img sources. add_filter( ‘the_content’, ‘show_full_sized_images’ ); /** * Replaces all -600×999 images with full image url * @param string $content * @return string */ function show_full_sized_images( $content ) { $pattern = ‘~(http[^\'”]*)(-600x[0-9]{2,4})(\.jpe?g|png|gif)~i’; $m = preg_match_all( $pattern, $content, $matches ); echo ‘<pre>’ . esc_html( … Read more

List sub pages with custom field content converting image ID to URL

I ended up with this <?php //get children of page 241 and display with custom fields $args=array( ‘post_parent’ => 825, ‘post_type’ => ‘page’, ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php $img = wp_get_attachment_image_src( get_post_meta($post->ID, ‘product_logo’, true)); ?> <?php $alt_text_for_logo = get_post_meta($post->ID, ‘alt_text_for_logo’, true); ?> … Read more

Show images from TEXT section on PAGE wordpress

I’m not sure I 100% grasp what you’re trying to do, but I believe using WordPress’ default Gallery shortcode is what you want. When you insert an image into the content using the “Add Media” button, you can create a gallery and say how many columns you want the gallery to be. If mark-up doesn’t … Read more

Can’t figure out how to get space around an image? [closed]

If for just this image, you can edit that post and in text editing mode you could add something like this around the link to the image: <span style=”float:left;padding:10px;”> …<img>image link here… </span> If you are looking to fix this for any image that is added to posts, you’d need to add a rule similar … Read more

WPML – Change media uploader language

I am french too, but I must answer in English. You need to use wp_localize_script(), that allow to handle localization in js scripts. add_action(‘wp_enqueue_scripts’, ‘load_script’); function load_script(){ wp_register_script( ‘popup’, plugins_url(‘yourscript/js/yourjs.js’), array( ‘jquery’ ), false, true ); wp_localize_script( ‘popup’, ‘popUp’, array( ‘popupTitle’=> __(”, ‘your-text-domain) ) ); wp_enqueue_script(‘popup’); } In the js file, you will able to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)