Forums

[resolved] Fancy Theme Homepage Problem (15 posts)

  1. Michael Dunbar
    Member
    Posted 1 year ago #

    Can anyone point me in the right direction? I have Fancy theme in a new site http://www.sportsprom.com which has an Intro Page. My problem is that I've pointed the Intro Page to be the Home Page but I now have BOTH! :(
    I just want to know what to change so I have the Intro Page only with no mention of Home.
    Thanks in advance! Mike

  2. SpankMarvin
    Member
    Posted 1 year ago #

    The cause depends on a couple of things:

    1. Is your theme using the WP 3.0 menus system? Probably not, given the issue...

    2. In the theme template, can you ascertain which WP function is creating your navigation? It could be wp_nav_menu() (unlikely), could be wp_page_menu() or could be wp_list_pages() -- it's likely that you will find this in your theme's header.php file.

    If you can post up the function here, it'll help us work out which course of action you need to take.

    John

  3. Michael Dunbar
    Member
    Posted 1 year ago #

    header.php coding listed below
    ---
    <?php
    global $options;
    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }

    /* default values */

    if ($fancy_main_color == '#DDDDDD') {
    $bubbles = 'bubbles.gif';
    $feed_image = 'feed.gif';
    $scissors = 'scissors.gif';
    $sep = 'sep-red.gif';
    }
    elseif ($fancy_main_color == '#DDDDDD') {
    $bubbles = 'bubbles-yellow.gif';
    $feed_image = 'feed-yellow.gif';
    $scissors = 'scissors-yellow.gif';
    $sep = 'sep-yellow.gif';
    }
    else {
    $bubbles = 'bubbles-green.gif';
    $feed_image = 'feed-green.gif';
    $scissors = 'scissors-green.gif';
    $sep = 'sep-green.gif';
    }
    ?>
    <head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

    <?php include(TEMPLATEPATH."/custom.php"); ?>

    <?php wp_head(); ?>
    </head>
    ---
    I hope this is what you were looking for.

    Thanks again, Mike

  4. SpankMarvin
    Member
    Posted 1 year ago #

    Hmm, doesn't go far enough into content. What's the next included file's content? From <body> through to the loop?

  5. Michael Dunbar
    Member
    Posted 1 year ago #

    Thanks again for keeping in touch.
    The file "Main Index Template" appears as follows:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN">

    <?php get_header(); ?>

    <body>
    <div class="main">
    <div class="container">
    <?php include (TEMPLATEPATH . "/navigation.php"); ?>

    <?php include (TEMPLATEPATH . "/banner.php"); ?>

    <div class="span-24 content">
    <div class="span-16 post-wrapper">

      <?php if (have_posts()) : ?>
      <?php while (have_posts()) : the_post(); ?>
      <li class="post">
      <div class="text-header">
      <h2 class="title">" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
      <span class="no"><?php comments_number('0', '1', '%', 'comments'); ?></span>
      <div class="clear"></div>
      </div>

      <div class="hr"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/<?php echo $scissors; ?>" alt="scissors" /></div>

      <div class="info-small">
      <span class="date"><?php the_time('F jS, Y') ?></span><span class="author"><?php the_author() ?></span><span class="cat"><?php the_category(', ') ?></span>
      </div>

      <?php the_content('Read the rest of this entry »'); ?>
      <div class="clear"></div>
      <?php the_tags('<span class="tag small"> Tags: ', ', ', '</span>'); ?>
      <?php edit_post_link('Edit', '<p class="edit">', '</p>'); ?>

      <?php endwhile; ?>
      <?php else : ?>

    • <h2>Not Found</h2>
      <p>Sorry, but you are looking for something that isn't here.</p>
    • <?php endif; ?>

    • <div class="post">
      <p class="alignleft"><?php next_posts_link(__('« Older Entries', 'default')) ?></p>
      <p class="alignright"><?php previous_posts_link(__('Newer Entries »', 'default')) ?></p>
      </div>

    </div>
    <div class="span-8 last sidebar">
    <?php get_sidebar(); ?>
    </div>
    </div>

    <?php get_footer(); ?>
    </div>
    </div>
    </body>
    </html>
    ---
    I see some navigation coding here so hope this is of use.

  6. Michael Dunbar
    Member
    Posted 1 year ago #

    Also: (navigation.php)

    <?php if ($fancy_logo_visibility == 'on') { ?>
    <div class="span-24 header">
    <?php if (is_home()) { ?>
    <h1 class="name">/"><?php bloginfo('name'); ?></h1>
    <?php } else { ?>
    <span class="name">/"><?php bloginfo('name'); ?></span>
    <?php } ?>
    <span class="slogan"><?php bloginfo('description'); ?></span>
    </div>
    <?php } ?>

    <div class="span-24 menu">

      <li class="<?php if ( is_home() ) { ?>current_page_item<?php } ?>">/" title="">Home

      <?php if ($fancy_pages_visibility == "on") { ?>
      <?php $exclude_pages = get_option('fancy_pages_to_exclude'); ?>
      <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&exclude=' . $exclude_pages);?>
      <?php } ?>

      <?php if ($fancy_cats_menu_visibility == "on") { ?>
      <?php $exclude_cats = get_option('fancy_cats_to_exclude'); ?>
      <?php wp_list_categories('orderby=name&depth=1&title_li=0&show_count=1&exclude=' . $exclude_cats); ?>
      <?php } ?>

      <li class="feed">" title=""><img src="<?php bloginfo('stylesheet_directory'); ?>/img/<?php echo $feed_image; ?>" alt="Feed icon" />

    </div>

  7. MAS
    Member
    Posted 1 year ago #

    create a page as "Home" and put the whole content from Intro page.

    Now create a file as page-home.php. Copy the code from page.php file and put it into page-home.php. If it work, so delete the intro page and mark this issue as resolve.

  8. Michael Dunbar
    Member
    Posted 1 year ago #

    No such luck - I've now got 2 Home Pages and an Intro (without deleting Intro Page) This would mean 2 Home Pages. I'll try backing up site and looking further at coding.
    Thanks to you both for your time.
    Anyone else got an idea I would really appreciate it.

  9. SpankMarvin
    Member
    Posted 1 year ago #

    It looks like the theme is set up to have an "exclude pages" feature that writes itself to the list_pages function. Is there an options menu in your dashboard, and if so is there the ability to choose NOT to show pages?

  10. Michael Dunbar
    Member
    Posted 1 year ago #

    There is a Theme Functions php file as follows:

    <?php

    if ( function_exists('register_sidebar') ) {
    register_sidebar(array(
    'name' => 'Yellow',
    'before_widget' => '<div id="%1$s" class="%2$s yellow">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="title-1 block">',
    'after_title' => '</h3>',
    ));

    register_sidebar(array(
    'name' => 'Green',
    'before_widget' => '<div id="%1$s" class="%2$s green">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="title-1 block">',
    'after_title' => '</h3>',
    ));

    register_sidebar(array(
    'name' => 'Pink',
    'before_widget' => '<div id="%1$s" class="%2$s pink">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="title-1 block">',
    'after_title' => '</h3>',
    ));

    }

    /* -------------------------------------------------
    SEARCH WIDGET
    -------------------------------------------------- */
    // define the widget
    function widget_search() {
    global $tag_widget_title;
    ?>

    <div class="widget_search">
    <h3 class="title-1 block">Search</h3>
    <div class="paddings">
    <form action="<?php bloginfo('home'); ?>/" method="post">
    <div class="search">
    <label for="search" class="hidden">Search for:</label>
    <input type="text" value="" size="15" id="search" name="s"/>
    <input type="submit" value="Search"/>
    </div>
    </form>
    <span class="clear"></span>
    </div>
    </div>

    <?php
    }

    // if wp supports widgets, register it (make it available)
    if (function_exists('register_sidebar_widget'))
    register_sidebar_widget('Search', 'widget_search');

    $themename = "Fancy";
    $shortname = "fancy";
    $options = array (

    array( "name" => "Main color",
    "id" => $shortname."_main_color",
    "type" => "select",
    "std" => "#FE0059",
    "options" => array("Pink" => "#FE0059", "Green" => "#92CE0C", "Yellow" => "#FEB400"),
    ),
    array( "name" => "Second color (used for rollovers)",
    "id" => $shortname."_second_color",
    "type" => "select",
    "std" => "#92CE0C",
    "options" => array("Pink" => "#FE0059", "Yellow" => "#FEB400", "Green" => "#92CE0C"),
    ),
    array( "name" => "Background",
    "id" => $shortname."_background",
    "type" => "select",
    "std" => "bg.gif",
    "options" => array("Neutral (plain)" => "bg-neutral-plain.gif", "Neutral (pattern 1)" => "bg.gif", "Neutral (pattern 2)" => "bg-neutral-pattern2.gif",
    "Neutral (pattern 3)" => "bg-neutral-pattern3.gif", "Neutral (pattern 4)" => "bg-neutral-pattern4.gif",
    "Pink (plain)" => "bg-pink-plain.gif", "Pink (pattern 1)" => "bg-pink.gif", "Pink Bright (pattern 1)" => "bg-pink-bright.gif", "Pink (pattern 2)" => "bg-pink-pattern2.gif",
    "Pink (pattern 3)" => "bg-pink-pattern3.gif", "Pink (pattern 4)" => "bg-pink-pattern4.gif",
    "Yellow (plain)" => "bg-yellow-plain.gif", "Yellow (pattern 1)" => "bg-yellow.gif", "Yellow Bright (pattern 1)" => "bg-yellow-bright.gif",
    "Yellow (pattern 2)" => "bg-yellow-pattern2.gif", "Yellow (pattern 3)" => "bg-yellow-pattern3.gif", "Yellow (pattern 4)" => "bg-yellow-pattern4.gif",
    "Green (plain)" => "bg-green-plain.gif", "Green (pattern 1)" => "bg-green.gif", "Green Bright (pattern 1)" => "bg-green-bright.gif", "Green (pattern 2)" => "bg-green-pattern2.gif",
    "Green (pattern 3)" => "bg-green-pattern3.gif", "Green (pattern 4)" => "bg-green-pattern4.gif"),
    ),
    array( "name" => __("Logo + tagline visibility", 'default'),
    "id" => $shortname."_logo_visibility",
    "type" => "select",
    "std" => "on",
    "options" => array("Show" => "on",
    "Hide" => "off"
    ),
    ),
    array( "name" => __("Pages visibility in the main menu", 'default'),
    "id" => $shortname."_pages_visibility",
    "type" => "select",
    "std" => "on",
    "options" => array("Show" => "on",
    "Hide" => "off"
    ),
    ),
    array( "name" => __("Categories visibility in main menu", 'default'),
    "id" => $shortname."_cats_menu_visibility",
    "type" => "select",
    "std" => "off",
    "options" => array("Show" => "on",
    "Hide" => "off"
    ),
    ),
    array( "name" => "Font size",
    "id" => $shortname."_font_size",
    "type" => "select",
    "std" => "13px",
    "options" => array("Smaller" => "13px", "Bigger" => "15px"),
    )
    );

    foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }

    if ($fancy_main_color == '#FE0059') {
    $bubbles = 'bubbles.gif';
    $feed_image = 'feed.gif';
    $scissors = 'scissors.gif';
    $sep = 'sep-red.gif';
    }
    elseif ($fancy_main_color == '#FEB400') {
    $bubbles = 'bubbles-yellow.gif';
    $feed_image = 'feed-yellow.gif';
    $scissors = 'scissors-yellow.gif';
    $sep = 'sep-yellow.gif';
    }
    else {
    $bubbles = 'bubbles-green.gif';
    $feed_image = 'feed-green.gif';
    $scissors = 'scissors-green.gif';
    $sep = 'sep-green.gif';
    }

    function mytheme_add_admin() {

    global $themename, $shortname, $options;

    if ( $_GET['page'] == basename(__FILE__) ) {

    if ( 'save' == $_REQUEST['action'] ) {

    foreach ($options as $value) {
    update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }

    foreach ($options as $value) {
    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }

    wp_redirect("themes.php?page=functions.php&saved=true");
    die;

    } else if( 'reset' == $_REQUEST['action'] ) {

    foreach ($options as $value) {
    delete_option( $value['id'] ); }

    header("Location: themes.php?page=functions.php&reset=true");
    die;

    }
    }
    add_theme_page($themename." Options", "Fancy Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
    }

    function mytheme_admin() {

    global $themename, $shortname, $options;

    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p>'.$themename.' settings saved.</p></div>';
    if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p>'.$themename.' settings reset.</p></div>';

    ?>
    <div class="wrap">
    <h2><?php echo $themename; ?> settings</h2>

    <form method="post">

    <table class="optiontable">

    <?php foreach ($options as $value) {

    if ($value['type'] == "text") { ?>

    <tr valign="top">
    <th scope="row"><?php echo $value['name']; ?>:</th>
    <td>
    <input name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_option( $value['id'] ) != "") { echo get_option( $value['id'] ); } else { echo $value['std']; } ?>" />
    </td>
    </tr>

    <?php } elseif ($value['type'] == "select") { ?>

    <tr valign="top">
    <th scope="row"><?php echo $value['name']; ?>:</th>
    <td>
    <select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
    <?php foreach ($value['options'] as $key => $val) { ?>
    <option value="<?php echo $val; ?>"<?php if (get_option ( $value['id'] )) {if ( get_option( $value['id'] ) == $val) { echo ' selected="selected"'; }} elseif ($val == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $key; ?></option>
    <?php } ?>
    </select>
    </td>
    </tr>

    <?php
    }
    }
    ?>

    </table>

    <p class="submit">
    <input name="save" type="submit" value="Save changes" />
    <input type="hidden" name="action" value="save" />
    </p>
    </form>
    <form method="post">
    <p class="submit">
    <input name="reset" type="submit" value="Reset" />
    <input type="hidden" name="action" value="reset" />
    </p>
    </form>

    <?php
    }

    add_action('admin_menu', 'mytheme_add_admin');

    function mytheme_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    <div class="com-wrapper <?php if (1 == $comment->user_id) echo "admin"; ?>">
    <div id="comment-<?php comment_ID(); ?>" class="com-header">
    <?php echo get_avatar( $comment, 48); ?>

    <p class="tp">
    <span><?php comment_author_link() ?></span>
    <?php if ($comment->comment_approved == '0') : ?>
    <?php _e('Your comment is awaiting moderation', 'default'); ?>.
    <?php endif; ?>

    <small class="commentmetadata">
    " title=""><?php printf( __('%1$s at %2$s', 'default'), get_comment_time(__('F jS, Y', 'default')), get_comment_time(__('H:i', 'default')) ); ?>
    <?php edit_comment_link(__('Edit', 'default'),'  ',''); ?>
    </small>
    </p>
    <div class="clear"></div>
    </div>

    <?php comment_text() ?>
    <div class="reply">
    <p><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></p>
    </div>
    </div>
    <?php
    }

    function mytheme_ping($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>

    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    <div class="com-wrapper">
    <div id="comment-<?php comment_ID(); ?>" class="com-header">
    <img height="48" width="48" class="avatar avatar-48 photo" src="<?php bloginfo('stylesheet_directory'); ?>/img/link.png" alt="Link"/>

    <p class="tp">
    <span><?php comment_author_link() ?></span>
    <?php if ($comment->comment_approved == '0') : ?>
    <?php _e('Your comment is awaiting moderation', 'default'); ?>.
    <?php endif; ?>

    <small class="commentmetadata">
    " title=""><?php printf( __('%1$s at %2$s', 'default'), get_comment_time(__('F jS, Y', 'default')), get_comment_time(__('H:i', 'default')) ); ?>
    <?php edit_comment_link(__('Edit', 'default'),'  ',''); ?>
    </small>
    </p>
    <div class="clear"></div>
    </div>

    <?php comment_text() ?>
    </div>
    <?php
    }

    ?>

    ---
    I've tried excluding certain functions but none just drop the 'Home' duplication.

    Your help is very much appreciated

  11. MAS
    Member
    Posted 1 year ago #

    yu want this type of functionality

    http://www.ebsprojects.com/pinksirenmedia/

  12. Michael Dunbar
    Member
    Posted 1 year ago #

    Well Yes, but without the pink or Latin typography...

    How does this answer my question though?

    :)

  13. MAS
    Member
    Posted 1 year ago #

    so follow my above direction which i hve already posted. I creating the http://www.ebsprojects.com/pinksirenmedia/ according to that direction.

  14. alchymyth
    The Sweeper
    Posted 1 year ago #

    it might work if you delete this:
    <li class="<?php if ( is_home() ) { ?>current_page_item<?php } ?>">/" title="">Home</a></li>
    from navigation.php
    (the real code, as this got corrupted because you did not use the 'code' buttons for inserting code into this editor)
    and rename the 'intro' page to 'home'

  15. Michael Dunbar
    Member
    Posted 1 year ago #

    alchymyth - You are a STAR!

    Worked first time. Thanks to all for their comments, shows that the WordPress community is working well!

    (Still don't know what 'chinmoy' was on about though :)

Topic Closed

This topic has been closed to new replies.

About this Topic