Forum Replies Created

Viewing 15 replies - 136 through 150 (of 879 total)
  • my question is essentially whether people think using wordpress is a good idea and whether it is possible to do this without making core mods (plugins only).

    Yes, I think it’s a good idea. Of course, I’m a little biased towards WordPress, but I have done several projects that sound somewhat similar to what you describe, using WordPress and plugins—never any core mods.

    Why not use the WordPress API?

    $descendants = get_categories(array('child_of' => 41));

    $children = get_categories(array('parent' => 41));

    Note that $children will contain just the immediate child categories, but $descendants will include all descendant categories, including grand-children, great-grandchildren, etc.

    Sorry to ask the obvious, but you do have a callback function for the “updateUserScores” action hook, right?

    If you do and the callback is never called, then you should check if WordPress’s built-in cron is working at all. Try a couple of other plugins that use the cron functionality, or look at the “cron” option in the wp_options database table to see if scheduled pings are piling up in there and not being discharged.

    This is probably a PHP configuration issue, which your site’s host should be able to solve for you.

    Forum: Fixing WordPress
    In reply to: Slow trackbacks?

    First, I would check that your trackbacks are not simply being marked as spam.

    Second, pingbacks and the like are done on a WordPress “cron” job; if the WordPress cron isn’t working—which can happen for a number of reasons—then your trackbacks might never be sent out.

    One way to tell if cron is not working is to look in your database (using PHPMyAdmin or the like). Find the row in the wp_options table where the option_name is “cron”:

    SELECT * FROM wp_options WHERE option_name = 'cron';

    If there’s a huge amount of text there, more than likely your cron is not working, and the cron jobs are piling up.

    I think you want get_userdatabylogin():

    $user = get_userdatabylogin('myusername');
    echo $user->ID; // prints the id of the user
    Forum: Fixing WordPress
    In reply to: Post by Catergory

    Instead of

    $catergory = new WP_Query(cat_id=current_catergory);

    you want

    $catergory = new WP_Query("cat=$current_category");

    where $current_category holds the integer id of the desired category.

    By the way, I’d fix the misspelling of $catergory just because it’s likely to confuse things later.

    The permalink that you edit is called the “slug,” and it’s located just underneath the post title, after the post has been saved.

    It sounds like not all of the new files were uploaded, especially some in the wp-admin directory. Try re-uploading the 2.7 files.

    want to make a reusable template which drags posts from different categories with the same tag name on to one page.

    If you want to create a template that shows posts from particular category, just create a template file named like category-12.php where “12” is the category id number of the category whose posts you want to show.

    Alternatively, if you have a regular page template, you can query posts by category and get the same results with the following:

    query_posts(array('cat' => 12));

    Or search by category name:

    query_posts(array('category_name' => 'MyCategory'));

    Thanx very much filosofo. can you mention a good plugin that will work with 2.7?

    A plugin to do what?

    Forum: Fixing WordPress
    In reply to: Show Snippet

    i mean how to show post 5 until post 10

    5-10: that’s 6 posts. And to start with the 5th you need to offset by 4:

    query_posts(array(
       'showposts' => 6,
       'offset' => 4,
       'random' => true,
       'category__not_in' => array(17),
    ));

    What’s happening is that the category page that shows when you click “Amazing Moments” shows automatically-generated excerpts of the posts in those categories. WordPress generates that excerpt automatically by trying to strip out markup, but it’s doing a poor job of it in the case of that first post, because it’s leaving in some of the Flash code.

    The most direct way to address it is to create a custom excerpt for that post by putting text you want as the excerpt in the “excerpt” field.

    A longer-term solution would be to use a plugin to add the Flash code instead of just pasting it in the write field, as most such plugins will not include the Flash code in an excerpt, preventing this problem.

    It depends on how you were doing the multiple loops. In PHP 5, setting a variable to an object (such as $wp_query) creates a reference to that object rather than a clone of the object, as in PHP 4. To imitate PHP 4’s behavior, you might need to clone the object.

    To use the default, you have to upload an avatar at gravatar.com

    However, the get_avatar function used by WordPress can be redefined to do whatever you want (it’s “pluggable“), in case you want to use your own avatars or a service other than Gravatar’s.

Viewing 15 replies - 136 through 150 (of 879 total)