Tag Info

New answers tagged


What about calling another content part above the sidebar and the post content block with a col-md-12 class. Call the Loop inside there with only the thumbnail and meta / any information you want there. Then you call the rest of the post in the other content part which has a col-md-8 class and is positioned next to the sidebar.


If you're uploading files via your own form, a file is attached by setting post_parent of the attachment to the ID of the post you want it attached to. Setting a post thumbnail doesn't attach the file to that post.


Facebook scrapes your pages for images to go along with the post you share. When it finds an image on the page it will use that. To specify which image exactly you have to use Open Graph tags in the head part of you html page. The og:image tag in particular: <meta property="og:image" content="http://graphics.myfavnews.com/images/logo-100x100.jpg" /> ...


wp_get_attachment_thumb_url() doesn't accept three parameters. It takes one-- the attachment ID. And, as you might guess from the name of the function, it return the thumbnail URL *_thumb_url. If you'd have simply checked the Codex entry for the function you'd have seen that. If you'd check the Codex, you'd see several other things too Don't use ...


How image gets cropped depends on how the respective size was defined with add_image_size(). In the past it was limited to soft or hard crop modes, always respective to the center of image. Now you can also pass more elaborate directions for the crop, such as array( 'left', 'top' ). See the linked documentation for details. Note that the size applies to ...


If you read the documentation that you have linked to, you would see that the post ID is stored in the array key post_id and not ID. You should then change get_the_post_thumbnail($popular_post->ID, 'wpbs-featured-full'); to get_the_post_thumbnail($popular_post['post_id'], 'wpbs-featured-full');


For some reason, I think the image does not take all available space that it has, you can add a width: 100%; on the .post-thumbnail img. It solves the issue here. Edit: You can see, by looking at the chrome dev tools (or firefox/IE) that the container does not have the save width as it children :

Top 50 recent answers are included