Lissa Explains it All:  Web Design Forums  

Go Back   Lissa Explains it All: Web Design Forums > LEIA Archives > Web Site Help > Advanced Programming

Notices

 
 
Thread Tools Display Modes
  #1  
Old 12-23-2004, 08:36 PM
Chris's Avatar
Chris Chris is offline
The one.
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 4,447
Chris is a jewel in the roughChris is a jewel in the roughChris is a jewel in the rough
Wordpress template help

I'm trying to setup my new blog using Wordpress.

At the moment, I'm trying to get the template to look like my site, but I am finding the template quite difficult to understand.

Could someone be so kind as to post the parts of code I need to display the following:
  • The date
  • The title
  • The blog itself
  • The poster
  • The time it was posted at
  • The comments link

Thank you,
Chris
__________________
by Christopher
Sponsored Links
  #2  
Old 12-24-2004, 01:00 PM
Monkey Bizzle's Avatar
Monkey Bizzle Monkey Bizzle is offline
<-- lindsAy
 
Join Date: Feb 2004
Location: Craptown, Va.
Posts: 7,646
Monkey Bizzle will become famous soon enoughMonkey Bizzle will become famous soon enough
Here is the default WP template. I am going to make red the things that you need for it to work, as well as the things you asked for. Once you see them, you should be able to figure out which is which and be able to recognize the format of a WP tag.

<?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">

<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>

<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
</head>

<body>
<div id="rap">
<h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>

<div id="content">
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

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

<div class="post">
<h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>

<div class="storycontent">
<?php the_content(); ?>
</div>

<div class="feedback">
<?php wp_link_pages(); ?>
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

</div>

<!--
<?php trackback_rdf(); ?>
-->

<?php include(ABSPATH . 'wp-comments.php'); ?>
</div>

<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

</div>



<div id="menu">

<ul>
<?php get_links_list(); ?>
<li id="categories"><?php _e('Categories:'); ?>
<ul>
<?php wp_list_cats(); ?>
</ul>
</li>
<li id="search">
<label for="s"><?php _e('Search:'); ?></label>
<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
<div>
<input type="text" name="s" id="s" size="15" /><br />
<input type="submit" name="submit" value="<?php _e('Search'); ?>" />
</div>
</form>
</li>
<li id="archives"><?php _e('Archives:'); ?>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li id="calendar">
<?php get_calendar(); ?>
</li>
<li id="other"><?php _e('Other:'); ?>
<ul>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php"><?php _e('Login'); ?></a></li>
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php"><?php _e('Register'); ?></a></li>
</ul>
</li>
<li id="meta"><?php _e('Meta:'); ?>
<ul>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Syndicate this site using RSS'); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> 2.0'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php _e('The latest comments to all posts in RSS'); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr> 2.0'); ?></a></li>
<li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php _e('Powered by WordPress; state-of-the-art semantic personal publishing platform.'); ?>">WP</a></li>
</ul>
</li>

</ul>

</div>

</div>

<p class="credit"><!--<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. --> <cite><?php echo sprintf(__("Powered by <a href='http://wordpress.org' title='%s'><strong>WordPress</strong></a>"), __("Powered by WordPress, state-of-the-art semantic personal publishing platform")); ?></cite></p>
</body>
</html>
  #3  
Old 12-24-2004, 05:24 PM
Chris's Avatar
Chris Chris is offline
The one.
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 4,447
Chris is a jewel in the roughChris is a jewel in the roughChris is a jewel in the rough
I keep getting the same two errors:

Parse error: parse error, unexpected T_ENDFOREACH in /home/silence/public_html/index.php on line 47

and if I delete that part of code, I get an error:

Parse error: parse error, unexpected T_ENDIF in /home/silence/public_html/index.php on line 45

My main part of code is:

PHP Code:
<div class="blog">
<div class="blogheader">
<?php the_date('','<h2>','</h2>'); ?>
</div>
<p>
<?php the_title(); ?><br><br>
<?php the_content(); ?><br><br>
<div align="right">
<?php the_author() ?> at <?php the_time() ?> | <?php wp_link_pages(); ?>
<?php comments_popup_link
(__('C omments (0)'), __('Comments (1)'), __('Comments (%)')); ?>

 <!--
<?php trackback_rdf(); ?>
-->

<?php include(ABSPATH 'wp-comments.php'); ?>
</div>
<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</p>


</div>
I'm guessing that something is wrong, or is in the wrong place. If you could help, I would be most appreciated.

Thanks,
Chris
__________________
by Christopher
  #4  
Old 12-24-2004, 10:57 PM
Monkey Bizzle's Avatar
Monkey Bizzle Monkey Bizzle is offline
<-- lindsAy
 
Join Date: Feb 2004
Location: Craptown, Va.
Posts: 7,646
Monkey Bizzle will become famous soon enoughMonkey Bizzle will become famous soon enough
did you keep the red stuff in the header?
  #5  
Old 12-24-2004, 11:44 PM
Chris's Avatar
Chris Chris is offline
The one.
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 4,447
Chris is a jewel in the roughChris is a jewel in the roughChris is a jewel in the rough
Do you mean the

<?php
/* Don't remove this line. */
require('./wp-blog-header.php');
?>

part?

If so, then yes I kept it at the beginning of my code.
__________________
by Christopher
  #6  
Old 12-25-2004, 03:44 AM
Monkey Bizzle's Avatar
Monkey Bizzle Monkey Bizzle is offline
<-- lindsAy
 
Join Date: Feb 2004
Location: Craptown, Va.
Posts: 7,646
Monkey Bizzle will become famous soon enoughMonkey Bizzle will become famous soon enough
i think i know what the problem is... you have your index in your main directory while the wordpress files are in another directory? if that is the case, then you should change that line of code in the last post to

<?php
/* Don't remove this line. */
require('./wordpressfolder/wp-blog-header.php');
?>
  #7  
Old 12-25-2004, 08:55 PM
Chris's Avatar
Chris Chris is offline
The one.
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 4,447
Chris is a jewel in the roughChris is a jewel in the roughChris is a jewel in the rough
The file wp-blog-header.php is in the same directory.

The original top code was:

<?php
/* Don't remove this line. */
require('./wp-blog-header.php');
?>

but when I changed it to

<?php
/* Don't remove this line. */
require('/wp-blog-header.php');
?>

I got just one error:
Fatal error: Call to undefined function: the_date() in /home/silence/public_html/index.php on line 33

This is quite difficult. I'm such a dunce at these kind of things.

Thanks,
Chris
__________________
by Christopher
  #8  
Old 12-26-2004, 03:42 AM
Monkey Bizzle's Avatar
Monkey Bizzle Monkey Bizzle is offline
<-- lindsAy
 
Join Date: Feb 2004
Location: Craptown, Va.
Posts: 7,646
Monkey Bizzle will become famous soon enoughMonkey Bizzle will become famous soon enough
don't change it. leave it as ./

so you just installed wordpress to your main directory instead of creating a folder for it?
  #9  
Old 12-26-2004, 10:51 AM
Chris's Avatar
Chris Chris is offline
The one.
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 4,447
Chris is a jewel in the roughChris is a jewel in the roughChris is a jewel in the rough
Ye, I did. I can put it into a folder. Will that make things better?

Thanks,
Chris
__________________
by Christopher
  #10  
Old 12-26-2004, 05:24 PM
Monkey Bizzle's Avatar
Monkey Bizzle Monkey Bizzle is offline
<-- lindsAy
 
Join Date: Feb 2004
Location: Craptown, Va.
Posts: 7,646
Monkey Bizzle will become famous soon enoughMonkey Bizzle will become famous soon enough
lol i dunno! i created a new directory for mine called wordpress and installed everything into there. then i followed a tutorial on how to make your WP index your main index page. when i find the link again, i will post it here for you.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.