You could try something like this:
<?php
$args = array( 'category' => 12, 'post_type' => 'post' );
$postslist = get_posts( $args );
foreach ($postslist as $post) :
setup_postdata($post);
?>
<h2><a href="https://wordpress.stackexchange.com/questions/318848/<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<h4><?php the_author();?></h4>
<?php
the_excerpt();
echo get_avatar(get_the_author_meta());
endforeach;
?>
In the example the category id is set to 12 – just replace it with the id of the category you want to use.
More info:
How to loop through posts: https://developer.wordpress.org/reference/functions/get_posts/#user-contributed-notes
How to get the author name: https://codex.wordpress.org/Function_Reference/the_author
How to get the author image: https://codex.wordpress.org/Function_Reference/get_avatar
Related Posts:
- Getting author URL outside the loop
- wordpress 404 not found after rewrtie the author link
- Twenty Twelve Author not displaying
- I want to change the author name
- What difference does it make if I use index.php as HTML wireframe versus writing each main template file as a full HTML document?
- What filters are applied to the_content function?
- Child Theme vs Duplicate Theme Renamed
- Where to post/upload the new theme for WordPress theme repository
- Is it possible to manipulate the list of page templates?
- redirect does not work in ajax function
- default favicon for a theme?
- get_template_directory_uri() and other URL tags not working in theme
- First wordpress blog, should I make my own theme for maximum customizability?
- How to determine which sidebar the widget has been added to, via widget admin?
- Plugging into the Media Library to upload images (NOT associated with any post)
- Help with “text domain”, comments_form in WordPress theme
- WooCommerce: VAT on grouped products
- Why is unfiltered html allowed in custom fields for author / contributor roles?
- Get list of months with posts
- Using the theme options to change background
- Getting the wrong page ID
- Avoid theme updates, just one theme
- Theme change only in CSS and a few images
- How do I save a wordpress theme’s files and install them on another site?
- Custom WordPress install – activate custom theme
- How to remove the header from all pages except home?
- Using AJAX in wordpress theme
- moving an admin submenu item to a top-level position
- Metadata Query when storing data as array possible?
- show a post from a specific post format
- How to use different assets if local or live
- get_option() returning empty
- How can I add a custom button to the post editor toolbar?
- Is there any WordPress theme for Self Storagae just like Spacer [closed]
- Customizer: save setting/control content to post/page
- Wp_customize_image_control Use Add Media
- Changing Header Image Every N Minutes/Seconds
- Post Content Displaying Below ALL Shortcodes Content
- Register sidebar ‘before’ and ‘after’ html as div rather than li tags
- WordPress Template Part in iFrame
- Can I add an icon & function to the “Upload/Insert” toolbar at the top of the content editor?
- Is it possible to have a theme that uses only one single page?
- underscores use of the article element on the page template
- Ideal inline dynamic CSS injection
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- JQuery undefined and Stylesheet loads in bottom along with js files
- Why tags are displayed bellow the content and not inside
- What’s the best way to create a new design for other pages?
- Consequences if using PHP include TEMPLATEPATH?
- Adding a gallery to my first theme
- Making custom woo themes
- Headless WordPress + Vue.js on the same server
- Previous and Next links not populating, have I missed something?
- not getting API setting saved confirmation message after update on option page
- Single.php the_excerpt loads same as the_content not loading read more line
- Is there a way to retrieve the calling template part?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- WP_Query not getting all posts, just tagged posts
- how to hide home nav link in wordpress
- Converting a theme to a child theme in a network
- .current_page_ancestor broken in Twenty Eleven
- Calling a WP Plugin Function’s Variable in Theme Template [duplicate]
- Why excerpt hook not working inside ajax function?
- Help with Core Mods
- Problems with cart and pages on _s theme
- Local variable name in setup_postdata()
- Creating a Single Page Theme correctly
- Custom post type query with pagination doesn’t work
- Child theme menu not appearing in Twenty Seventeen
- Edit Product Archive design for Woo theme
- Recall translations made with Poedit
- WordPress menu walker – Get parent item text inside end_lvl function
- How to achieve this navigation style in wordpress navigation
- WordPress Ajax Spitting out a page as a response?
- Filter URL and shortcodes from the_excerpt
- Check if redirected from a specific page template
- Postname permalink page not found error
- After theme change the menus have to be manually linked to the corresponding theme location
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Incorporate zilla shortcode into theme
- Passing a location-dependent array via wp_localize_script within a shortcode
- Import/Export WordPress demo
- Global Navigation menu in diiferrent wordpress setups
- getting id of page
- How to make a sticky footer?
- How can i display a 4 diferent themplate for the archive page
- Is it ok if I use this tag?
- What’s your workflow for converting a static HTML website to WordPress? [closed]
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Dynamic nav menu with icons [closed]
- WordPress administration is gone after creating base theme
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?
- When trying to run build script with gutenberg (with SVG import) – Error: Plugin name should be specified
- I am using update_option function to update theme options programatically but page needs to be refreshed many time for changes to reflect!
- Block to show posts from same category
- How can I enforce user to use Application password to generate JWT token? [closed]