Forum Replies Created

Viewing 15 replies - 76 through 90 (of 129 total)
  • Forum: Themes and Templates
    In reply to: Mini-loop

    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=\"https://news.deaf-monkey.com/index.php?p=%s\">%s</a> %s</li>", $np->post_date,$np->ID,$np->post_title,$np->comment_count);
    }?>
    </ul>
    Forum: Themes and Templates
    In reply to: Mini-loop

    Settings > Permalinks

    I think…

    Forum: Themes and Templates
    In reply to: Mini-loop

    ah! you’re not using permalinks. can you turn those on and then try my code without you manually putting the URL in there.

    Forum: Themes and Templates
    In reply to: Mini-loop

    geeze…the forum is trashing the code… all code tags need to be backtics `

    let me know if that works out for you

    Forum: Themes and Templates
    In reply to: Mini-loop
    <?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>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>
    Forum: Themes and Templates
    In reply to: Mini-loop

    er ok nevermind man it would help if i could read. *outside* of wordpress… let me start all over

    Forum: Themes and Templates
    In reply to: Mini-loop

    the ordered list tag in your code you posted is what is numbering it. if you change that to an unordered list you’ll get bullets instead of numbers…but that query looks way too complicated.

    Forum: Themes and Templates
    In reply to: Mini-loop
    <ul class="recent">
    <?php $the_query = new WP_Query('showposts=5&orderby=post_date&order=desc');
    
    while ($the_query->have_posts()) : $the_query->the_post();
    
    $do_not_duplicate = $post->ID; ?>
    
    <li><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title(); ?>"><?php echo strip_tags(get_the_title(), '<a>'); ?></a></li>
    
    <?php endwhile; ?>
    </ul>

    Does that look a little easier to swallow?

    Forum: Themes and Templates
    In reply to: Mini-loop

    That looks way more complicated than it should be, I think. Can you show me where in the codex you found that?

    Ok i did a search and the ones that display properly have a class of:
    hentry p4 post publish author-admin category-at-risk-youth category-community-projects

    The ones that don’t look like this:
    hentry p5 page publish author-admin category-aikido tag- y2008 m12 d27 h13

    There is no .page class and the .post class is what gives your content the margins…

    So I copied your .post css style and renamed it to .page and everything looks fine. Give it a shot on your end.

    I don’t see any problems with anything. Hopefully you found a workaround. If not, try dumping your cache and refresh.

    I would look at other themes first to get an idea of how to setup single.php. There are a few ways I have done this. The first way is using single.php and the other way is using if/else statements. For example: If is homepage, display 6 posts as excerpts else display the full content and meta data.

    To me…single.php is the better way.

    The cheap and dirty way of just getting something done, try duplicating index.php, rename it to single.php, remove the excerpting, and give it a shot. WordPress knows single.php is to display a single post. There is some magic happening in the background, but I sure don’t know what it is ??

    Do you have a single.php file in your theme directory? If you don’t, I believe that WP falls back on index.php for everything.

    link?

    Link?

Viewing 15 replies - 76 through 90 (of 129 total)