How to set this stuff right? >>>> www.xxxx.ph/xxx.php

First of all, This is my first time here. Nice meeting you all. Hope you can help me with this problem.

I have a site called >>> www.popsicles.ph

In the frontpage 4 recent blog posts are posted at the top

Now, I wanted to have another area where all blog posts can be display. Not in the frontpage ofcourse.

So I tried making a new php file and I come up with this:

[php]

<?php global $trns_options, $trns; ?> <?php if(is_home() ) { bloginfo('name'); ?> | <?php bloginfo('description'); } ?> <?php if(is_single() || is_page() || is_archive() || is_tag() || is_category() ) { wp_title('',true); ?> | <?php bloginfo('name'); } ?> <?php if(is_404()) { ?> <?php echo $trns["404"]; ?> | <?php bloginfo('name'); } ?> <?php if(is_search()) { ?><?php echo $trns["seresults"]; ?> <?php echo wp_specialchars($s, 1); ?> | <?php bloginfo('name'); } ?> @import url( <?php bloginfo('stylesheet_url'); ?> );
<!--[if IE 6]>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/includes/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript">DD_belatedPNG.fix('#logo img, #footer_logo img, #slider2 img');</script>
    <style media="screen,projection" type="text/css">#videos li{padding:0 0 0 7px; }</style>
<![endif]-->    

<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'); if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>    
<?php wp_head(); ?>
/*Example CSS for the two demo scrollers*/ #pscroller1{ width: 780px; height: 13px; font-size: 12px; border: 1px solid #D0D0D0; margin:4px 10px 0px 0px; padding: 3px 0px 3px 5px; float:right; background-color: #FEFEFE; } #pscroller2{ width: 350px; height: 20px; border: 1px solid black; padding: 3px; } #pscroller2 a{ text-decoration: none; } .someclass{ //class to apply to your scroller(s) if desired }
Popsicles Updates
</div>

<div id="header">

pop

  • Home
  • Pop Forum
  • <?php wp_list_pages('include=150,3708,185&sort_column=menu_order&title_li='); ?>
    </ul>
<div id="contentBody">

            <div id="primaryTopMid">
                    <a class="titleCatName" href="<?php query_posts(''); ?>">LATEST NEWS</a>
    <?php $count = 0;?>
    <?php query_posts($query_string . '&cat=-5229'); ?>

  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <div class="post" id="post-<?php the_ID(); ?>">

                    <div class="featuredPost<?php if ($que3 == $trns_options["fea3PostCount"]) { ?> lastPost<?php } ?>">
                        <h2 class="postTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?> &raquo;</a></h2>
<?php $image = get_post_meta($post->ID, 'thumbnail', true); ?>

<?php the_title(); ?>

                        <p><?php if($trns_options['enableAName'] == 1) { ?><span class="author"><?php the_author_posts_link(); ?></span><?php } ?> <?php if($trns_options['enableDate'] == 1) { ?><span class="date"><?php the_time($trns_options["timeFormat"]); ?> |<?php } ?></span> <?php print string_limit_words(get_the_excerpt(), 17); ?>...</p>
                        <div class="clear"></div>

                        <span class="featuredPostMeta"><?php the_time($trns_options["dateFormat"]) ?> / <?php comments_popup_link(__($trns["nocomment"]), __($trns['comment1']), __($trns['comments']));?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $trns["readmore"]; ?></a><?php edit_post_link('Edit',' / ',''); ?></span>



                    </div>
                    </div>
          

        <?php endwhile; ?>

        <?php else : ?>

      <?php endif; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    </div><!-- /contentbody -->

</div><!-- /wrapper -->
    <?php get_footer(); ?>
[/php]

I place it in this location: /home4/popsicl2/public_html/news.php

I have no training background on php and I only rely on tutorials in the net so I just copy and paste the stuff on that php codes I posted above that would appear similar to this:
[php]

PHP Test <?php echo '

Hello World

'; ?> [/php]

source: http://www.php.net/manual/en/tutorial.firstpage.php

when I tried viewing it on this link/url > http://popsicles.ph/news.php

An error occured, it says:

Fatal error: Call to undefined function bloginfo() in /home4/popsicl2/public_html/news.php on line 6

I tried fixing this for a couple of days already and have not come up with a solution thats why Im asking for experts help. Guys, please help me.

the error is due to calling a function that the page cannot find : bloginfo()

looking at the page it looks like a wordpress page, are you using wordpress?

yes sir, I’am using wordpress. I wonder if what I can do about it

I believe you can make pages within wordpress admin, then you select what template the page would use which will determine functionality like bringing in all blog posts for instance.

so adding a php file to display my blog post is not part of the option?

because what I really want is something like this

soompi.com to soompi.com/news

I think you make templates within the theme directory and assing a template to a page in the admin,

this article should help: http://codex.wordpress.org/Pages

Sponsor our Newsletter | Privacy Policy | Terms of Service