Look Through Family Tree and Find Featured Image

I don’t see anything particularly wrong with it, although I’d probably write the loop like this: $featuredImage=””; foreach ( $familyTree as $family_postid ) { if ( has_post_thumbnail( $family_postid ) ) { $featuredImage = get_the_post_thumbnail( $family_postid, ‘full’ ); break; } } A bit simpler to understand and eliminates the use of the counter and boolean found … Read more

how to use the new image size

By default WordPress has three four different image sizes: full, large, medium, thumbnail. If you don’t need more than three images size, you can set the with and height of the default image sizes. For example: add_action( ‘after_setup_theme’, ‘theme_setup’ ); function theme_setup() { // Be sure your theme supports post-thumbnails add_theme_support( ‘post-thumbnails’ ); //set thumbnail … Read more

Show LightBox when clicking on featured image [closed]

If you use the following code you may fix your problem. Give it a try.Paste this in your post.php <?php if ( current_theme_supports( ‘get-the-image’ ) ): $image_full=wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), ‘full’); $image_thumbnail=wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), ‘single-thumbnail’); ?> <a href=”https://wordpress.stackexchange.com/questions/194146/<?php echo $image_full[0]; ?>” rel=”lightbox”> <img class=”alignnone wp-image-2770 size-single-thumbnail” src=”<?php echo $image_thumbnail[0]; ?>” alt=”2015-04-10_190211″ width=”636″ height=”460″ style=”opacity: 1;”> </a> … Read more

Featured Image won’t display on Posts page

When you have the Posts Page: set to “Blog” and then you visit the page directly (via the slug) does the header image display? Setting the static “Posts” page to your “Blog” page overrides the template. WordPress will use the Template Hierarchy to figure out which file to use to display the blog posts. The … Read more

Featured image is not uploading

Switching to the unedited default Theme (Twenty Sixteen, etc.) for a moment using the WP dashboard to rule out any theme-specific issue. Maybe a third party plugin causes a js conflict/error on the admin screen. Please try to deactivate all plugins and check if this solves the issue. If yes activate them one by one … Read more

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