Forums

Masterplan v.1.4 - duplicate feature post in sidebar (1 post)

  1. threio
    Member
    Posted 3 years ago #

    My current theme is masterplan, version 1.4, and it works just fine in WordPress 2.7.

    Here is my page address:

    Here is my current page: http://www.threio.com

    I am trying to add another “feature post” (currently named-Hot Topic on the page) to the left side bar and I just can’t figure how to do it.

    The author of this particular theme does not support the page (requests) and recommends I asks for help in the support forum. I have asked if they would accept a fee for the customization but no reply after several days.

    Based on my novice “hacking” knowledge of templates it appears the:

    1. home.php - executes all the category sorting information and the command to insert an thumbnail into the post excerpt.

    2. sidebar.php – stores the post information

    3. Stylesheet – stores the design for the left side bar blocks of info

    The theme file folder has an image file for the featured category post as a default for the feature post pic (home_featured_img)

    Steps I think I need to take:

    1. Stylesheet - duplicate the feature styling in the Stylesheet and rename it to match the new category I want to use for the post excerpt; plus I am assuming I need to do the same to the ie.css (internet explorer stylesheet)

    2. Home.php - duplicate the feature php script and change the name from feature to the new category. Change all sub titles that id to the new category.

    3. Side Bar – duplicate the feature php script and change the name from feature to the new category. Change all sub titles that id to the new category. Plus add a category three (3) to the script

    If my assumptions are correct, here are the problems I have face so far.

    1. When I add a image file folder to the theme images folder the theme crashes (duplicate of feature pic folder with its name changed)
    2. I do not know how to find the actual category number in word press to make cat3 in the side bar php to the call list of categories
    3. I think I need to add something to another template file and I just can’t find based on No. 1 problem or I just may have made a mistake somewhere.
    4. Or there are files and or folders within the template folder that I have not thought of adding something too.
    Nevertheless, I need some help here if you don’t mind.

    Here is the home.php file:

    <?php get_header(); ?>

    <div id="topbanner" class="column span-14"> <!-- start top banner -->
    <div class="pagetitle">
    // home
    </div>
    </div> <!-- end top banner -->

    <div id="home_content" class="column span-14"> <!-- start home_content -->

    <div id="home_left" class="column span-7 first"> <!-- start home_left -->

    <?php $catid = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Asides'"); ?>

    <?php $catid2 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Featured'"); ?>

    <?php $the_query = new WP_Query('cat=-' .$catid. '&showposts=1&orderby=post_date&order=desc');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <div id="latest_post"> <!-- start latest_post -->
    <h3 class="mast">The Latest</h3>

    <?php if ( get_post_meta($post->ID, 'latest_home_img', true) ) { ?>

    <div id="latest_post_image">
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/latest/<?php echo get_post_meta($post->ID, "latest_home_img", $single = true); ?>" alt="<?php bloginfo('name'); ?>: Latest post" width="470" height="175" />
    </div>

    <?php } ?>

    <h3 class="latest_post_title" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h3>

    <p><?php echo strip_tags(get_the_excerpt(), ''); ?></p>

    <div class="latest_post_meta">
    <span class="latest_read_on">
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Continue Reading</span>
    <span class="latest_comments"><?php comments_popup_link('Post a comment', 'One comment', '% comments', '', 'Comments off'); ?></span>
    <?php $cat = get_the_category(); $cat = $cat[0]; ?>
    <span class="latest_category">cat_ID);?>"><?php echo $cat->cat_name; ?></span>
    </div>
    </div> <!-- end latest_post -->

    <?php endwhile; ?>

    <div id="home_featured"> <!-- start home_featured -->
    <h3 class="home_featured">Hot Topic</h3>

    <?php $the_query = new WP_Query('category_name=featured&showposts=1');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <div class="feat_content">

    <?php if ( get_post_meta($post->ID, 'featured_home_img', true) ) { ?>

    <div class="feat_thumb">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/featured/<?php echo get_post_meta($post->ID, "featured_home_img", $single = true); ?>" alt="<?php the_title(); ?>" /></div>

    <?php } else { ?>

    <div class="feat_thumb">
    " rel="bookmark" title="Permanent Link to <?php
    the_title(); ?>"><?php if (function_exists('the_thumb')) { the_thumb('altappend=recent_&subfolder=recent&width=64&height=64&keepratio=0'); } ?>

    </div>

    <?php } ?>

    <div class="feat_title">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></div>

    <div class="feat_exc">
    <p><?php echo strip_tags(get_the_excerpt(), ''); ?></p>
    </div>

    </div>

    <?php endwhile; ?>

    </div> <!-- end home_featured -->

    <div id="home_asides"> <!-- start asides -->

    <h3 class="mast">The Minors</h3>

    <ul class="arrow">
    <?php $the_query = new WP_Query('category_name=asides&showposts=5&orderby=post_date&order=desc');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

  2. <?php echo strip_tags(get_the_content(), ''); ?> " rel="bookmark" title="Permanent Link to <?php the_title(); ?>">#
  3. <?php endwhile; ?>

    </div> <!-- end asides -->

    </div> <!-- end home_left -->

    <div id="home_right" class="column span-7 last">

    <div id="home_about">

    <h3 class="mast3">Welcome to <?php bloginfo('name'); ?></h3>

    <?php $the_query = new WP_Query('pagename=description');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <?php the_content(); ?>

    <?php endwhile; ?>

    </div>

    <div class="column span-4 first">

    <h3 class="mast">Recent Posts</h3>

    <?php $the_query = new WP_Query('cat=-' .$catid. '&showposts=5&offset=1&orderby=post_date&order=desc');

    while ($the_query->have_posts()) : $the_query->the_post();

    $do_not_duplicate = $post->ID; ?>

    <div class="home_recent_post">

    <?php if ( get_post_meta($post->ID, 'thumb_home_img', true) ) { ?>
    <div class="home_recent_thumb">
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/thumbs/<?php echo get_post_meta($post->ID, "thumb_home_img", $single = true); ?>" alt="<?php the_title(); ?>" />
    </div>
    <?php } else { ?>
    <div class="home_recent_thumb">
    " rel="bookmark" title="Permanent Link to <?php
    the_title(); ?>"><?php if (function_exists('the_thumb')) { the_thumb('altappend=recent_&subfolder=recent&width=48&height=48&keepratio=0'); } ?>

    </div>
    <?php } ?>

    <div class="home_recent_title" id="post-<?php the_ID(); ?>">
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
    </div>

    <div class="home_recent_date">
    <?php the_time('F j, Y'); ?>
    </div>

    <div class="home_recent_auth">
    By <?php the_author(); ?>
    </div>

    </div>

    <?php endwhile; ?>

    <?php include('ad_home.php'); ?>

    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar('MiddleColumn') ) : ?>

    <div id="side_tag_cloud">

    <h3 class="mast">Browse</h3>

    <?php wp_tag_cloud(''); ?>

    </div>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    </div>

    </div> <!-- end home_content -->

    <?php get_footer(); ?>


    Here is the side bar php

    <div class="column span-3 last">

    <div id="side_categories">

    <h3 class="mast">Categories</h3>

    <?php $catid = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Asides'"); ?>

    <?php $catid2 = $wpdb->get_var("SELECT term_ID FROM $wpdb->terms WHERE name='Featured'"); ?>

    <ul class="cat">
    <?php wp_list_categories('title_li=&sort_column=name&show_count=0&show_last_updated=1&use_desc_for_title=1&exclude=' .$catid. ',' .$catid2. '') ?>

    </div>

    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar('RightColumn') ) : ?>

    <?php if (!( is_home() )) { ?>

    <?php include('ad_side.php'); ?>

    <?php } ?>

    <?php if (function_exists('c2c_get_recent_comments')) { ?>

    <div id="side_recent_comments">

    <h3 class="mast">Recent Comments</h3>

    <ul class="reccom">
    <?php c2c_get_recent_comments(5, "

  4. %comment_author% on %comments_URL%
  5. "); ?>

    </div>

    <?php } ?>

    <?php if (function_exists('get_mostemailed')): ?>

    <div id="side_most_emailed">

    <h3 class="mast">Most Emailed</h3>

    <ul class="email">
    <?php get_mostemailed('post', 5); ?>

    </div>

    <?php endif; ?>

    <?php endif; ?>

    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags