• *Sorry if this is too off-topic, I’m just desperate here*
    New theme I’m using has the worst support ever, so hopefully someone with programming knowledge can help here.

    A quick look at the sample theme: https://stylewp.com/demoserver/ (At the top select PLAYMAKER 4 from the drop down box.

    When looking at the middle of the theme, you see ‘HEADLINES’ and the 20 latest posts, “IMAGE OF THE DAY” with a picture and 1 post, “IN THE SPOTLIGHT” with 5 posts, etc.

    These are all being pulled from various categories. For some reason the IMAGE OF THE DAY and SPOTLIGHT sections aren’t working for me. Here’s a peek at my code for it:

    IN THE SPOTLIGHT
    	<?php } ?></h1>
    	<div style="margin-bottom: 10px;"></div>
    		<?php $my_query = new WP_Query('category_name=teamnews&showposts=12&offset=31'); ?>
    		<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    		<a>"><img src="<?php viva(68,'');?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" align="left" style="border: 0px; padding: 0px; margin: 2px 10px 10px 0px; width: 68px; height: 60px;"/>
    		</a>
    		<h1 class="other-news-item"><a>"><?php the_title(); ?></a></h1>
    		<?php wswwpx_content_extract ( ' ', 6, 6 ); ?>
    		<div style="clear: both;"></div>
    		<?php endwhile; ?>

    As you can see, I have it pulling from a category called ‘teamnews’, so it should be pulling the last 5 posts from that category. But NOTHING is showing up.

    Any ideas what’s going on?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Is ‘teamnews’ the actual category name, or the slug? Is the actual name ‘Team News’?

    Thread Starter ACCBlitz

    (@accblitz)

    Yes. That’s the actual name. But the how to on the theme says to use the slug :/

    What’s weird is the fact that I have a category called Top Stories (slug topstories), and it works fine on the first changeable part of the theme. It’s when I get to HEADLINES, IMAGE OF THE DAY, AND IN THE SPOTLIGHT.

    When I create a category with a space in the name, the default slug has a dash instead of the space( ‘Top Stories’ = ‘top-stories’). Is that possibly the problem?

    Thread Starter ACCBlitz

    (@accblitz)

    Nah, because I name my slugs with no spaces or dashes. And the topstories slug is the only one working :/

    Well, the only other thing that I can suggest is that possibly the offset is larger than the number in that category. If that is not it, I am out of suggestion.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Theme not pulling from right category…..programming help if possible’ is closed to new replies.