Need Some Help with my theme

Discussion in 'WordPress Themes' started by Steve Brassington, Feb 20, 2012.

  1. Steve Brassington New Member

    Hi everyone,

    I'm still somewhat of a WP novice, and have tried, unsuccessfully by myself to change a few things on my blog. I am hoping for the community knowledge to guide me through this testing time as I'm rather frustrated now :(

    So here is the situation. I need to do 3 things to my site.

    #1 find some way to put a grey box in the text of the feaatured slider. The Text is all in white and can get lost on the background picture.

    #2 Put the 2 large static " featured" widget thingy's at the bottom of the site. Kind of how you have the 3 at the bottom, just with the 2 large ones instead.

    #3 Change the Thumbnail size of the images on the front page. They are currently at 120x90 and I don;t know where to change them. I'd like them to be 165x165. I changed the setting in Media, but this did nothing.

    If you can point me in the right direction, I'd greatly appreciate it.

    Regards,
    Steve
  2. Kevin Muldoon WordPress Fanatic!

    #1

    Open up style.css:

    Find .content-heading and replace the transparent background with a solid grey colour.

    i.e. Replace



    Code:
    .content-heading {
    position:absolute;
    top:144px;
    width:465px;
    left:0;
    background:url('images/top-transperent.png')repeat-x;
    height:61px;
    margin:0;
    padding:0 5px
    }
    With:

    Code:
    .content-heading {
    position:absolute;
    top:144px;
    width:465px;
    left:0;
    background:#999999;
    height:61px;
    margin:0;
    padding:0 5px
    }
    #2

    To remove the featured area from the top of the home page, remove this from index.php.

    PHP:
    <?php if ( get_option_mmtheme('featured_box_1') == 'true' ) { ;?>
    <div class="recentpostblock">   
    <?php $recent = new WP_Query('showposts=2&cat='.get_option('featured_cats_area').'&offset=0'); while($recent->have_posts()) : $recent->the_post();?>
    <div class="recentpost-1">     
    <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail'contentbig' ); ?>  </a>
    <div class="content-comment">  <?php comments_popup_link(__('0'), __('1'), __('%')); ?></div>
      <div class="content-heading"> <h2><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2>
    </div>
    </div>
    <?php endwhile; ?>
    </div>
     
    <div class="recentpostblock-2">
    <?php $recent = new WP_Query('showposts=3&cat='.get_option('featured_cats_area').'&offset=2'); while($recent->have_posts()) : $recent->the_post();?>
    <div class="recentpost-2">     
    <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail'contentsmall' ); ?>  </a>
    <div class="content-comment-2">  <?php comments_popup_link(__('0'), __('1'), __('%')); ?></div>
      <div class="content-heading-2"> <h2><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2>
    </div>
    </div>
    <?php endwhile; ?>
    </div>
      <?php    ?>
    Then open up footer.php and find this:

    PHP:
    <div class="f-holder">
    Underneath place this:

    PHP:
    <?php if ( get_option_mmtheme('featured_box_1') == 'true' ) { ;?>
    <div class="recentpostblock">   
    <?php $recent = new WP_Query('showposts=2&cat='.get_option('featured_cats_area').'&offset=0'); while($recent->have_posts()) : $recent->the_post();?>
    <div class="recentpost-1">     
    <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail'contentbig' ); ?>  </a>
    <div class="content-comment">  <?php comments_popup_link(__('0'), __('1'), __('%')); ?></div>
      <div class="content-heading"> <h2><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2>
    </div>
    </div>
    <?php endwhile; ?>
    </div>
      <?php    ?>
    #3

    If your thumbnails are 120x90, then I assume you are using the thumbnail on left post format.

    Open up your functions.php template and look for this:

    PHP:
      add_image_size'left-thumb'12090true );     add_image_size'sidebar-thumb'5050true );
    And replace it with this:

    PHP:
    add_image_size'left-thumb'165165true );     add_image_size'sidebar-thumb'5050true );
    hope this helps :)

    Kevin
  3. Steve Brassington New Member

    Kevin, once again you come through..what had taken me hours to "try" to figure out, you explained in minutes. I actually understand a little bit how the theme functions work. I was playing around with having the 2 larger featured posts at the bottom and then the smaller 3 up top. I tried to do some tweaking abut either had all 5 show up or none at all. Does just displaying the 3 require a change in the way the initial code is written?
  4. Kevin Muldoon WordPress Fanatic!

    No problem. I had made a lot of changes to the theme so I knew how your queries could be addressed. Would have taken me a lot longer if I didn't use the theme myself :)

    To display the three at the bottom you need to use the following:

    PHP:
    <?php if ( get_option_mmtheme('featured_box_1') == 'true' ) { ;?>
     
    <div class="recentpostblock-2">
    <?php $recent = new WP_Query('showposts=3&cat='.get_option('featured_cats_area').'&offset=2'); while($recent->have_posts()) : $recent->the_post();?>
    <div class="recentpost-2">   
    <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail'contentsmall' ); ?>  </a>
    <div class="content-comment-2">  <?php comments_popup_link(__('0'), __('1'), __('%')); ?></div>
      <div class="content-heading-2"> <h2><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2>
    </div>
    </div>
    <?php endwhile; ?>
    </div>
     
     
      <?php    ?>
    As you can see, it's just an if statement that is wrapped around both sections. You can remove the if statement altogether if you want. All this does is allow you to control whether it's switched on via the options area.
  5. Steve Brassington New Member

    Thanks for your help on this one Kev! I had a quick question... It seems the newer posts are going to the featured boxes I put at the bottom.. how can I flip-flop it so that the newer ones are in the top featured boxes, and the older ones at the bottom ?
  6. Kevin Muldoon WordPress Fanatic!

    See where it says offset=2. This says that you should skip two posts and then start publishing.

    So if you want to post from the 1st post, remove that, if not, you can adjust that value accordingly to change which ones are showed. That's how I've customised wpmods to show older posts at the bottom of the page.
  7. Steve Brassington New Member

    You.Are.The.Man - Thanks !!
  8. Kevin Muldoon WordPress Fanatic!

Share This Page