• hi !

    I am newbie with wordpress. I managed to install “clean archives plugin and it works fine in my sidebar.

    I tried to create a separate archive page like:
    http://www.sporadicnonsense.com/archives/

    To do that i have created a page in php and just insert the code in the body:

    <?php srg_clean_archives(); ?>

    But am getting the following error:
    Fatal error: Call to undefined function: is_category() in …..

    can anyone help me with creating a separate archive page?

    regards
    sameer

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter freotech

    (@freotech)

    can i use the wordpress option “write page” ?

    how do i insert the codes in the post ?

    <?php srg_clean_archives(); ?>

    If you want to a “archives” page, you should create an archives.php template file in your theme directory.

    Go to /wp-content/themes/<your-theme-name> and create archives.php there. In that file put something like:


    <?php
    /*
    Template Name: Archives
    */
    ?>
    <?php get_header(); ?>
    <div id="content" class="widecolumn">
    <h2>Archives</h2>
    <ul>
    <?php srg_clean_archives(); ?>
    </ul>
    </div>
    <?php get_footer(); ?>

    Now when you go to the Write Page section, create the Page slug and title as you would and then from the Template drop down box, choose Archives. Save the page and now when you go to <domain.com>/archives, you should have what you need.

    Change the archives.php file to suit your needs. I used the defalt Kubrick archives.php as an example here.

    Regards

    Thread Starter freotech

    (@freotech)

    Works fine !

    Thanks for your help

    freotech

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Inserting Plugin’ is closed to new replies.