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

  • Home
  • SEARCH
  • 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 6235759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:43:34+00:00 2026-05-24T10:43:34+00:00

This is for a WordPress site powered by Thesis. What I’m trying to do

  • 0

This is for a WordPress site powered by Thesis. What I’m trying to do is have a featured posts area filled with whichever posts I put in the featured/featured2 categories.

This is the PHP

function custom_featured_box() {
    if(is_home()) {
?>
<div id="featuredbox" class="clearfix">
        <?php $my_query = new WP_Query('category_name=featured&showposts=1');
        while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;
        ?>
            <div id="featuredbox-main" style="background: url(<?php the_post_thumbnail('featured') ?>) no-repeat;">
                <a href="<?php the_permalink() ?>"><?php the_title() ?></a>
            </div>
            <?php endwhile; ?>
        <?php $my_query = new WP_Query('category_name=featured2&showposts=3');
        while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; 
        ?>
            <div id="featuredbox-secondary">
                <div class="secondary-item" style="width: 205px; background: url(<?php the_post_thumbnail() ?>) no-repeat;">
                    <a href="<?php the_permalink() ?>"><?php the_title() ?></a>
                </div>
            </div>
        <?php endwhile; ?>
    </div>
<?php
} }

The “new WP_Query” function is just calling the category “featured” and “featured2” (<– this is for the secondary featured posts) and taking the first post (for the “featured” category) and first 3 (for the “featured2” category) and placing them in the featured posts section. The only problem I’m having is that the #featured-secondary isn’t putting the “featured2” posts next to each other. Also the thumbnail images aren’t displaying but I haven’t bothered trying to figure that out yet.

Here is the CSS:

.custom #feature_box { padding:0em; }

.custom #featuredbox { padding: 8px 0 10px 0;}
.custom #featuredbox-main {overflow: hidden; width: 650px; height: 225px; border: solid      
1px #ccc; margin: 0 0 10px 0; position: relative;}
.custom #featuredbox-main a:hover {text-decoration: underline;}
    .custom #featuredbox-main a {z-index: 1; position: absolute; top: 121px; min-   
height: 35px; left: 0; font-size: 20px; font-weight: bold; color: #fff; padding: 15px 
10px; width: 100%; background: url(http://location-of-the-background-here);}

.custom #featuredbox-secondary {height: 162px; overflow: hidden; width: 650px;}
    .custom .secondary-item {margin-right: 10px; position: relative; border: solid 1px 
#ccc; height: 160px; float: left; overflow: hidden;}
    .custom .secondary-item a:hover {text-decoration: underline;}
    .custom .secondary-item a {z-index: 1; position: absolute; top: 52px; left: 0; 
font-size: 12px; font-weight: bold; color: #fff; padding: 8px 10px; width: 185px;    
background: url(http://location-of-the-background-here);}

I don’t see why the CSS isn’t making the #featuredbox-secondary posts to be placed next to each other.

Any help would be greatly appreciated.

P.S. here’s a to screenshot of what it looks like with the current code, hopefully it helps people understand what I’m getting at. http://img43.imageshack.us/img43/3011/csshelp.jpg

  • 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-05-24T10:43:35+00:00Added an answer on May 24, 2026 at 10:43 am

    If I understand you correctly, then you want every div with the class “secondary-item” which is inside the div with the ID “featuredbox-secondary” to float right next to each other? If so, you need to apply the float declaration to the class “secondary-item”.

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

Sidebar

Related Questions

I have a Wordpress site (www.nurseresumetips.com) and I'm using a theme named JVPress. This
I have a wordpress site, it's already have about about 3000 published posts, the
I have some jQuery powered widgets on my WordPress site. They all work fine
I have a wordpress site. I don't know how this happened, but now it
I want to have a top border on my wordpress site like this: Thanks!
This is the page, its a wordpress powered site: http://bit.ly/9oJXWV You select some value,
I was browsing a WordPress site, and spotted this line <?php if ( function_exists('dynamic_sidebar')
I need same menu like on this site http://www.salesforce.com/aloha.jsp in wordpress theme. Multilevel dropdown
Trying to mess with this wordpress theme and can't figure out why the sidebar
I have a table like this (using wordpress) +---------+----------+------------+ | meta_id | meta_key |

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.