• I’m trying to add an optional theme to my third-party hosted wordpress blog.

    I have uploaded the theme code to the themes directory on my ftp server. However, the added theme does not show up as an option when I’m trying to post a page in wordpress.

    In researching that problem, I found that people suggested that I “reactivate” my main theme.

    I’m worried about doing that because I have “tweaked” the main theme with some of my own php coding, and I’m afraid that reactivating the theme will get rid of all my changes to the theme.

    How can I get my newly created theme to show up without creating more problems by screwing up my main theme?

    Thanks!

    Brian

Viewing 7 replies - 1 through 7 (of 7 total)
  • What exactly did you upload to the wp-content/themes folder?

    Thread Starter bquass

    (@bquass)

    I uploaded the following, and saved it under a directory named newposts — in the place where all the other theme directories are located:

    <?php
    /*
    Template Name: All posts
    */
    ?>
    <?php
    $debut = 0; //The first article to be displayed
    ?>
    <?php while(have_posts()) : the_post(); ?>
    <h2><?php the_title(); ?></h2>
    <ul>
    <?php
    $myposts = get_posts('numberposts=-1&offset=$debut');
    foreach($myposts as $post) :
    ?>
    <li><?php the_time('d/m/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul>
    <?php endwhile; ?>

    If you’re trying to add this file as a custom page template, you need to place it in your current theme’s folder in wp-content/themes.

    Thread Starter bquass

    (@bquass)

    I have it placed in wp-content/themes. It’s the same directory that has subdirectories like “default” and “graycorporate.” Do I need to put the template in
    wp-content/themes/default ?

    Moderator James Huff

    (@macmanx)

    Yes, the template needs to be upload the directory of the theme that it relates to.

    If you are using the Default theme, it needs to be uploaded to the /wp-content/themes/default/ directory.

    Thread Starter bquass

    (@bquass)

    Thanks James and Esmi,

    I tried copying the Allpost folder (containing the PHP code I posted above) under both the classic theme folder and the default theme folder, but I still see no new theme to choose from when I create a new page on word press — the dropdown list for themes still has only three: default, archives & link.

    Try reviewing the page at the link I gave above.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Trouble adding additional theme’ is closed to new replies.