WordPress.org

Ready to get started?Download WordPress

Forums

Same Format (11 posts)

  1. Jabbok
    Member
    Posted 9 years ago #

    I have some short articles that I keep as permanent links on my page. They are saved as .html with a plain white background. I would like to use the same template that I have for my blog. Can this be created? How would I get a clean sheet to paste my article on and how would I link to that?
    Thanks...

  2. moshu
    Member
    Posted 9 years ago #

    Well, I have done something similar: my WP-blog has been integrated in a website, and all the pages use the same template. Here is what I did.
    In the index.php file used in the blog I deleted THE LOOP from the div "post" and pasted my text instead. (Where it was necessary I modified the menu sidebar, too.) You can see it here http://www.transycan.net/wp/ - just click on the menu items at top to see the other pages.

  3. Jabbok
    Member
    Posted 9 years ago #

    Very Nice! That is exactly what I'm looking for. Is this the code that you modified?
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>

    Where is THE LOOP? and how did you save each page? Was it like: index1.php, index2.php?

  4. moshu
    Member
    Posted 9 years ago #

    About The Loop see the wiki.
    You can save the pages with any name: whatever.php. I even saved them in a different directory, but in that case you should modify the path in the very first line in the files:
    <?php
    /* Don't remove this line. */
    require('../path_to_directory/wp-blog-header.php');
    ?>

  5. Jabbok
    Member
    Posted 9 years ago #

    I copied the "index.php" into my editor and replaced the loop with my text. I saved it under "test.php" and created a link to the page. Nothing loads. I get a blank page. Any suggestions?

  6. Beel
    Member
    Posted 9 years ago #

    Couldn't find it to take a look. Anything in the source of the blank page?

  7. moshu
    Member
    Posted 9 years ago #

    URI to the test page?

  8. moshu
    Member
    Posted 9 years ago #

    Hmmm... You stated above that

    I copied the "index.php" into my editor and replaced the loop with my text.

    Do NOT copy. Just open it, and Save as... e. g. "pink_sovereignity.php" and do NOT change anything else - except pasting your text instead of the loop!
    And yes, leave there everything at the top, especially the "wp-blog-header.php" at the end of your directory path !
    By looking at the source of your test page it's obvious that this is not based on the WP index.php file, because your file uses CAPITAL LETTER TAGS, which is not XHTML compliant, so it doesn't come from WP :)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
    <BODY>
    </BODY>
    </HTML>

    You sholud have something like this from WP:
    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- The Vesuvius WordPress Interface 1.20 -->
    <head profile="http://gmpg.org/xfn/1">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <style type="text/css" media="screen">
    @import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
    </style>
    ....[etc]
    </head>
    <body>
    etc...

    Try it again, it should work!
    If it doesn't work email me at moshu at transycan dot net.

  9. Jabbok
    Member
    Posted 9 years ago #

    This can't be that hard. Others are doing it so why am I having so much trouble. I want this done, though, so I'll keep on working on it, with everyones help I hope! :)
    I changed the top line to look like this:
    <?php
    /* Don't remove this line. */
    require('http://www.theirvins.com/wordpress/wp-blog-header.php'); ?>

    I still just get a blank page. I'm baffled.
    Tim

  10. moshu
    Member
    Posted 9 years ago #

    As I can see it's working now isn't it? :)
    Though not in the articles directory. I can only guess, but I suspect 2 reasons why it isn't working there:
    1. Probably the path to the wp-blog-header.php is not correct
    2. I am afraid when you copied "your text" into the "content" div you put there the whole file, not only the text itself (i.e. what was in between the p tags)
    BTW, the link on your main page still takes the reader to the articles directory :(

  11. Jabbok
    Member
    Posted 9 years ago #

    I stripped everything. What I have left is basically an HTML document. I never could get the "Tabbed Sidebar" stuff to work properly on the "Linked to" or "Article" page. I'm still going to stay with this format....for now. I may play some more with it but I'm worn out.
    You can see what it looks like here. I just included a straight shot link back to the blog in the sidebar. The javascript menu still works though. I'm going to re-format my other articles and use this exclusively instead of the opening page.
    Thanks for all your help...
    Tim

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.