treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Help Customizing WP PHP Files in Dancefloor Theme

  • Hey guys! I did a search and found SOME helpful information on the issues I'm having, but there are some left I still need help to resolve.

    A client of mine purchased this GorillaThemes Dancefloor theme for me to alter/configure for them. They didn't buy any support with their purchase, so I'm kinda left having to figure this out.

    DEMO HERE: Dancefloor WordPress Theme

    1) I would like the home page to look reminiscent to the home/main page of the demo. I figured that by going into "Settings>Reading" and setting the static Front and Posts page that everything would set itself up correctly like it normally does. That's FAR form the case. It's like they're setting you up to fail without purchasing their support plan.

    When I set the static Home Page, this is what I get:
    Funky Home/Front Page

    And when I set the static Posts Page, this is what I get:
    Funky Blog/Posts Page

    I'm still fairly new to WordPress, and need a bit of help moving things around. I would like for the Home/Front Page to have in this order from top to bottom the:

      Image SliderGallery3 Recent Events3 Recent Posts


    And I'd like the Blog/Posts page to JUST display the posts.

    Here's the PHP for each respective page, so can someone please give me a quick run through of what to add, delete or keep? And if you need more info on other coding, let me know and I can post it.

    PAGE.PHP:
    <?php include(TEMPLATEPATH."/header-single.php");?>
    <div id="body" class="single">
    <?php if ( get_option('layout') == 'right_sidebar' ) echo '<div id="content" style="float:left;margin-left:22px;">'; else echo '<div id="content" style="float:right;margin-right:42px;">';?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="postMain"></div>
    <div class="post">
    <div class="date_title">
    <h1><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
    </div>
    <?php if ( has_post_thumbnail() ) {
    $mypostimage = the_post_thumbnail( 'large', array('class' => 'featsingle' , 'alt' => get_the_title() , 'title' => get_the_title() ));
    the_content(); } else { the_content(); } ?>
    </div>
    <div style="clear:both">
    <div class="postFoot"></div>
    </div>
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>


    INDEX.PHP:
    <?php get_header(); ?>
    <div id="show">
    <div id="showcase" class="showcase">
    <?php query_posts(array('post_type'=>'featured','posts_per_page' => '18'));?>
    <?php if ( have_posts() ) while ( have_posts() ) : the_post();
    $large = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
    $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail');?>
    <div> <a href="<?php the_permalink();?>"><img src="<?php echo $large[0]; ?>" alt="<?php the_title();?>" /></a>
    <div class="showcase-thumbnail">
    <img src="<?php echo $thumbnail[0]; ?>" alt="<?php the_title();?>"/>
    <div class="showcase-thumbnail-cover"></div>
    </div></div>
    <?php endwhile;?>
    <?php wp_reset_query();?>
    </div>
    <div style="clear:both"></div>
    </div>
    <div style="clear:both"></div>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Photo Gallery') ) : ?><div style="clear:both"></div>
    <?php endif; ?>
    <div id="body">
    <?php
    if ( function_exists('dynamic_sidebar') )
    echo '<div id="centerwidgets">';
    dynamic_sidebar('Widgets Home');
    echo '<div style="clear:both"></div></div>';
    ?>
    <?php if ( get_option('layout') == 'right_sidebar' ) echo '<div id="content" style="float:left;margin-left:22px;">'; else echo '<div id="content" style="float:right;margin-right:42px;">';?>

    <?php if (have_posts()) :while (have_posts()) :the_post();?>
    <div class="postMain"></div>
    <div class="post">
    <div class="date_title">
    <div class="date_back">
    <div class="month"><?php the_time('M') ?></div>
    <div class="day"><?php the_time('d') ?></div>
    </div>
    <h2><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    </div>
    <?php if ( has_post_thumbnail() ) {
    $mypostimage = the_post_thumbnail( 'thumbnail', array('class' => 'homethumb' , 'alt' => get_the_title() , 'title' => get_the_title() ));
    the_excerpt('</br></br><span class="fullarticle">FULL ARTICLE &raquo;</span>');} else {the_excerpt('</br></br><span class="fullarticle">FULL ARTICLE &raquo;</span>'); } ?>
    <div class="postMeta"><?php _e("Posted in ","language"); ?> <?php the_category(', ') ?> </div>
    <div style="clear:both;"></div>
    </div>
    <div style="clear:both"></div>
    <div class="postFoot"></div>
    <?php endwhile;endif; ?>
    <div class="navigation"><p><?php posts_nav_link('&#8734;','Next &raquo;&raquo;',' &laquo;&laquo; Previous'); ?></p>
    </div>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  • Any WP gurus out there that can help me and help me to understand what's going on as it's changed?