Forum Replies Created

Viewing 15 replies - 16 through 30 (of 31 total)
  • Forum: Themes and Templates
    In reply to: Post Loop

    Not exactly sure what you mean, but I think you want to format it more like a traditional WordPress loop:

    <?php $recent = new WP_Query("cat=1&showposts=4"); 
    
    if ($recent->have_posts()) :
    
    while($recent->have_posts()) : $recent->the_post();?>
    
    <div class="post">
    <h2 class="postTitle"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    <div class="postMeta">
    <span class="date"><?php the_time('M.d, Y') ?></span> in
    <span class="filed"><?php the_category(', '); ?></span>
    <span class="commentcount"><?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?></span>
    </div>
    <div class="postContent"><?php the_content(); ?></div>
    </div> <!-- Closes Post -->
    
    <?php endwhile;
    
    else :
    
    //put your else code here
    
    endif; ?>

    peace~

    Forum: Alpha/Beta/RC
    In reply to: 2.8 beta widget bug

    There is a huge change with widgets code in WP2.8 (amongst many other code changes), and unless your theme author says the theme is specifically compatible up to 2.8, you may have to wait awhile. 2.8 is a pretty big release in terms of needing code updates to keep individual themes working properly.

    From personal experience with the theme I’ve been developing, singular widgets are likely to be fine for now, but any multi-widgets will probably need some rewriting to be compatible with 2.8. I was using the same code that makes up the new 2.8 multi-widgets for my theme prior to 2.8, and I still had to rewrite a lot of code to make the multi-widgets 2.8-compatible. Any multi-widgets coded with just the WP documentation as a guide are going to need a lot more work than what I had to do.

    Dynamic sidebars in general have gotten some updates as well, and things that used to work fine pre-2.8 might not be compatible with 2.8+

    If you value your theme over the new widgets and theme administration, you might not want to upgrade to 2.8 until the theme author announces that the theme is compatible.
    peace~

    Kvetch! or Requests and Feedback are the appropriate places for that type of feedback. As for distinguishing between active and inactive plugins, there are links just below the ‘Manage Plugins’ title at the top of the page that allow you to switch views between ‘All’, ‘Active’, ‘Recently Active’, ‘Inactive’, and ‘Upgrade Available’ plugins.
    In addition, when viewing the ‘All’ plugins list, the inactive plugins have grey titles/text, the active plugins have black titles/text, and the plugins with available upgrades have bold black notifications on them as well.
    peace~

    please excuse my mistake (I was a little tired when trolling here, winding down after some long hours of coding)!
    755 is not world-writeable for folders ??
    in fact, 0755 is the proper permission for most folders and 0644 is best for most files (unless you know better).
    peace~

    Forum: Fixing WordPress
    In reply to: Speed

    There seem to be an aweful lot of queries taking place on your site. That is caused by plugins or the theme (you may want to reevaluate your plugins first since you care more about the theme).
    One thing that will really speed up the site that you currently don’t have going is gzip compression of the html page.
    If you feel comfortable doing so you can place this right at the top of your theme’s header file (or whatever file your theme uses), before the DOCTYPE so that this line:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    becomes this:
    <?php ob_start('ob_gzhandler'); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    That will enable gzip compression for capable browsers, which will really speed things up.
    I also notice a lot of javascript in the head area of your html documents as well. All the javascript can be moved to just before the closing </body> tag. This should provide another good boost.
    Last simple suggestion is you’ve got a huge amount of CSS styling loading directly in the header. That’s ok on the site homepage but you’ll want it in an external .css file for other pages so that viewers don’t have to reload that for every page (the browser will cache it after the first load).
    Check out this yahoo resource for more ideas
    peace~

    Forum: Alpha/Beta/RC
    In reply to: 2.8 beta widget bug

    I’ve been using 2.8 for awhile and haven’t had any problems like this with FF3. Have you tried clearing your browser cache with an F5 refresh (or a ctrl+shift+del clear private data)? It could be that some older versions of javascripts are hanging around causing trouble.
    If that doesn’t work then maybe try switching your theme to a different one and back again if it wouldn’t be too much hassle? WordPress does some stuff on theme activation that could be the key to your headaches.
    peace~

    building from gszhl’s and razorguy’s posts:

    <?php
    $my_title_cats = '';
    foreach (get_the_category() as $category)
       $my_title_cats .= $category->cat_name . '&nbsp;&rsaquo;&nbsp;&nbsp;';
    echo substr($my_title_cats, 0, -26);
    ?>

    is one way that might work for you.
    peace~

    I just mentioned this a couple days ago in another post but here it is again. Delete the entire ‘upgrade’ folder from your wp-content folder in your WordPress install. This will not damage anything, and furthermore I recommend doing so after every upgrade. I’ve done this many times and in fact, if I neglect to do so before attempting to upgrade again (especially for a core upgrade), the upgrade will generally fail (with similar errors to the ones you guys are describing)! I assume this is because I do not set any of my file/folder permissions to world-writeable (755 or 777)??? I’ve had sites hacked a few times and as such will not allow my files/folders to have world-writeable permissions.

    Presently this post is still coming up at the top of google for register_setting, so check out Handling Plugins Options in WordPress 2.8 with register_setting() by planetOzh ??
    peace~

    I haven’t tried WP-Options-Manager (also hadn’t heard of it before now) but I notice the version on it is very low. I’ve been using Clean Options for awhile and like it very much. It looks like they both do about the same thing, I wonder about that…

    I also wanted to mention that you can safely delete the entire ‘upgrade’ folder from your wp-content folder in your WordPress install without causing any damage, and furthermore I recommend doing so after every upgrade. I’ve done this many times and in fact, if I neglect to do so before attempting to upgrade again (especially for a core upgrade), the upgrade will generally fail! I assume this is because I do not set any of my file/folder permissions to world-writeable??? I’ve had sites hacked a few times and as such will not allow my files/folders to have world-writeable permissions.

    On a side note, the Clean Options plugin lets you preview what’s in your options before deleting them, lets you exclude ‘known core wordpress options’ from the options it finds for you, and also lets you search the options on google with a simple click (if you are unsure about them). It will find unused options for you (some of the options it finds are also still in use, but usually it won’t make a difference to delete those, as they are automatically regenerated by WordPress).

    Anyway, you shouldn’t have any trouble upgrading from 2.7.1 to 2.8. But if you want to start fresh with 2.8, 2.8-beta2 was just released this evening and, having used 2.8 since pre-beta1 status, I haven’t run into any major bugs yet (though I’m not using it on any production blogs yet). You can grab the 2.8-beta2 from here.

    peace~

    Thread Starter Tynan Beatty

    (@junsuijin)

    It seems my previous assessment was a tad hasty! Upon further inspection I decided to rework the caching of my widgets, and discovered that ob_get_flush() was actually not to blame. The problem lies in the returning of the cached widget contents.

    The problem is with the code that reads something like the following:

    if (isset($cache[$args['widget_id']]))
       return $cache[$args['widget_id']];

    I fixed it by changing it to the following:

    if (isset($cache[$args['widget_id']]))
       echo substr($cache[$args['widget_id']][1], 1);

    As otherwise the widget contents get echoed twice. I can only assume that this is a bug with the current wp_caching methods?

    Any of the main devs want to look into this???

    Thread Starter Tynan Beatty

    (@junsuijin)

    Nevermind!!! I just figured out that the problem was with the use of ob_get_flush(); in the recent posts widget, and the custom widgets that I modeled after it. I changed them around to follow the format of the default recent comments widget and it seems to have fixed the problem. I’ll leave this up in case anyone else has any trouble, and recommend that the default recent posts widget be changed to accomodate those of us that wrap the sidebar output in an output buffer).

    peace~

    Thanks much for the headstart you’ve given with your code. I’m going to use it for something similar. Did you figure out how to reset the count for multiple sidebars? Why not just explicitly reset your global variable to 0, immediately after calling any dynamic sidebar? You could employ a second filter to do this for you.

    add_filter('dynamic_sidebar','custom_widget_counter_reset', 99);
    add_filter('dynamic_sidebar_params','custom_widget_counter');
    function custom_widget_counter_reset($text) {
       global $my_widget_num;
       $my_widget_num = 0;
       return $text;
    }

    I haven’t tested this but it (or something similar to it) should work. I’m not sure the order of the filters, but you could otherwise reset it immediately prior to calling any dynamic sidebar if this approach doesn’t work.

    BTW, you’ve got a great blog going there Justin (greenshady), I’ve come across it several times while googling solutions to my would-be WP problems ??
    peace~

    I just found this plugin. Haven’t tried it yet but it looks good and will hopefully save me much time. It seems from lines 33–47 of the wp-js-compress.php file in the version 2.0.6 code, that the gzip’d version is indeed cached.

    if(extension_loaded('zlib') &amp;&amp; substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){
    		ob_start('ob_gzhandler');
    		header('Content-Encoding: gzip');
    	} else {
    		ob_start();
    	}
    
    	header("Content-type: text/javascript; charset: UTF-8");
    	header("Cache-Control: max-age=".$wp_js['cache']);
    	header("Expires: " .gmdate("D, d M Y H:i:s", time() + $wp_js['cache']) . " GMT");
    
    	if (!wp_js_is_expired($wp_js['file']) &amp;&amp; @file_exists('cache/'.wp_js_filename($wp_js['file']))) {
    			include('cache/'.wp_js_filename($wp_js['file']));
    	 } else {
    		ob_start("wp_js_clean");

    peace~

    A client of mine had the same problem. It’s a problem that some hosts have with php mailing. I’ve been changing this line of code in the plugin’s wp-contact-form-7.php file…

    $mail_headers = "From: $mail_sender\n";

    to the following line of code:

    $mail_headers = "From: $mail_sender\nReply-to: $mail_sender\n";

    This is line number 289 in the current release.

    Your mail client may not use the reply-to header tag by default, but you’ll at least be able to see the address of your contacter if your mail client allows you to see the reply-to header, or the raw headers (like gmail).

    Would be nice if we had this change included into the plugin so I don’t have to keep manually editing the file on updates ??

    Great job on the plugin btw. <3 jQuery.
    peace~

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