Custom query loops and custom page templates are your friends.
Ditch the redirect function and on your home page template do something like this:
<?php
$args = array(
'post_status' => 'publish',
'post_type' => 'seller',
'posts_per_page' => 1
);
query_posts( $args );
// the Loop
while (have_posts()) : the_post();
the_content( );
endwhile;
?>
You can find all args here
Related Posts:
- Add a Second Menu to a theme that only support 1 menu
- WordPress does not load page.php, return 404.php
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Does wordpress templates always in files or in database?
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- how to register a second page-template
- 3 blogs same installation, without WP MU
- Mass update excerpt
- WordPress: Access a plugin from within a theme
- Getting error when trying to implement site-wide breadcrumbs in Twentytwentyone Theme [closed]
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Connect WordPress with SharePoint [closed]
- Reconfiguring WordPress site
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- Get and insert order email address to the PHP template inside HTML text
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show single category archive
- Move category description below post list in blog
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- code is skipping a div
- Issues getting PHP to display in category pages
- WordPress homepage infinite redirect
- Redirect undesirable domain
- Customizer: active_callback and sanitize_callback incompatibility?
- My page.php shows the index.php
- Change title only in dynamic page
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- How do I display the main domain for my WordPress install?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Custom Theme’s “Preview Changes” Doesn’t Work for Previously Published Posts
- Problem with login form
- How can I edit the content in index.php? [duplicate]
- How do I link a button I created in theme customizer to a function?
- 404 error when I acess the second page of post-type
- How to change theme programmatically from a external application?
- Woocommerce Show Single Product on Homepage
- how to show only specific category for a template
- Show a different code on front page to other pages
- proper way to add css using functions.php?
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- Set Cache-Control header for 301 redirects
- PHP include is only working in certain places in my custom WP theme
- How to redirect users based on role and content of redirect_to?
- Use WordPress function in php file
- Adding wrapper elements in the_date() like in the_title()?
- Moving code from theme header to functions.php
- What does this mean in wordpress? Easy question
- How to get all author posts outside of author templates
- Add filter multiple times using only one master function
- Create a Blog Template Page
- Translate wordpress date from Italian to English
- Having Issue on Redirecting With Session in WordPress
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- WordPress template page name displayed on screen
- Is there a way to hook or call a custom woocomerce template that is not part of the default templates of woocommerce?
- Reason to add a name of the theme like (‘menu-1’ => __( ‘Primary’, ‘twentynineteen’ ),) in PHP?
- Separation of presentation and code – WordPress
- single.php with different look by category
- WordPress Customizer Default Image
- Using a $GET parameter from a URL, to redirect to a URL (WordPress)
- How to call multiple functions from multiple files into a WordPress page template [closed]
- Do I have anything to worry about when switching to a default theme to test for plugin conflictions?
- Why in my theme I can’t see all the statics content under the posts?
- get_template_directory adding FTP root folders in urls
- How to integrate noimage picture in this code
- Need oop for wordpress theme? [duplicate]
- How do I define a lookup table that will work across all PHP elements of the template?
- persist a variable set in header.php all the way down to footer.php
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Removing WordPress Footer -without access to PHP code?
- How to set a template with wp_insert_post
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- WordPress redirect redirecting too many times or not at all
- How to add the sidebar to all the pages except the home page? [closed]
- Header not properly displaying on archive.php
- Why does the Woocommerce grouped template prints the unpublished products?
- Adding conditional text to a PHP Shortcode Template
- Save Custom CSS file in the upload folder dynamically?
- Create page template via functions.php?
- Using Argument from Function to Re-Direct Visitor (WordPress)
- I am receiving a pluggable.php warning sign on my only http:// page
- Warning: printf(): Too few arguments in helpers.php file
- Design with Elementor and code the rest?
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- Login redirect. Check user meta and redirect accordingly
- Where to insert redirect code based on http_referer?
- how to display this functions?
- is_page_template showing partial results
- Is this a correct usage of ob_start() in my WordPress project?
- Adding regular php file to site
- How to allow download url redirection only if user logged in WordPress site?
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- add_filter function concatenate string and locate_template function
- How to render a block from php template
- Template Loop – add switch case php
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- Override Admin menu icon