you’re using commas as concatenators
you’re echoing the_title()
and the_post_thumbnail()
(use get if you’re
echoing)
your the_post()
was at the bottom
<div class="Jobs">
<?php
if(have_posts()) {
while (have_posts()) {
the_post();
echo'<div class="info_Job">';
echo '<h2>'.get_the_title().'</h2>';
echo get_the_post_thumbnail().'</div>';
}
}
?>
</div>
If you don’t want to use get but directly output do this instead:
<div class="Jobs">
<?php
if(have_posts()) {
while (have_posts()) {
the_post();?>
<div class="info_Job">
<h2><?php the_title();?></h2>
<?php the_post_thumbnail();?>
</div>
<?php }
}
?>
</div>
Related Posts:
- Is it possible to bold certain words in a post title?
- Is this the best (and only) option to style CSS for a given post type?
- adding a custom css class to post
- Custom colors for post rows based on post meta value
- How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?
- Hide add new page button
- Limit function to specific post category
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- Latest 5 posts (custom post type), each post different CSS
- WordPress Theory Lesson – Image Columns within posts with alignment?
- How to style the last post on the front page different than the others?
- Add a class to post title if a link ends with a certain extension
- Copying and pasting emoji in a wordpress post
- Style Differently Edited Posts
- How to make classes for posts?
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- Making a custom Pagination for multi page blog post
- Can I search posts and pages for css classes?
- How to add tags (custom taxonomy) to post class css?
- Is there a way to specify an extra class for a post or page with no title?
- How to remove in-line style of WordPress’s post content only?
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- Every second post different class in blog view
- Make a vertical dynamic list of posts in alphabetically order and in columns [closed]
- How to make different custom post layouts?
- Is there any way to stylize articles one by one?
- Font shows up as Arial instead of Times [closed]
- How to style archive post titles… but only those posts who have comments?
- My Custom Post Type Still Using index.php
- How can I add a class to particular paragraphs in my post?
- add div after image in post [closed]
- How do I switch css class on post
- displaying the categories post
- How to separate each individual blog post?
- Locally change the font family [closed]
- YARPP php question
- Right align a youtube video
- How do I apply a template to my single posts?
- Indenting within a blockquote
- Different background colors for posts with WordPress
- Turn off display for custom sidebar post widget when on the post it’s displaying
- How to allow arbitrary inline CSS in posts?
- How to highlight or show new to the particular posts list
- Css and function issue on author archive page
- WordPress Recent Post with the badge “New” on the side of the title post
- Centre Blog Index (Posts Page) on Home.php
- I have two post types in the same query, how can I use CSS to select only one post type?
- display content in multiple columns
- How can I alternate styling of images in a post? [closed]
- Hide title in Merlin Theme on posts and pages only
- How to add a class to links inside posts text
- Background image in posts
- How can i put image to come first than the title?
- Automatically add class to link based on link text
- Change a div background color on Post ID
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- How to display my categories in a list (to a post, not the sidebar)?
- Difficulty hiding a span per a body class within WordPress
- posts blocks don’t show up correctly
- Stop WordPress automatically adding tags to post content
- How to prevent posts from being published too close to each other?
- Let private posts stay in status “private” after edit through “editors”
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Display most recent post in category instead of archive?
- How do I programmatically add an image to a post?
- problem to delete page
- Display the latest posts, published in the last hour, with WP_Query
- Allowing the SoundCloud player to appear in a post excerpt
- Server-side sorting of posts
- Add icon/badge next to posttitle of specific category
- How to change wordpress dates to native language (even if the languge not available i wordpress)
- delete_post hook – deleting multiple items
- How do I exclude the current post from listing in recent posts
- WP_Query orderby not working with meta_value_num and menu_order
- Custom Post Archive Page not working
- Wrong post title displayed from loop
- Custom post types related to same custom post type?
- Disable WordPress Archive Conflict Check
- How To capitalize The First Letter Of Every Word In The Post Title
- Show post content and title in diferent divs using WP_Query using a loop
- Reinstall WordPress while keeping attachments
- Display on page every post in blog WITH comments
- Custom WP_Query not working correctly
- Dark Bar at the top of wordpress page can’t be seen?
- How to make ajax load posts from the current category?
- created post displaying differently on front end
- How can I create a ‘sub-blog’ which has its own sidebar on individual posts?
- MYSQL: Create SQL query to search for string and replace
- WordPress empty page! what is wrong with this code?
- How to prevent post update using transition_post_status
- Add category information beneath post?
- how to remove entry meta from wordpress archive category and change its display
- Save/retrieve form data best practises for theme development
- Removing standard links in the posts page
- How to handle a post before publishing?
- Error establishing a database connection
- How to limit the number of posts a user can publish based on user type
- Single post pagination
- posts_per_page – Repeats only first posts ‘post__in’ array
- Trying to create parent for post. I need some help. Thanks