Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • I’m having the same issue. Find a solution?

    The following code is a good starting point. Just add it to your functions.php file.

    function show_any_post_status($queryVars) {
    	$queryVars->query_vars['post_status'] = 'any';
    	return $queryVars; // Return our modified query variables
    }
    add_filter('pre_get_posts', 'show_any_post_status');

    There are a number of issues with this code depending on your theme and particular situation. There is no way to show a particular combination of post statuses, like ‘publish’ and ‘future’. So this code shows ALL of them, including drafts (but not Trash).

    The HTML is generated by the widget itself and is not editable (or at least I don’t recommend it). The CSS is from the style.css.

    There is not currently any CSS in your theme that is specific to the recent comments. In order to style it directly, you can access the entire list using ul#recentcomments or each individual comment as li.recentcomments. For example, if you want your comments to get off the edges, adding the following to your style.css file will help.

    #sidebar ul#recentcomments {
      margin: 0px 5px;
    }

    I hope this helps. I should note that this is not the cleanest solution. By nature, the recent comments widget is an unordered list (the comments) inside of an unordered list (the widgets). I personally would write more generalized CSS for the widgets and lists-in-lists. However, this is going to effect the style of a large number of other elements. So I’m not going to go into that at this time.

    The thumbs are missing in both browsers. FireFox just ignores the missing thumb, while IE shows the red X. When using timthumb, the src attribute should point to an image file, but here it is blank. This is what is creating the problem.

    It’s difficult to help without seeing the code that is generating the content. Are you using a specific theme? Or is this code that you wrote yourself?

    Forum: Plugins
    In reply to: add_filter query_post

    I’m not somewhere I can test this code, but I would try something like:

    $where .= " AND (wp_posts.post_date >= '2009-03-01') AND (wp_posts.post_date < '2009-03-16')";

    …where wp_posts is the name of your WordPress Posts table.

    Because WordPress already has executed the original query for the page before it reaches your query_posts() call, you are nearly doubling the number of database calls made using this method. I suggest you check out this short article for a more efficient way to do achieve this goal.

    Thread Starter soulsizzle

    (@soulsizzle)

    That does, esmi. For whatever reason, the client asked that I disable autosave. I did so around the time I migrated their site from my test server to their production server, so I just assumed it was a server issue. I’m glad to finally have a reason why this is occurring.

    Thread Starter soulsizzle

    (@soulsizzle)

    I’m familiar with that article, and had already made the adjustments it suggested. It didn’t get me to the point where I can upload after “Save Draft,” when uploading directly to the media library, and in NextGen Gallery. However, I still can’t upload if I don’t Save Draft before hand.

    Thanks for your help anyways. This is my first project with IIS and hopefully my last.

    Thread Starter soulsizzle

    (@soulsizzle)

    It appears that the file is being uploaded with incorrect permissions. Unfortunately, this WordPress install resides on an IIS, and permissions are constant battle.

    Uploads work fine if I “Save Draft” before hand, am uploading directly in the media library, uploading images into a gallery using NGG, etc.

    The only time it is a problem is when uploading images to be inserted into a new, unsaved posts.

    I, personally, would be happy to simply “Save Draft” every time; however, this is a client project, and desirable to keep things simple for them.

    Thread Starter soulsizzle

    (@soulsizzle)

    I did this. I’ve also ensured that my directories have the proper permissions. Uploads work just fine if I “Save Draft” before hand. I’ve tried disabling all my plugins. They don’t seem to be the culprit.

    soulsizzle

    (@soulsizzle)

    It’s not ideal to hard-code ID’s into your PHP code. I always prefer to reference them by name using the get_cat_id() function in WordPress.

    For example:
    $category_id = get_cat_id('$19.95 Beats');

    Thread Starter soulsizzle

    (@soulsizzle)

    Also note that async-upload.php is being passed an attachment_id value of ‘0’. It seems in a blog that is working order passes some value instead of 0.

    Thread Starter soulsizzle

    (@soulsizzle)

    I had tested your code with the proper changes. Unfortunately, due to the conditional statement I listed above, this technique doesn’t work outside the homepage. I appreciate your help though as it did get down the right path.

    soulsizzle

    (@soulsizzle)

    The simplest way to do this is by placing the following code in your current theme’s functions.php file. I cover it in me detail in an article i wrote a little while back, Allowing WordPress Contributors to Upload Files.

    if ( current_user_can('contributor') && !current_user_can('upload_files') )
    	add_action('admin_init', 'allow_contributor_uploads');
    
    function allow_contributor_uploads() {
    	$contributor = get_role('contributor');
    	$contributor->add_cap('upload_files');
    }
    Thread Starter soulsizzle

    (@soulsizzle)

    Did some digging around in the WP code and found this line where WordPress does this sorting:

    if ( $this->is_home && $page <= 1 && is_array($sticky_posts) && !empty($sticky_posts) && !$q['caller_get_posts'] ) {

    So basically, no automated way to do this, because we’re not triggering the is_home() function and $page is not less than or equal to 1. So, I guess I’ll just have to do all the sorting myself. Thanks for your help anyway.

Viewing 15 replies - 1 through 15 (of 18 total)