Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Forum: Plugins
    In reply to: Awful theme

    Yes, please. Constructive criticism and bug reports would help with future updates to the theme, and make Wu Wei better for everyone.

    Thank you.

    When I put this code:

    <?php
    $mylimit=14 * 86400; //days * seconds per day
    $post_age = date('U') - get_post_time('U');
    if ($post_age < $mylimit) {
    echo 'this post is within my date limit ';
    }
    ?>

    before my loop if statement, it gives me exactly what I want, which is posts from the last X days, in this case 14. But when I click the “next” button to go to the next page, it comes up empty. Is there a way for the next button to get the next 14 days worth of posts? I’d be great if there was a plugin to do this, where we could set an option like the one in the admin interface to say “display X posts/days”.

    I would like to know as well, because I’m having the same issue.

    Out of curiosity, does anyone know what Matt is using? He seemed to update without a hiccup, so perhaps he has his own personal plugin to make headline images.

    Thank you! This solution is in essence what I was trying to do, but instead of passing a parameter, a global variable is set. There must be a more elegant way to do it, but I’ll be damned if I know.

    Kudos for getting us a working version.

    From what I’ve been able to figure out, the new the_title() function doesn’t pass the ‘before’ parameter to the PHP, even when display = false is enabled. If we could figure out a way to pass a parameter (or an extra parameter) to the plugin hook, I think we could solve the problem.

    Anyone know how to pass parameters to a plugin?

    I believe this has something to do with the new parameters for the_title() function now, as it seems to have a “before”, “after”, and “display” setting.

    Unfortunately, I’m not familiar enough with PHP to adapt the plugin to these changes.

    Thread Starter jeff_n

    (@jeff_n)

    Thanks…I’ll try that plugin. If it doesn’t work I think I may just accept that the site doesn’t validate, cause it seems rather silly to me.

    Thread Starter jeff_n

    (@jeff_n)

    I seem to have fixed the problem, with a plug-in by Rich Hamilton, called “Category Visibility” (based on code written by Keith McDuffee.

    Here’s the link.

    https://ryowebsite.com/?p=46

    Mr. McDuffee’s version originally included a limitation where 10 posts were queried, but if two of them were hidden, only 8 posts were returned. I was having the same problem – If one post was queried, but one of them was marked as hidden, 0 posts were returned. However, Mr. Hamilton’s excellent work has solved the problem.

    Another shining example of the WordPress community.

    Thread Starter jeff_n

    (@jeff_n)

    Yes, that’s it exactly. For example, if you take a look at the code:

    <?php while (have_posts()) : the_post();?>

    <?php if ( !(in_category(‘6’)) ) { ?>

    //…do stuff

    <?php } ?>

    <?php endwhile; ?>

    When there are multiple posts displayed on the page, the loop will only do something if the post is not from category 6 (and consequently skip the post text from being displayed). However, when there is only one post displayed AND it is in category 6, it will simply skip the post text and display my template with no text. I would like it instead to possibly run another query and get the next post.

    By the way, congratulations on your two years at the WordPress forums, Moshu. ??

    Thread Starter jeff_n

    (@jeff_n)

    Sorry, I do mean one post on the main index, not the single post template. The single post template I believe is used as a permalink, which includes all the comments. However, what I want is the main page to display only one post per page (which I can set with the “Show at most: 1 post” under options), but to exclude a specific category.

Viewing 11 replies - 1 through 11 (of 11 total)