Viewing 5 replies - 1 through 5 (of 5 total)
  • no

    you could create a page template for that specific one page https://codex.www.ads-software.com/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.

    Thread Starter twelve_o_clock

    (@twelve_o_clock)

    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.

    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: https://pastebin.com/ZiteZrUX

    Thread Starter twelve_o_clock

    (@twelve_o_clock)

    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.

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

    https://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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable a theme’ is closed to new replies.