I think it’s on now, here it is:
<?php
$how_many=5; //How many posts do you want to show
require_once('/nfs/c03/h04/mnt/57867/domains/news.deaf-monkey.com/html/wp-config.php'); // Change this for your path to wp-config.php file ?>
<ul id="whats-new">
<?
$news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code>,<code>comment_count</code>,<code>post_date</code> FROM $wpdb->posts
WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>=\"publish\" ORDER BY post_date DESC LIMIT $how_many");
foreach($news as $np){
printf ("<li><a href=\"%s\">%s</a> Posted: %s Comments: %s</li>", get_permalink($np->ID),$np->post_title,$np->post_date,$np->comment_count);
} ?>
</ul>
It’s showing nothing atm. http://www.deaf-monkey.com
Ok I am sorry I am making you more confused. Put your permalinks back to Default because they worked at one time.
<?php
$how_many=5; //How many posts do you want to show
require_once('domains/news.deaf-monkey.com/html/wp-config.php'); // Change this for your path to wp-config.php file ?>
<ul id="whats-new">
<?
$news=$wpdb->get_results("SELECT <code>ID</code>, <code>comment_count</code>, <code>post_date</code>,<code>post_title</code> FROM $wpdb->posts
WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>=\"publish\" ORDER BY post_date DESC LIMIT $how_many");
foreach($news as $np){
printf ("<li>%s <a href=\"http://news.deaf-monkey.com/index.php?p=%s\">%s</a> %s</li>", $np->post_date,$np->ID,$np->post_title,$np->comment_count);
}?>
</ul>
Alright, i just put permalinks back to default
and i just used the code you posted, still shows nothing ); dammit
interesting…can you put your original code in and see if it works again?
Lol, i just put in the original code which worked earlier. Now it doesnt O_O
You are taking the code tags out, right?
LOL! I forgot to do that for the last 2 tries, but it’s up now.
I’m using the latest piece of code you gave me:
<?php
$how_many=5; //How many posts do you want to show
require_once('domains/news.deaf-monkey.com/html/wp-config.php'); // Change this for your path to wp-config.php file ?>
<ul id="whats-new">
<?
$news=$wpdb->get_results("SELECT <code>ID</code>, <code>comment_count</code>, <code>post_date</code>,<code>post_title</code> FROM $wpdb->posts
WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>=\"publish\" ORDER BY post_date DESC LIMIT $how_many");
foreach($news as $np){
printf ("<li>%s <a href=\"http://news.deaf-monkey.com/index.php?p=%s\">%s</a> %s</li>", $np->post_date,$np->ID,$np->post_title,$np->comment_count);
}?>
</ul>
It looks alot better than earlier, now i guess it’s the part where i need to customize it to look something like the mini loop that dreamten.com has. Just as i asked earlier, is this too difficult for a newbie or?
Ok phew! I thought I was losing my mind
Open a new thread and ask for help on formatting the date and i can help you after you get that fixed. I could figure the date thing out but I can’t test it and going back and forth is wearing me out. Better to find someone who actually knows how to do it..
Good luck
Yeah, been a few hours now, hopefully someone gives some feedback to the other thread i made, the current mini loop is just horrid loll.