WordPress.org

Ready to get started?Download WordPress

Forums

Errors with my template... (15 posts)

  1. Olivia
    Member
    Posted 9 years ago #

    I've been having errors with my WP as I've been editing the template. Can anyone guide me through the errors?

    This is my WP; http://artificial-reality.net/wp/index.php

    This is my template; http://artificial-reality.net/wp/template.txt

    The current error I am recieveing is...
    Parse error: parse error, unexpected '=' in /hsphere/local/home/artific/artificial-reality.net/wp/index.php on line 5

    Help?

  2. Kafkaesqui

    Posted 9 years ago #

    You're using ticks around your argument query-string in wp_get_archives(). Use straight single or double quotes.

  3. Olivia
    Member
    Posted 9 years ago #

    I apologize, but I don't know what a tick is. :\

  4. Kafkaesqui

    Posted 9 years ago #

    It's a single quote that's NOT a quote. Note how the ones surrounding your argument query string (type=monthly&format=link) slant to the right. This is often an issue when using copy&paste from a word processor.

    In any case, make sure to use regular, 'straight' quotes:

    'type=monthly&format=link'

  5. Olivia
    Member
    Posted 9 years ago #

    Ah, okay, thank you. I've fixed that... but now I'm recieving another weird error.

    Warning: main(0php’): failed to open stream: No such file or directory in /hsphere/local/home/artific/artificial-reality.net/wp/index.php on line 3

    Warning: main(0php’): failed to open stream: No such file or directory in /hsphere/local/home/artific/artificial-reality.net/wp/index.php on line 3

    Fatal error: main(): Failed opening required '0php’' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/artific/artificial-reality.net/wp/index.php on line 3

  6. Kafkaesqui

    Posted 9 years ago #

    require(’wp-blog-header.php’);

    Should be

    require('wp-blog-header.php');

    Just start digging through your template, and reenter the single quotes wherever they exist. I suspect this is going to be most of your errors, because looking at:

    http://artificial-reality.net/wp/template.txt

    I can see "ticks" crawling all over it. :)

  7. Olivia
    Member
    Posted 9 years ago #

    Well, I've gone through that and gotten rid of all the ticks...
    But still recieving an error.

    Parse error: parse error, unexpected '>' in /hsphere/local/home/artific/artificial-reality.net/wp/index.php on line 15

    And I updated http://artificial-reality.net/wp/template.txt

  8. Kafkaesqui

    Posted 9 years ago #

    In this case, you just missed entering one:

    <?php the_date(','<strong>','</strong>'); ?>

    should be

    <?php the_date('','<strong>','</strong>'); ?>

    Typical programmer's error. You're a PHP adept now. ;)

  9. Olivia
    Member
    Posted 9 years ago #

    Ah, I see...

    But, ah, this is so odd. I'm getting that other error again; the longer one.

  10. yearginsm
    Member
    Posted 9 years ago #

    Line 15 reads:

    <?php the_date(','<strong>','</strong>'); ?>&nbsp;-&nbsp;<?php the_time() ?>

    Now for your php lesson. The the_date() function requires three arguments, as such:

    <?php the_date('date_format','before','after',display); ?>

    Your friendly Wiki support document should help you out there.

  11. yearginsm
    Member
    Posted 9 years ago #

    Whoops, a little slow. Your error above looks like a misconfigured base directory. I'll leave this one to the folks with more spare time on their hands, as I seem to be a step behind.

  12. Kafkaesqui

    Posted 9 years ago #

    I can see those ticks again in your txt file. What are you using to edit the template?

    Here's your template as it should be (works on my site):

    http://guff.szub.net/source/fragment-21009.php

  13. Olivia
    Member
    Posted 9 years ago #

    Well, that did work, thanks!

    I was editing right in my WP templates on my site.

    But, why is it that my content is appearing before my date...?

  14. Kafkaesqui

    Posted 9 years ago #

    Probably something to do with the table, in that its tags are not being closed up after each interation of the loop.

  15. Olivia
    Member
    Posted 9 years ago #

    Ah, you were correct again! :D

    Thank you so much for all of your help, I think I'm going to like WordPress!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.