Please Read First
Troubleshooting Tips
Frequently Asked Questions
Before Posting Please Disable Wp Super Cache Plugin
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
Forum Video

Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2010
    Posts
    31
    Rep Power
    0

    Default Remove the Archive Heading

    I need to put up a one page notice type site with no archives. How can I remove the Archive heading so it doesn't show at all. ie: home page post shows archives for -June 2010, It will not change so I do not want it "dated". Thanks!

  2. #2
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,446
    Rep Power
    12

    Default

    Just edit archive.php and look for the different titles.


    <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h2 class="pagetitle">Author Archive</h2>

  3. #3
    Join Date
    Jun 2010
    Posts
    31
    Rep Power
    0

    Default

    Thanks Dan! As Always an extremely fast reply and solution! Big Mike

  4. #4
    Join Date
    Sep 2010
    Posts
    7
    Rep Power
    0

    Default Removing or replacing Archive heading

    Hi,

    How do I remove the heading that appears when you click on Categories ...

    Archive for the ‘XXXX’ Category.

    OR ...Maybe change it to something like "Excerpts for the 'XXXX' Category" and reduce the font size so it's not quite so prominant.

    I'm a complete newbie to editing code etc. so need to know where and what to delete or replace.

    Anyone have any other examples for changing this title ?

    regards and thanks


    Alan

  5. #5
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,446
    Rep Power
    12

    Default

    Edit archive.php

    Look for..

    <h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>

    You can remove that entire line.

    Or you can change the h2's to h3's to reduce size.

    Then in the style.css file

    Look for this line in style.css

    h2 { font-size:16pt;font-family: arial,helvetica,san-serif;}

    Below it add

    h3 { font-size:14pt;font-family: arial,helvetica,san-serif;}

  6. #6
    Join Date
    Jun 2010
    Location
    Singapore
    Posts
    16
    Rep Power
    0

    Default Additional help a little required

    Hi guys,

    I've been following all your instructions but I still could not get rid of the "Archive for the ‘XXX’ Category".

    Can someone please guide me which else to delete so I would get rid of them in all my categories' pages?

    My website: http://www.smileatchris.com

    Thank you!!!

    Below are my edited script:

    <?php

    /**

    * Socrates Premium Theme for Wordpress

    * (c) 2010 Flying Monkey Media, Inc.

    * http://www.socratestheme.com

    * Version 2.02.b7

    *

    * Development Team:

    * Jon Carroll (jc)

    *

    * @File index.php

    * @Version 20100615

    *

    */

    get_header();

    include "topAd.php";

    //include "sidebar.php";

    //include "sidebar2.php";

    $inpost1counter = 0;

    $inpost2counter = 0;

    $layout = get_option("layoutOptions");

    if($layout['sidebar'] == 'styleBothSides.css') {

    include "sidebar.php";

    }

    ?>



    <div id="im-mainContent" class="im-mainContent">

    <?php if (have_posts()) : ?>



    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

    <?php /* If this is a category archive */ if (is_category()) { ?>

    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>

    <?php /* If this is an author archive */ } elseif (is_author()) { ?>

    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>

    <?php } ?>





    <div class="navigation">

    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>

    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>

    </div><br>



    <?php while (have_posts()) : the_post(); ?>

    <div <?php post_class() ?>>

    <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

    <small><div class="postAuthor">By <?php the_author_posts_link(); ?> on <?php the_time('l, F jS, Y') ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div></small>



    <div class="entry">

    <?php

    $topAd = get_option("socratesOptions");

    $custom_fields = get_post_custom($post->ID);

    if($topAd['inpostad1'] != '' and !is_category() and $inpost1counter<$topAd['inpostadmaxrepeat'] && !$custom_fields['_mcf_postDisableInPostAd'][0]) {

    echo '<div id="socratesinpostad" style="float:'.$topAd['inpostposition'].'; display:block; padding:5px; margin:0;">'.stripslashes($topAd['inpostad1']).'</div>';

    $inpost1counter++;

    }

    ?>

    <?php the_excerpt(); ?>

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">Read More...</a>

    </div>

    <?php

    if($topAd['inpostad2'] != '' and !is_category() and $inpost2counter<$topAd['inpostad2maxrepeat'] && !$custom_fields['_mcf_postDisableInPostAd'][0]) {

    echo '<div id="socratesinpostadbottom" style="clear: both; display: block;">'.stripslashes($topAd['inpostad2']).'</div><br>';

    $inpost2counter++;

    }

    ?>



    <?php

    $topAd = get_option("socratesOptions");

    if($topAd['authon'] != 'off') { ?>



    <?php } ?>



    </div>



    <?php endwhile; ?>



    <div class="navigation">

    <div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>

    <div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>

    </div>

    <?php else :



    if ( is_category() ) { // If this is a category archive

    printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));

    } else if ( is_date() ) { // If this is a date archive

    echo("<h2>Sorry, but there aren't any posts with this date.</h2>");

    } else if ( is_author() ) { // If this is a category archive

    $userdata = get_userdatabylogin(get_query_var('author_name'));

    printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);

    } else {

    echo("<h2 class='center'>No posts found.</h2>");

    }

    get_search_form();



    endif;

    ?>

    </div><!-- /im-mainContent -->



    <?php

    $layout = get_option("layoutOptions");

    if($layout['sidebar'] != 'styleBothSides.css') {

    include "sidebar.php";

    }

    include "sidebar2.php";

    ?>



    <div class="line"></div>





    <?php get_footer(); ?>

  7. #7
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,446
    Rep Power
    12

    Default

    Disable WP super cache or view with different browser to see changes.

  8. #8
    Join Date
    Jun 2010
    Location
    Singapore
    Posts
    16
    Rep Power
    0

    Default

    Thank you very much, followed as you said, and now I fixed it.

    By the way, is WP super cache an essential plugins? I've seen many recommending to activate it, but no matter how many times I read the description, I don't see any changes when activating or deactivating it.

    Cheers,
    Chris Chua

  9. #9
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,446
    Rep Power
    12

    Default

    It will increase your load time and bandwidth usage.. it's not essential but it is important. Just disable it for known users.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •