Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8250087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:46:19+00:00 2026-06-07T23:46:19+00:00

I am trying to put the featured image from a page on the main

  • 0

I am trying to put the featured image from a page on the main index page of blog along with the with featured images from posts (post featured images are already there). For longer posts I want to be able split them up into multiple post, put them under one category, put that category page on the main index and then have each of those on that category page.

Here is the site:

http://theshalomimaginative.com/blog

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:46:22+00:00Added an answer on June 7, 2026 at 11:46 pm

    You would do this by setting up a custom query and then running through that picking out the featured image for the specified page. The example below uses the page with an ID of 7.

    <?php $featured_image = new WP_Query('page_id=7'); ?>
        <?php while ($featured_image->have_posts()) : $featured_image->the_post(); ?>
    
    
        <?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) { ?>
    
            <?php $img_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), array( 960,960 )); ?>
    
            <div class="the-image">
                <a href="<?php the_permalink; ?>"><img src="<?php echo $img_src[0]; ?>" /></a> 
            </div>
    
        <?php }; ?>
    
        <?php endwhile; ?>
     <?php wp_reset_query(); ?>     
    

    Then elsewhere you would set up another custom query to pull the posts from your specific post category and run the same type of script, just changing the parameters of WP_Query.ie;

            <?php $featured_postimages = new WP_Query('cat=4&posts_per_page=-1'); ?>
              <?php while ($featured_postimages->have_posts()) : $featured_postimages->the_post(); ?>
    

    *EDIT 2

    OK, I understand – let’s have another go. The code above stays exactly the same. What changes is the template you use for this custom page (the one the featured image is linking to).

    You need to set up a custom template and assign it to the custom page. It’s within that custom template that you call your list of posts;

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to put together a GUI for setting some pricing. There are three
I'm trying to put together a linear regression model but some of my featured
I'm trying to put together a change password feature in Symfony2. I have a
I am trying to put grid in extjs 4.1 with locking feature See the
I'm trying put an if statement directly into a select field in rails, with
Trying to put a regex expression together that returns the string between _ and
I trying to put together an Android app that will take a picture and
I'm trying to put together a script to monitor the MSMQ on a server.
So I am trying to put two inline dropdown lists. I tested and it
I'm trying to put a large table in a pdf file which will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.