Same Format (11 posts)

  1. Jabbok
    Posted 11 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?

  2. moshu
    Posted 11 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
    Posted 11 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
    Posted 11 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:
    /* Don't remove this line. */

  5. Jabbok
    Posted 11 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
    Posted 11 years ago #

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

  7. moshu
    Posted 11 years ago #

    URI to the test page?

  8. moshu
    Posted 11 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">
    <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>

    You sholud have something like this from WP:
    /* Don't remove this line. */
    <!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 );

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

  9. Jabbok
    Posted 11 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:
    /* 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.

  10. moshu
    Posted 11 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
    Posted 11 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...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.