click on Gallery picture but pictures doesn’t appear

Following are the two errors at console Failed to load resource: the http://www.jeremyscircle.org/favicon.ico server responded with a status of 404 (Not Found) Failed to load resource: the http://www.jeremyscircle.org/en_US/gallery/ server responded with a status of 500 (Internal Server Error) Failed to load resource: the server responded with a status of 500 (Internal Server Error) The 500 … Read more

How to get attachements URL from author meta and display them?

I found it 😀 Yeeeeeeeeaaaahhhhhh :)))) This is final code that worked! I explained each level 😉 /* for get author ID use these */ $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); $author_id = get_the_author_meta(‘ID’); /* First condition */ if( get_the_author_meta(‘management_certi’, $author_id, true)) { /* get file ID */ $id = get_user_meta( $author_id, ‘management_certi’); … Read more

How can I alternate styling of images in a post? [closed]

Florian’s answer is probably your best bet because it gives the author the most control as to how the images are aligned so that would be my first answer. However, if you don’t trust your authors to align the images themselves then we’ll have to go another route. Unfortunately for the reasons you stated above, … Read more

Is there any hook to change media html in post? [duplicate]

Try adding this to your functions.php – it will wrap the image in the div you want. function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) { return ‘<div class=”post-page-image” id=”image-‘.$id.'”>’.$html.'</div>’; } add_filter(‘image_send_to_editor’, ‘filter_image_send_to_editor’, 10, 8);

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