Disable a theme (6 posts)

  1. twelve_o_clock
    Posted 3 years ago #

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

  2. Michael
    Forum Moderator
    Posted 3 years ago #


    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
    Posted 3 years 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:

    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. Michael
    Forum Moderator
    Posted 3 years 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
    Posted 3 years 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. Michael
    Forum Moderator
    Posted 3 years ago #

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


    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