WordPress.org

Ready to get started?Download WordPress

Forums

Disable a theme (6 posts)

  1. twelve_o_clock
    Member
    Posted 1 year ago #

    Is there a way to disable the theme so that it is not visible on just one specific page?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    no

    you could create a page template for that specific one page http://codex.wordpress.org/Pages#Page_Templates
    the template does not need to link the style.css, which holds most of the characteristic formatting of a theme, and can have a totally different html structure.

  3. twelve_o_clock
    Member
    Posted 1 year ago #

    Thanks for the quick response. I created a blank template but it caused my whole page to end up blank instead of displaying only content without other aspects of the theme. I used the following code to make the blank template:

    <?php
    /*
    Template Name: Blank Template
    */
    ?>

    I experimented by adding code like <!-- #content --> and <?php the_content(); ?> to the template (based on what I saw at the page.php template for the twentyeleven theme) but it still did not work.

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    a 'blank template' refers to 'no visible output'; it still needs to have the necessary structure for a html page, i.e. DOCTYPE declaration, <html>, <head> <body> etc.

    what exactly are you trying to achieve with the specific page?

    to illustrate the idea, here is an example page template (for Twenty Eleven) which would not show any header, sidebar, nor footer - just content: http://pastebin.com/ZiteZrUX

  5. twelve_o_clock
    Member
    Posted 1 year ago #

    What I'm trying to achieve is to transfer an HTML document into WordPress. I copied and pasted the source code of the HTML document into a new page in WordPress but this leaves a header and footer and a place to leave comments, none of which I want. I need to make the WordPress page look exactly like the original HTML page.

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    here another sample page template - just HTML within the body tag; no WordPress loop or so:

    http://pastebin.com/5UZ48fvu

    if you don't want any 'WordPress' styles, remove this line:
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    and add a link to the essential stylesheet for the HTML code instead.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags