Forum Replies Created

Viewing 15 replies - 16 through 30 (of 32 total)
  • thanks, Kafkaesqui! your code works:

    <?php
    if(is_single()) :
    global $post; $id = $post->ID;
    foreach((get_the_category()) as $cat) :
    ?>
    <p><?php $my_query = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->post2cat WHERE category_id = '$cat->cat_ID' AND ID = post_id AND post_id <> '$id' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 10"); ?>
    <?php while(list(,$post) = each($my_query)) : ?>
    <h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <?php endwhile; ?>
    </p>
    <?php endforeach; endif; ?>

    I was doing it a little different when using your previous code which was why it didn’t work for me.

    Your code kind of works. If I add the following code before your code, it works fine:
    <?php foreach((get_the_category()) as $cat) {
    $cat->cat_ID;
    } ?>

    If I add the following or not:
    <?php global $post; $id = $post->ID; ?>

    I get this error:
    “Warning: Variable passed to each() is not an array or object in /home/happy/public_html/wp-content/themes/john-3-col/single.php on line 24”

    Kafkaesqui, thanks for your help. ?? Let me know if you see any problems with this and if not, I’ll post my final code so others can use it.

    Ok, I found out why it isn’t working for me.

    <?php $my_query = new WP_Query("cat=$cat&showposts=10"); ?>

    This code works perfectly well when I am adding it in the archive.php.

    The thing is I want it to be used right below the actual post which is in single.php. So this is what I used:

    <?php foreach((get_the_category()) as $cat) { ?>
    <p><?php $my_query = new WP_Query("cat=$cat->cat_ID&showposts=10"); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <?php endwhile; ?> </p>
    <?php } ?>

    This works. When I am viewing a post, it creates a list of posts that are in the same category of the post I am viewing. The only problem is that it also lists the post I am viewing in the list. Is there a way to skip the post I am reading?

    ok just to clarify a little bit. I tried using the follow code and it works in just putting out the most recent posts:

    <?php $my_query = new WP_Query('category_id=1&showposts=10'); ?>

    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <?php endwhile; ?>

    However, I want it to spit out the most recent posts from the current category.

    Alphaoide, when you said do example 2 from CODEX, I am a little lost and what I am exactly suppose to do.

    hi, I’ve been reading this and haven’t had luck making things work. What exactly did you use?

    Thread Starter greatbananas

    (@greatbananas)

    At the very very top, the header image is pushed down 2 px in IE 6 but in Firefox it’s fine. The shadow on either side isn’t pushed down because that’s a different image. Only the header image is pushed down a little bit in IE.

    Thread Starter greatbananas

    (@greatbananas)

    ah, thank you! that was the problem. I was using a custom theme and it did not have the page.php in there. I added the default page.php into the folder and that did not work. So I changed my theme to the default theme and that worked.

    [code]rel="external nofollow"[/code]

    So is having two variables in there OK?

    Also I still don’t understand why it needs to be labeled as “external”

    Thanks.

    I am having the same problem as snowfall. Anyone know of a hack that does this?

    installed xfish and it worked fine.

    There’s only one problem for me. For my frontpage, I have added my own meta tag description just for the frontpage in the index.php. Now I want to have seperate meta tag descriptions for each individual post pages.

    What xfish does is take all the meta tag descriptions from all the individual post pages and combines them to create a meta tag description for the frontpage. In my case, on the frontpage, I have two seperate meta tag descriptions, the one I made and the one xfish makes which is a problem.

    It would be a great feature for xfish if there is an option to disable the xfish generated meta tag description just for the frontpage. The reason is, I want to have a general description for my whole site when found on the search engine, and then each individual post will have it’s own description when people find those pages on the search engines.

    Forum: Plugins
    In reply to: WP-Cache

    Weird. I followed the simple 3 step instruction to install the plugin but nothing happens at all. Not even errors. https://www.happycrumb.com is my site. I also have semaphores modules on the server. If anyone had this problem please let me know. Thanks.

    Forum: Plugins
    In reply to: WP-Cache

    how do I know it is working properly? Should the cache folder be filled with files after I load it?

    Forum: Plugins
    In reply to: WP-Cache

    Anyone had luck enabling or installing the sysvsem module that is required to have the WP-Cache to work?

    Forum: Plugins
    In reply to: Dashboard for 1.2.x

    This is really nice. Worked like a charm.

    Thread Starter greatbananas

    (@greatbananas)

    thanks for the advice. ?? I will give simple php gallery a try when I have time later this week. I think if that doesn’t work, I’m going to go with Menalto Gallery. Pictorialis isn’t exactly what I want since I want to show multiple images within a blog.
    The problem I had with iimage was when it tried to create thumbnails. I get the same problem with Exhibit. For Pictpress, it can creat 3 thumbnails and anything more than that fails.
    I am thinking it could be a problem with Imagemagick. Although I have full countrol of my server, I’m not too sure how to configure Imagemagick. I’m hoping GD will give me better luck.

Viewing 15 replies - 16 through 30 (of 32 total)