Try using the below in your newfeed.php. I was able to test using query_post by passing an array of the category details it had. I’ve also noticed we have to reset the query since it will be used to grab the page news in its own have_post() / the_post() if not it will overwrite the first the_content() loop.
<?php
defined( 'ABSPATH' ) || die( "Can't access directly" );
$args = array(
'category_name' => 'covid-updates',
'posts_per_page' => -1, // Get all
// Catagory ID can be used instead of slug
// 'cat' => 5,
'order' => 'ASC'
);
query_posts( $args );
if (have_posts()) : while (have_posts()) : the_post();
?>
<h1><?php the_title();?></h1>
<p><?php the_content();?></p>
<?php
endwhile;
endif;
wp_reset_query(); // Destroys the previous query and sets up a new query.
?>
Related Posts:
- How important is it to enqueue a theme’s stylesheet?
- How do I remove a pre-existing customizer setting?
- Can a theme be built in React?
- Why I can’t add a CSS style in this WordPress theme?
- Posts in multiple Categories different single.php
- Single Page WordPress Theme – Using page templates
- Confused about image sizing business in WordPress
- Add link option to featured image?
- Creating the modern ‘single page’ html5 css3 layout in wordpress
- esc_url not working within add_settings_field callback
- How to override BuddyPress 3.0 bp-nouveau theme files?
- Which theme foundry has clean coded themes, where code is poetry [closed]
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- How can a Theme Contain no Header File or Footer File?
- WordPress theme (or plugin) that uses Contenteditable property
- Same footer on all multisites blogs
- Adding “latest from the blog” to the homepage
- Default comments file and how to copy it
- New template, where to place CSS?
- Is there a theme function for is_password_protected()?
- Some translations do not work in my template class
- WordPress not registering Theme Customization Section
- How to get comment meta values by post ID
- For best DB performance should I serialize all theme options together or by type?
- Find the Children of a Page then Echo it as a Bulleted List of Links (menu)
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- Custom Widget options in theme
- Include Parent functions.php in Child Theme functions.php
- Redirect to specified page when insufficient permissions?
- Reasons why all thumbnail sizes aren’t working
- Jetpack Comments with fall-back
- Update a custom theme with Subversion?
- Should I use add_filter for functions in function.php of the theme?
- Multiple TinyMCE Editors in one Admin Page
- wp_script_add_data doesn’t seem to work
- How to override checkbox styles if these inputs have a unique id [closed]
- What are the minimum role/permissions for freelance developer?
- Where am I doing wrong in my theme menu?
- Calculate data and passing to Theme
- Multisite theme path rewrite using .htaccess
- Retrieve localised value
- How to disable wordpress from overload my stylesheet styles with customizer styles
- How can I conditionally show different home page templates based on whether or not the user is logged in?
- how to get the post attachement image in full size?
- different way to achive stylesheet_url
- How to remove ver from stylesheet URL? [duplicate]
- Using a starter theme vs starter theme with child theme
- How should I use starter content utility to show some default menus?
- Set a featured image as a replacement to the header image
- How to remove ID’s from wp_enqueue_style?
- How to include Google fonts [duplicate]
- How To Detect Posted Comment in Theme Development?
- Create a category archive page in TwentyTen Child Theme
- How to call the_time current?
- where is real values of variables?
- How to remove WP Title Tag?
- Change the sidebar from left to right twentyfourteen theme
- Custom theme won’t use search.php
- Get attachment meta (I need attachment ID, unsure how to find it)
- Retrieve WordPress’ the_content() with jQuery
- Theme Checker Text Domain
- Minimal WordPress Functionality on Existing Website
- W3 total cach and theme changes [closed]
- How to copy page/post from one theme to another?
- Not sure how to debug this npm install error. This is a wordpress theme that comes with a built-in gulp/webpack task automation [closed]
- In wordpress customizer div still showing even if I hid it with javascript
- Programatically Created Menu not Editable in Dashboard
- Embedding CodePen Calorie Script – jquery error
- How to make updatable custom WordPress theme?
- How can I access variables from theme in child theme? [closed]
- Is it possible to echo a woocommerce prouct attribute discription?
- change background image on scroll
- Duplicate child theme incl. design changes
- Why .widget-area is outside of .site-content in Underscores starter theme?
- Using wp_add_inline_style Inside a Template File
- How can I use a different template file for the blog index’s paginated pages?
- How to customize the colors within a stylesheet using a WordPress setting
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- On wordpress, how do i require specific dimensions from user uploads only
- how to create export / import theme options in wordpress without plugin
- Display current taxonomy slug in a post
- How to create multiple customizer controls in one control
- Modify comments_popup_link output
- How can I display and excerpt of all pages with a meta_key and meta_value on index.php?
- Create image with imagepng() (fails at header)
- Can you create a custom page with content in the center already defined?
- Dynamic meta description
- How to Remove Sidebar when get_sidebar() is not get called in page?
- RSS feed url showing page not found. How to solve it?
- Enable WP to accept standard jQuery code embeding between the tags [duplicate]
- Retina ready for uploaded images which are cropped
- Search Results not displaying for multiple word search
- Allow users to edit home page from WordPress (home.php problems)
- WordPress does not know the parametrs i sent to admin post
- Display Page featured Image as well as Posts featured Image
- Creating completely new WordPress site from old WP contents
- Custom Single Page Portfolio Theme [closed]
- Creating image grid on products page in wordpress
- Insert gutenberg blocks into template
- How to make it so I can “use” template parts in (classic/full) site editor