Garland-revisited WordPress Theme

Garland-revisited

A flexible, three-column theme with customizable colors.

Design based on Themetastic for Drupal by Stefan Nagtegaal and Steven Wittens.

I took this theme and gave it new life by making it 2.7 compatible, the color changer in the admin section is also fixed.

Latest version is always here at the theme database http://wordpress.org/extend/themes/garland-revisited

Test blog for the theme is here

1.9 current release

1.6 css fix

1.5 Sidebar disable options added to admin page, many fixes!

1.1 Fixes bugs.

1.0.0 Updated for wordpress 2.8. Cleaned up css. Added rss and ping links.

0.9.6 More bugs fixed, almost final version now! Admin link in header added, only shows if admin is logged in. Blockquote css added to options with nice transparent .png.

0.9.5 Fixed bugs

0.9.4 Option for fixed/full width in admin, footer was not showing in IE, new css.php used for custom colors so page still validates always, blog tag smaller and italic.

0.9.3 Bug found in functions.php stopping the theme preview from redrawing.

0.9.2 HTML fix in comments.php, now validates fully. Search.php added with custom output and highlighted searchterms.

0.9.0 First release.

wp-super-cache users please add the following to your rejected URI’s:- garland_css=1 super-cache plugin adds a comment to the cached css which firefox does not like!

Garland-revisited WordPress Theme

227 thoughts on “Garland-revisited WordPress Theme

  1. julie says:

    Yes, it has a footer. Is that the problem? It worked fine in IE after I removed an Amazon widget from the sidebar, but it did not work in Firefox

    1. pross says:

      can you show me an example?
      I have a new version with an updated comments page, fixed a html error, not sure if its related at all tho.
      I’d like to make sure this is fixed before i make it public on the themes database…

  2. blogshopping says:

    This theme is great! I really like this style. It looks really professional. I just Download theme and will be use for many blog.

    Thank you so much.

  3. I really like this theme, and installed to my blog (http://zeqvi.com). Thanks for doing it!
    However, there is no really separation between posts 🙁 My personal opinion, you should make a block for meta data of the post. Other than that, looove this theme!

  4. pross says:

    Version 1.0.0 is released.
    There are loads of fixes. The theme has been updated to take advantage of the new 2.8 features.

  5. Lots of fixes broke the theme.

    I just upgraded and both sidebars combined and shot to the left side. Beneath those are the posts.

    I tried the demo @ WordPress.org and it does the same thing.

    1. There seems to be a big problem with missing files as of late. This is the third theme I’ve worked with in the last month that has been missing something. At least you are on top of things, so that makes up for it. 🙂

      Thanks a bunch!

  6. Please, add ” ” spaces between words like “No Comments »” or “Posted in”. Other way if there are to many tags these phrases are braking a part.

    1. pross says:

      Dan, the option is still there in the admin page for fluid theme, it will use the file in css/style-full.css ..
      Check the source of this page…

  7. Not sure exactly WHY this is happening, but ever since I upgraded the theme to 1.1 I have been bombarded with emails from my site complaining about 404 errors for pages that either never existed or should not be accessible to the public. 99% of these 404s show no “came from” information.

    I changed themes for two days and all was quiet. Not even ten minutes after I switched back to Garland Revisited I got hit with 30 more emails (these ones are supposedly for a plugin page). I’m running WP 2.7.1, if that matters.

    Any advice on what I can do or look for would be greatly appreciated. 🙂

  8. pross says:

    Not sure why that is, there is a custom 404 page that emails you the 404 info, check the source in 404.php, but it isnt a recent addition.
    I’ll make it an option to disable in the next version, which will be out with 2.8, although the theme is already compatible there is a few things im testing 🙂

    1. Thanks!

      I realize now that this may be an underlying problem that is being brought to light by the custom 404 (I don’t think any of the other themes’ 404s send emails).

      What still confuses me, though, is why my rummaging about in the admin section is triggering the emails (I just have to log in and they start), or why the majority of them pertain to plugins that were recently updated. IE: when I updated Sidebar Login a few days ago, I received a bunch of bad link emails about that. Now its wp security scan’s turn. *shrugs*

  9. OK new version is ready just about!
    It includes comment numbering with support for Gregs comment numbering plugin, either categories or pages in the header menu and the 404 emails are now configurable.
    The 404.php will actually show the users useragent now so you can tell if your getting grief from a spambot or have a genuine link problem.

    I’ll be released with 2.8 in a few days!

  10. I have been unable to add a third link category to the right column. I created the link and added 3 links to it. This shows on the link categories page, but the category and its links don’t appear on the blog page.

  11. Randy Layhee says:

    Love your Garland Revisited theme, but I’m having a problem and was wondering if there’s a fix.

    I’m running WordPress 2.8.1

    Basically when I add a widget (I’ve tried many) into the left or right column everything disappears except for the widget. Is there a way to add the widget but keep the navigation links?

    Any help would be greatly appreciated, thanks again for your wonderful theme!

    1. Unless I’m missing something what is happening is perfectly normal for WordPress.

      Themes come with default settings for the sidebars. When you add a widget you override those settings, so all you see is the widget. You need to replace the default navigation with widgetized navigation. Simply add the corresponding widgets to the sidebars.

  12. Don says:

    I really like the look of Garland Revisited but I’m experiencing a problem that I was hoping somebody else may have had and fixed.

    It seems like 2 of the widgets I’m using look fantastic in Firefox, Opera, and Safari but break the page in Internet Explorer (tested in version 6 and 8.)

    The 2 widgets that appear to be causing this issue allow you to use HTML code inside the sidebar (“htmlPad 1.1 by Nishanthan” and “PHP Code Widget 1.2 by Otto”) I’m not trying to do anything crazy with it, I just coded some simple menus that feature graphical icons.

    When I use the PHP Code Widget in the left columns sidebar, the light blue rectangle shape that runs underneath the name of the blog disappears. This also causes the title of my most recent post to move up into the blue area where the rectangle shape I described used to be.

    When I use the htmlPad widget in the right column sidebar, the entire sidebar disappears from its proper spot and reappears at the very bottom of the page aligned to the left side of the screen.

    I have not had this issue when doing the same thing in some other themes that support 2 sidebar’s for widgets.

    I’m hoping there is a way to solve this problem because I really need the ability to use basic HTML in the sidebars to make the blog work the way I want it to. It seems like if it works in every browser except Internet Explorer, there must be a work around to get it compatible in all browsers.

    Any help would be greatly appreciated!

  13. pross says:

    OK Don, firstly the left sidebar was missing adding a so that broke IE.
    The reason HTMLpad was not displaying properly is the widget is coded poorly.. you need to edit the plugin and change the following function:
    function htmlPad_widget($args)

    I will email you the code for the plugin and a new zip of the theme, as it often takes a few hours for the wordpress.org server to see the changes 🙂

  14. Hello,
    I am working on a website using Garland Revisited theme (love it, btw) and I want to put an image in the header. I want to take out the title, and blog description and replace it with an graphic. I’d also like to add a background graphic instead of the color that we get to pick in the themes options. How can I achieve this?

    Thanks!
    -marc

  15. pross says:

    Marc: Hello,I am working on a website using Garland Revisited theme (love it, btw) and I want to put an image in the header.I want to take out the title, and blog description and replace it with an graphic.I’d also like to add a background graphic instead of the color that we get to pick in the themes options.How can I achieve this?Thanks!
    -marc

    Tricky one this marc, for a start i suggest installing my template overide plugin, it allows you to easily edit css without editing the main files. Secondly install firebug extention for firefox, you can then hover over elements and play around with the css values ‘live’ to get the right look.
    to get rid of the text is easy:
    #header h1 { display: none; }
    That will hide the text.
    #header h1 { background-image:url(‘myimage.jpg’);
    then resize the image to fit where the text was…
    so far all that can be done without editing the header.php file so you can still update the theme without losing your customizations!
    Now the background image for the top bar..thats near impossible im afraid, as its built dynamically, you could edit header.php and remove it and put your own bar in there and edit the style.css, but thats up to you..

    ..well hope this all hels 🙂 let me know how you get on!

  16. pross says:

    Sidebar visibility is easy, can hide it with css, what do you mean by top messages? the decription like mine that changes? its a random tag plugin i found….

  17. pross says:

    I just installed the theme on a test site with latest version of MU, it works with no problems at all.
    Exactly what is happening?

  18. Pross,
    I appreciate the time you took to try to answer my question.  I have tried everything you mentioned and nothing works.  I can not figure out for the life of me how to put a graphic inside the header.  I even have firebug installed, and have tried everything I can think of to do this.
    Is it possible to take the body.png graphic and extend it to like 900px, make it “not repeat”, and add the graphic logo to that?
    I also want to add a graphic to the background of the right sidebar with the search.  And add plugins possibly to that right sidebar.
    Peace,
    -marc

  19. pross says:

    marc: Pross, I uploaded a JPG of what I want the site to look like.  Sorry if I’m being a pain in the ass or asking for help where not wanted… http://marcblackwellphotography.com/evolvewannabe.jpg Thanks a lot! -marc

    did you try just using the css i posted above as an example with the template-overide plugin?
    I will be away from home at the girlfriends house for the next few days…if you upload the jpg to that site i’ll have a play with firebug and try and find you the exact overide needed to place the image over the blog title if you want 🙂
     

  20. Hi pross,
    I love Garland Theme and I am using it on WordPress. com about 2.5 years. Now, I am building new  self-hosted blog wityh newest Garland1.5 but I have problem on  text with ordered list.
    After I put the html tag  for ordered list on some text, and update post, the text with ordered list it’s not show up like ordered, then like common text.
    How can I solve that problem?
    But, there is something strange, when I replace Garland1.5 vith Garland 1.3, I have no that problem on text with ordered list, only with Garland1.5
    What is the problem?
    I hope you will help me because I love Garland and don’t want top change the Theme in my future blog.
    Thank in advance!
    Nebojša

  21. pross says:

    Ive fixed it!
    There was an error in style.css.
    The lists will not render properly in comments but will show correctly in posts and pages.

    You can either download my stylesheet direct from here.
    Or wait for an updated.

  22. Thanks pross!
    I downloaded your stylesheet and it works!
    By the way… I will ask you somethig more, and I hope I don’t bother you. I have the same plugins for rich text comment like yo: “MCEComments” but i have the problem becausu,  the distance between text lines is too much.  when I check comments in tis my underconstruction blog with Garland reviseted 1.5 , that is always appear.
    You can see it directly on ma future blog. If you pleased go there and answer me.
    Link:  my blog under construction.
    Thanks…!

  23. pross says:

    testing [ENTER]
    enter
    now test SHIFT+ENTER
    hello…
    IM using SHIFT+ENTER
     
    As you can see, [ENTER] puts the p tags around each line SHIFT+ENTER does not, it is not a theme issue it is the MCE plugin

  24. The theme has no CSS support for ordered lists. The list shows up, but there is no numbering. I see it is listed in the reset.css file but it never shows up elsewhere.
    Also, with the new disable sidebar options, the content is hidden, but the columns are still present. Is this the intended effect?

  25. pross says:

    the ordered list problem has just moved to another problem lol, I am looking at it tonite, the sidebar columns are still drawn but the sidebar php isnt executed, what were you thinking? to completely remove the coloured block?

  26. pross says:

    I’m not sure if the way the images are dynamically drawn will allow for totally removing a sidebar, if i get time i’ll look into it.

  27. Andrew says:

    I would also be interested in learning how to completely remove the right sidebar.  Any advice would be greatly appreciated.  Great work on the theme!

  28. Ben says:

    Hi there,

    I was wondering if it would be possible to reclaim the space used by a sidebar when using the “hide sidebar” option. I’m a CSS noob, so I have a rough idea how to do this, but all the tweaking I’ve tried hasn’t worked…

    Thanks!

  29. pross says:

    Good news, I have figured out how to reclaim the space used by the sidebar!
    Only one problem, it only works when set to full width.
    1.6 is being uploaded.

  30. Ben says:

    Thanks for your updates! I think the theme is really great.

    I’ve been trying to figure out how to make the sidebars wider, and so far I’ve narrowed it down to #wrapper #container .sidebar { width=??. However, I can’t seem to make the center column narrow accordingly. I’ve tried adjusting all the body.sidebar-?? { margin values but the sidebar ends up overlapping.

    Any assistance you could offer would be most appreciated! Thanks!

  31. Nebojša says:

    Hi pross,

    Please tell me in which part of php files, I should remove link titles at the bottom, behind the comment form. because that cause that my right sidebar fallen down, on the bottom if you look my blog in that old broser IE6 (in other modern browsers everything is OK), because that 2 linka are too wide. You can see that in this screenshot.
    Also, because of that links, some of my articles are fallen down if you look my blog in that IE6, you cam see that in second screenshot.

    Please help me to solve that problem, because most of the common visitors usung that old browser IE6.
    Thanks.

    1. pross says:

      Firstly I would think that only search bots and email harvest bots use IE6, IE6 is old and no humans should be using it!
      But to answer your question the code is easily found in single.php.

      1. Nebojša says:

        Thanks for the answer

        Yes, you are right of the IE6, but what to do if still many coomon internert users using it.
        But I think, for about year ot two, IE6 will disappear from internet!

  32. I found one xhtml validation issue. In comments.php there is a line with “do_action(‘comment_form’, $post->ID);”. It does not validate due to the expanded input element existing outside any valid element. If you move it two lines up (so that it is above the paragraph close tag) it validates correctly.

    1. I just compared the style.css on your site with the style.css on my site from the update. It looks like on your site, the import for reset.css is commented out, so the ol doesn’t get reset. On my side, it is still importing the reset sheet, so there is no style info for ol at all.

      Note: there are three differences total (not counting whitespace or some custom styles I added to the bottom of my copy). The first was the commented out reset.css file. The second was a change I made trying to get ol to work for now. The third was two floats in the alignleft & alignright directives that aren’t present in my current copy.

      Does that help?

  33. pross says:

    You have 2 choices, either edit header.php and code the image in, or edit the css to cover the header over..

    It was discussed in post #54 onwards

      1. Michelle says:

        I was able to put my logo on the banner using template override, but now I’ve lost the ability to click on the header to take me back to the homepage. Any suggestions?

        Thanks!

        1. Hi,
          You can see that in this post. Pay atention on this part:

          "Прорачунати број могуће оболелих од свињског грипа за период 09.11.’09 – 28.02.’10 Стопа раста оболелих по 1-ом дану
          2.000 000 17.857
          2.500 000 22.321"

          It should be displayed  like table, like this, but didn,t it displayed like this.

          1. This is that table tag that did not disdplay good:

            Прорачунати број могуће оболелих од свињског грипа за период 09.11.’09 – 28.02.’10
            Стопа раста оболелих по 1-ом дану

            2.000 000
            17.857

            2.500 000
            22.321

          1. OK a quick fix is edit style.php and comment out reset.css like this:
            [php]
            /* your css files */
            //include(‘css/reset.css’);
            include(‘style.css’);
            ob_end_flush();
            ?>
            [/php]

            I will fix this when i get hpme in the next version

  34. Michelle says:

    My site looks great, but when I insert a photo with a caption into a post, the text does not wrap. It wraps fine if the photo does not have a caption, but as soon as a include a caption, the text will not wrap. Any advice?

    Thanks!

    1. Michelle says:

      What customizations will I lose if I upgrade? When I click on the “upgrade automatically” link, I receive an message telling me I will lose any customizations I’ve made. I don’t want to screw up the site.

  35. Michelle: What customizations will I lose if I upgrade? When I click on the “upgrade automatically” link, I receive an message telling me I will lose any customizations I’ve made. I don’t want to screw up the site.  

    did you edit any of the theme php files or the style.css file?
    any theme options you have set will remain intact..

  36. Help…….I installed the theme this evening and I like it but
    1) I don’t know how to add my custom header
    2) How to remove all the category links from the header
    3) How to make sure the colours on the home page and that on the post page stay the same colour

  37. Excellent job! This theme is pretty much exacly what I want. Question –

    In the default install with no widgets then the “pages” and “categories” appear except sub-pages are missing! odd?

    and if I use the pages widget instead then subpages show, but the ‘home’ page disapears?!

    how can I have a homepage link in my list of pages AND have the sub-pages shown with this theme?

    cheers
    ewart

  38. Hi Mate,

    Totally love the theme and it seems perfect for a blog I am having to set up for my branch.

    However (probably just being dopey here) I have gone to the “Garland Options” in the appearance tab, adjusted the colours to the ones I want. The preview looks great. But my theme is staying the same externally.

    Should this change automatically or do I need to go into one of the php files and manually update?

    I am a bit of a super n00b at this lark so apologies if this is blindingly obvious.

    Thanks

    Ralph

  39. I have tested this on 2 different hosts and still can’t get it to work.
    None of the graphics show only text.
    Could you help me figure out what is wrong.
    Other themes display with out any problems, and I really like your Garland-revisted theme only I can not get it to work.

    Your help is much appreciated.

    1. I have looked in theme options and there is nothing about disabling css caching/compression. These are the theme options available:

      Show exerpts instead of posts on main page.

      Show queries and page generation time in the footer.

      Make theme fluid (full width).

      Show categories instead of pages in the header.

      Add your own footer text.

      Show comment numbering. Gregs Threaded Comment Numbering plugin will automatically overide this setting.

      Email admin on 404 errors.

      Show comments on normal pages.

      Hide left sidebar. (will make theme full width)

      Hide right sidebar. (will make theme full width)

      Show image in header. Link to image

  40. I ran the css validator test at http://jigsaw.w3.org/css-validator/
    using the url and it said if found 2 errors:

    1. File not found: http://aweightsuccess.com/wp-content/themes/garland_revisited/style.php: Internal Server Error
    2. File not found: http://aweightsuccess.com/?garland_css=1: Internal Server Error

    I dont know what this mean because style.php is in on the server.
    In the functions.php if found a reference to “garland_css=1” :

    function garland_colors_css() {
    if ( !garland_using_custom_colors() )
    return;
    echo “n” . ”;
    echo ‘@import url(‘ . get_bloginfo(‘wpurl’) . ‘/?garland_css=1);’;
    echo “n” . ”;
    }

    Then at the bottom of the css validation screen is says:

    Valid CSS information
    ———————–
    @import “http://aweightsuccess.com/wp-content/themes/garland_revisited/style.php”;
    @import url(‘http://aweightsuccess.com/?garland_css=1’);

    What does this mean?

  41. ok i am testing garland-revisited on a different host (iPage.com) and I have the same problem with the css not rendering.

    I have looked at the logs and can not make any sense out of what i am seeing.
    Still would like some explaination on disabling the cache mentioned earlier

      1. My mistake!! There will be a new version very soon, didnt realise i didnt upload it! Its late now, but i will do it when i get home from work tomorrow..sorry!

      1. Only changes are the ability to disable the gziping of style.css (breaks rendering on some servers) and the div background color on the menu for readability.
        Version 2.0 will have full wordpress 3.0 support like the custom menu thing. This version will work with wordpress 3 though

        1. Niska says:

          I haven’t started using the latest version yet. Are there any improvements on the speed of style.php and /?garland_css=1 ?

          I use the “Resources” tab in the developer tools in Google Chrome. When doing a Shift+Reload on any page I get the info that style.php takes about 1 second to load and /?garland_css=1 takes about 2,4 seconds to load.

          I haven’t made any changes to the colors in Garland Revisited in a long time. Loading them dynamicly everytime a new visitor comes to my blog seems like a bad idea. Would it be possible to improve this behaviour? Chaning colors maby could write a static css file?

          1. style.php just gzips the style.css and adds the cache headers so the browser only needs to load it once, then every refresh you will use the cached copy, the developer tools force a refresh every time, so it isnt the same for the end user.

            I suppose you could copy the css then hard code it into your template, but the images are dynamic, again the browser caches them, but developer tools force refreshes.

            Maybe I will make an option to write css to files and output images to a folder for people who never want to change the colors what do you think?

  42. Pross – I think it is pretty clear that your Garland Revisited theme is one of the most professional and slick looking ones out there.

    However, I am having a real issue with the primary navigation in IE browsers, 6 7 & 8.

    Here’s a picture of how it looks in IE6 (on the right) with Ffox for comparison on the left.

    Now here’s another with what happens when you hover over one of those navigation items, in this case “Our Expertise”

    The issue is those bg-images, I reckon. Or perhaps the way they repeat? Not sure why hovering over the nav makes it change.

    I have modified your theme pretty heavily, sorry, and probably in a quite rude and hackish way. So I’m now looking for a fix for this that I can implement on my own.

    Any help is Greatly Appreciated.

    Thanks.

    1. Not sure what you have done to break it 😉
      It seems to do it in IE8 on win7 too!
      Ive switched to the theme here too to test, it isn’t doing it on IE or FF, so whatever the problem its your end 🙁

  43. Niska says:

    “style.php just gzips the style.css and adds the cache headers so the browser only needs to load it once, then every refresh you will use the cached copy, the developer tools force a refresh every time, so it isnt the same for the end user.”

    Most of my visitors are first time visitors from Google. Anything to make the loading time of the first page better would help them.

    You shouldn’t need a style.php to make the gzip. If a blog owner wants to accomplish this, there are better ways (like adding a line to the .htaccess file so that all .css, .js, .html pages gets gzipped). Or maby by using another plugin.

    “Maybe I will make an option to write css to files and output images to a folder for people who never want to change the colors what do you think?”

    That seems like the best solution. And if people want to change the colors, then you just output the new css/images to the folder.

    I still don’t understand why gzippig a .css file takes 1 second. And why the garland_css=1 takes 2,4 seconds. But making these file static should certainly fix it.

    1. As a gauge I just tested my site with google dev tools and here are the results:
      style.css response time 185ms 0ms download time
      garland_css=1 240ms response time 4ms download time
      So you see it takes my server 55ms to create the css and 4ms to send it, I cant see why your server would take 2.4 seconds??

      1. Niska says:

        Strange. I’ve tested it on two different servers. Even tried upgrading to the latest Garland Revisited 1.90. Could it be that I’ve changed the colors in the settings, but you’re using the default?

          1. Niska says:

            It seems as if your garland_css=1 sends this header:

            Content-Encoding:gzip
            Content-Length:525

            But both my sites (one using 1.75 and the other 1.90) doesn’t send these headers. That’s the only difference that I can find.

          2. Niska says:

            I tried some of the sites of the other commenters above. They all have the same problem as me. Try loading this page http://nebojsa-bor.net/?garland_css=1 in developer tools in Chrome and you will see. As you can see, the Content-Length are missing… I’ve checked the source – and Content-Length are not set in the php-script. I’m not sure why you have it and nobody else (that I’ve checked) has it.

            Well. At least this will be solved with the new static caching.

  44. OK ive sort of coded an early test version of this idea, its running now, as you can see there is a couple of minor bugs Ive spotted, but its time for bed :p
    It appears to work OK and obviously when your happy with the colours you are at the mercy of your web server to deliver the images faster than php can generate them, see for yourself.

  45. Ok it has been a few days since I tested.
    I had contacted my host co about the problem of the css not show.
    I don’t know what they did but is was working.
    ok, so then I backup wp and install the 1.9 version.
    Back to no css showing now. But the new version has the option to disable cache. I d that and….
    The crowd cheers the css is showing. COOL!

    But wait their is more… I try to modify the colors…and nothing happens.
    I use the editor and manually change the color values…no change.
    I check the file permissions and change them to 755 no change.
    I clear the browser cache…not chang.

    Ok so what do I need to do to be able to edit the colors?

    1. Ive compared your css file and mine:
      yours:
      Cache-Control:private,max-age=2595000
      Connection:Keep-Alive
      Content-Type:text/css
      Date:Thu, 13 May 2010 18:51:53 GMT
      Expires:Sat, 12 Jun 2010 19:42:01 GMT
      Keep-Alive:timeout=10, max=30
      Last Modified:Thu, 13 May 2010 18:52:01 GMT
      Link:; rel=shortlink
      Pragma:
      Server:Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635
      Transfer-Encoding:chunked
      Vary:Accept-Encoding
      X-Pingback:http://nebojsa-bor.net/xmlrpc.php
      X-Powered-By:PHP/5.2.11

      mine:

      Cache-Control:private,max-age=2595000
      Connection:Keep-Alive
      Content-Encoding:gzip
      Content-Length:518
      Content-Type:text/css
      Date:Thu, 13 May 2010 18:53:46 GMT
      Expires:Sat, 12 Jun 2010 19:43:46 GMT
      Keep-Alive:timeout=15, max=100
      Last Modified:Thu, 13 May 2010 18:53:46 GMT
      Pragma:
      Server:Apache/2.2.9 (Debian)
      Vary:Accept-Encoding
      X-Pingback:http://www.pross.org.uk/xmlrpc.php
      X-Powered-By:PHP/5.3.2-0.dotdeb.2

      Now im running the exact same version as you are, so we have to assume its server related, the only difference i can see is the shortlink, is that some plugin?

      1. Niska says:

        It’s not mine. But it doesn’t matter. I’ve checked several of the websites of the other people that commented on this post. They all have the same problem as I have. The big difference is that noone, except your site, sends the Content-Length header.

        1. right ok, im going to try and add it to the script to generate it….is it all cpanel servers that dont send the length header i wonder?

        1. OK here is a patch for css.php to force content-length
          line 63 after function garland_css_colors_css() {
          add
          ob_end_flush();
          ob_start();

          line 114 (the last } of the function)
          add
          $length = ob_get_length();
          header(“Content-Length: $length”);

          so it looks like:
          [php]function garland_css_colors_css() {
          ob_end_flush();
          ob_start();
          header(‘Content-type: text/css’);
          $interval = 2595000;
          $now = time();
          $pretty_lmtime = gmdate(‘D, d M Y H:i:s’, $now) . ‘ GMT’;
          $pretty_extime = gmdate(‘D, d M Y H:i:s’, $now + $interval) . ‘ GMT’;
          // Backwards Compatibility for HTTP/1.0 clients
          header("Last Modified: $pretty_lmtime");
          header("Expires: $pretty_extime");
          // HTTP/1.1 support
          header("Cache-Control: private,max-age=$interval");
          header("Pragma: ");
          foreach ( garland_css_colors() as $label => $color ) {
          echo "nt{$color[‘el’]}" . ‘ { ‘ . "{$color[‘prop’]}: " . garland_css_color( $label, true ) . ‘; } ‘;
          }
          if( get_theme_mod( ‘sbr’ ) ) {
          echo "ntbody.sidebars #squeeze {margin: 0 0 0 210px;}";
          echo "nt#wrapper #container {margin: 0 auto; max-width: 95%; padding: 0 20px;}";
          }
          if( get_theme_mod( ‘sbl’ ) ) {
          echo "ntbody.sidebars #squeeze {margin: 0 210px 0 0;}";
          echo "nt#wrapper #container {margin: 0 auto; max-width: 95%; padding: 0 20px;}";
          }
          echo "nttextarea, select {border:1px solid ". garland_css_color($label = ‘bottom’).";}";
          echo "ntinput {border:1px solid ". garland_css_color($label = ‘bottom’).";}";
          echo "nttextarea:focus, input:focus { border:1px solid ". garland_css_color($label = ‘top’).";}";
          echo "nt.commentlist .commentnumber {color: " . garland_css_color($label = ‘quote’)." !important;}";
          echo "nt#dropmenu li ul {background-color: " . garland_css_color($label = ‘top’)." !important;}";
          foreach ( garland_css_images() as $src => $image ) {
          if ( is_array($image[‘el’]) ) {
          foreach ( $image[‘el’] as $k => $el ) {
          echo "nt$el" . ‘ { background: ‘ . garland_css_color( $image[‘color’][$k], true ) . " url(‘" . get_stylesheet_directory_uri() . "/garland-image.php?src=$src";
          if ( get_theme_mod(‘cache’) ):
          echo "&cache=1";
          endif;
          foreach ( (array) $image[‘args’][$k] as $color )
          echo "&$color=" . substr(garland_css_color( $color ), 1);
          echo "’) {$image[‘post’][$k]}" . ‘ } ‘;
          }
          } else {
          echo "nt{$image[‘el’]}" . ‘ { background: ‘ . garland_css_color( $image[‘color’], true ) . " url(‘" . get_stylesheet_directory_uri() . "/garland-image.php?src=$src";
          if ( get_theme_mod(‘cache’) ):
          echo "&cache=1";
          endif;
          foreach ( (array) $image[‘args’] as $color )
          echo "&$color=" . substr(garland_css_color( $color ), 1);
          echo "’) {$image[‘post’]}" . ‘ } ‘;
          }
          }
          $length = ob_get_length();
          header("Content-Length: $length");
          }[/php]

          1. Niska says:

            I think you forgot to “echo ob_get_contents();” after you output the header at line 53. But I haven’t tested it yet.

          2. Niska says:

            I’ve now tested adding the content-length header. Didn’t help. I still have the same problem.

            I’ve tried added exit(); at the first line in my_var_output()-function just to test. And now this function now doesn’t output any CSS at all – but garland_css=1 still takes about 2 seconds to complete.

            My guess is that the action ‘template_redirect’ that you use executes late in the WordPress process. There seems to be something going on before it executes. I’m using WP 2.9.2.

            Maby you could try the ‘init’ action. I’ve seen that the FeedWordPress WP plugin does this in feedwordpress.php:
            add_action(‘init’, ‘feedwordpress_update_magic_url’);

          3. try this new version:
            [php]
            function garland_css_colors_css() {
            if (substr_count($_SERVER[‘HTTP_ACCEPT_ENCODING’], ‘gzip’)):
            ob_start("ob_gzhandler");
            else:
            ob_start();
            header ("content-type: text/html; charset: UTF-8");
            header ("cache-control: must-revalidate");
            echo $offset = 48 * 60 * 60;
            $expire = "expires: " . gmdate ("D, d M Y H:i:s", time() + $offset) . " GMT";
            header ($expire);
            endif;
            foreach ( garland_css_colors() as $label => $color ) {
            echo "nt{$color[‘el’]}" . ‘ { ‘ . "{$color[‘prop’]}: " . garland_css_color( $label, true ) . ‘; } ‘;
            }
            if( get_theme_mod( ‘sbr’ ) ) {
            echo "ntbody.sidebars #squeeze {margin: 0 0 0 210px;}";
            echo "nt#wrapper #container {margin: 0 auto; max-width: 95%; padding: 0 20px;}";
            }
            if( get_theme_mod( ‘sbl’ ) ) {
            echo "ntbody.sidebars #squeeze {margin: 0 210px 0 0;}";
            echo "nt#wrapper #container {margin: 0 auto; max-width: 95%; padding: 0 20px;}";
            }
            echo "nttextarea, select {border:1px solid ". garland_css_color($label = ‘bottom’).";}";
            echo "ntinput {border:1px solid ". garland_css_color($label = ‘bottom’).";}";
            echo "nttextarea:focus, input:focus { border:1px solid ". garland_css_color($label = ‘top’).";}";
            echo "nt.commentlist .commentnumber {color: " . garland_css_color($label = ‘quote’)." !important;}";
            echo "nt#dropmenu li ul {background-color: " . garland_css_color($label = ‘top’)." !important;}";
            foreach ( garland_css_images() as $src => $image ) {
            if ( is_array($image[‘el’]) ) {
            foreach ( $image[‘el’] as $k => $el ) {
            echo "nt$el" . ‘ { background: ‘ . garland_css_color( $image[‘color’][$k], true ) . " url(‘" . get_stylesheet_directory_uri() . "/garland-image.php?src=$src";
            if ( get_theme_mod(‘cache’) ):
            echo "&cache=1";
            endif;
            foreach ( (array) $image[‘args’][$k] as $color )
            echo "&$color=" . substr(garland_css_color( $color ), 1);
            echo "’) {$image[‘post’][$k]}" . ‘ } ‘;
            }
            } else {
            echo "nt{$image[‘el’]}" . ‘ { background: ‘ . garland_css_color( $image[‘color’], true ) . " url(‘" . get_stylesheet_directory_uri() . "/garland-image.php?src=$src";
            if ( get_theme_mod(‘cache’) ):
            echo "&cache=1";
            endif;
            foreach ( (array) $image[‘args’] as $color )
            echo "&$color=" . substr(garland_css_color( $color ), 1);
            echo "’) {$image[‘post’]}" . ‘ } ‘;
            }
            }
            header(‘Content-type: text/css’);
            }
            [/php]

          4. Niska says:

            Nope. Didn’t help. See my previous comment. The problem seems to be with the ‘template_redirect’ action that you use in functions.php.

          5. try adding this ‘1’ to make it priority 1, its loaded very early anyway, but it may help…
            [php]add_action(‘template_redirect’, ‘my_var_output’, 1);[/php]

          6. Niska says:

            Good idea. But it didn’t make any difference… Maby you’re running another WP-version than the rest of us? I’m out of ideas… Hopefully the new css/image-cache will solve it…

          7. Niska says:

            FYI: I’ve also tried disabling all other plugins at my blog. But that didn’t help either…

          8. Niska says:

            Strange. Must be something with the server then. But I have two different servers with completely different setup.

            I’m looking forward to the new css/image-cache. Did you see the errors?

          9. I did, here is a possible fix…

            edit functions.php and css.php with these 2 changes:

            [php]
            css.php
            unlink(WP_CONTENT_DIR.’/themes/garland-revisited/cache/garland.css’);
            $fp = fopen(WP_CONTENT_DIR.’/themes/garland-revisited/cache/garland.css’, ‘x+’);
            fwrite($fp, $out);
            fclose($fp);

            functions.php

            function garland_cache() {
            $folder=WP_CONTENT_DIR.’/themes/garland-revisited/cache/’;
            rmkdir($folder);

            [/php]

          10. Niska says:

            That got rid of some of the messages! This time I got:

            Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/web32523/:/tmp/:/opt/php-fastcgi/web32523:/usr/local/php5/lib/php/) in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/functions.php on line 474

            Warning: unlink(/home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited/cache/garland.css) [function.unlink]: No such file or directory in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/css.php on line 157

            Warning: Cannot modify header information – headers already sent by (output started at /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/functions.php:474) in /home/web32523/domains/domain.com/public_html/dir/wp-includes/pluggable.php on line 868

          11. Niska says:

            I solved it! My host is not allowing me to use ‘/’ in file names:

            // css.php
            $fp = @fopen(‘../wp-content/themes/garland-revisited-1.91/cache/garland.css’, ‘w’);
            if ($fp) {
            fwrite($fp, $out);
            fclose($fp);
            }
            // functions.php
            $folder=’../wp-content/themes/garland-revisited-1.91/cache/’;
            if (!is_dir($folder)) {
            @mkdir($folder, 0755);
            }

  46. Niska says:

    I’ve now tried enabling cache II. The cache files were not written to the cache directory. The cache directory didn’t create itself, so I created it manually and put a 777 chmod on it. Didn’t help. I didn’t get any error or messages at all.

    But an idea, if you haven’t already done it, is to remove the cache-directory when uninstalling the theme. On one of my servers the www-user and the ftp-user are different. So the ftp-user is not able to delete content created by the www-user. I think the reason for this is that it’s more secure. But it also means that I won’t be able to manually delete the cache-files using ftp.

  47. @niska,
    These are the problems with shared hosting. Your host is using the old cpanel method, apache+php as module. apache runs as the same user for every website, thats why your ftp user cannot delete files written by the apache user, its a pain in the whole for any site that uses any kind of file caching system!
    These days most hosts use suPHP which changes the apache user dynamically every page load or fastcgi which is better again!
    Do you pay your host a lot? These days its cheap enough to get a VPS and set it up how you like it.
    I have a ton of free space on this server if you cant find one, you could host your sites here, at least this server is configured properly 😉 and its in Amsterdam 😉
    Same offer is open to anyone else who cant get the theme working on their shared hosting!

    1. Niska says:

      One of my blogs is on a dedicated server. But I’m not the admin. I also have two blogs at a shared hosting company. I run WP Super Cache on both blogs – and it works w/o problems 🙂

        1. seems weird that the apache user cant create a folder in your userspace though.
          All the script does is attempt to create the folder, if it exists already it writes the files with fwrite, that should work

          1. Niska says:

            I agree. I also tried to create the folder manually. It didn’t help. No error message at all…

          1. Niska says:

            My misstake. I didn’t enable cache part 1. I only tried part 2.

            This time I got this result after enabling part 1:

            Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/web32523/:/tmp/:/opt/php-fastcgi/web32523:/usr/local/php5/lib/php/) in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/functions.php on line 475

            Warning: unlink(/home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/cache/garland.css) [function.unlink]: No such file or directory in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/css.php on line 155

            Warning: fopen(/home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/cache/garland.css) [function.fopen]: failed to open stream: No such file or directory in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/css.php on line 156

            Warning: fwrite(): supplied argument is not a valid stream resource in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/css.php on line 157

            Warning: fclose(): supplied argument is not a valid stream resource in /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/css.php on line 158

            Warning: Cannot modify header information – headers already sent by (output started at /home/web32523/domains/domain.com/public_html/dir/wp-content/themes/garland-revisited-1.91/functions.php:447) in /home/web32523/domains/domain.com/public_html/dir/wp-includes/pluggable.php on line 868

  48. Angie says:

    Hi I am trying to use a logo and the text in the garland theme. I wanted to have the logo in the far left with the text next to it. Any help would be great.

  49. Graviter says:

    Hi.

    Can you tell me how can I translate this theme? I’ve translated /garland-revisited/lang/garland.po but it doesn’t work. I’ll be grateful for help.

    1. Graviter says:

      garland-pl_PL.mo + garland-pl_PL.po in garland-revisited/lang/. Still nothing. I don’t know what is wrong, because everything in functions.php look fine:

      $currentLocale = get_locale();
      if(!empty($currentLocale)) {
      $moFile = dirname(__FILE__) . "/lang/garland-" . $currentLocale . ".mo";
      if(@file_exists($moFile) && is_readable($moFile)) load_theme_textdomain('garland', $moFile);

  50. Hi,

    I have just installed WordPress 3.0 and I want to upload your theme, but when trying to upload it the installation just stops and when I refresh the page it starts again but soon stops installing. I tried to install another theme- it worked, but I want this one.

    I made another blog in wordpress.com using the theme and my idea was to expost the content and then import it to the slf hosted wordpress blog.

    Da you know what I an doing wrong and how can I fix the stopping installation?

    Thank you in advance!

      1. I am using http://www.000webhost.com/ and I am trying to upload it all day. As I mentioned with other themes I didn`t have this problem. I want to use it because I have already customized it for my wordpress.com blog I after installing the theme I want to export/import the theme to the new blog, hosted in 000webhost.

        Thank you!

        1. pross says:

          cant think what would cause it to not install… try opening the themes directory in your ftp client and make a folder garland-revisited and chmod it 777

          1. Thank you very much- I managed to install the theme. Now I have another problem, byt don`t know how to fix it. When trying to import the xml file from the other blog it shows me a screen with Google called “Install importer”. The same happens when I go to “add new plugin”- it redirects me to Google and shows some error “http://err.000webhost.com/”. I did this a day ago with another domain but it worked- I imported the content.

            I can`t understand do I have something misiing in my ftp files or…how could I fix this problem at all.

            Thank you really much for your help!

  51. Jonathan says:

    Hello Pross,

    I’m trying to make the date of the comments non-linkable. How do I do this? I tried removing the href tags around “comment_date(‘F jS Y’) ?> at at <?php comment_time()" it still displays the date as a link. Could you please help me with this?

    1. pross says:

      Sorry for the late reply Jonathan, been working on the 2.0 of garland, the link oyu speak of is built in to wp_list_comments() as you can see this theme (justcss) does it also, you could if you wanted to edit functions.php, you will find a section of code there called custom_comment() its used when you turn ON comment numbering, you will see the data function in there enclosed in the .. other than that you would have to filter wp_list_comments() which is would be a wp.org forums request 😉

      1. Jonathan says:

        Thanks for the reply Pross, I’ll check it out. I’ve got one more problem though. The CSS file doesn’t load if I don’t check “Disable caching. css files will not be gzipped.” option in the theme option. Because of this I can’t use plugins like Wp Super Cach or Hyper Cache because for some reason they won’t build the cached pages. Do you know what might cause the css files not to load once caching is enabled?

  52. Johnatan says:

    Hey Pross, could you please tell me how to remove the caching function of the theme in the code? So that it won’t cache regardless of what you enter in the options page?

  53. i’ve been trying to use this theme as I’ve used the drupak version and loved it. I’ve uploaded and activated the theme but when i visit the site I cant see a thing. I created 3 dummy posts but cant see them? I’m really confused and frustrated. Please help

  54. I have several widgets in the right sidebar and they all show up on my site’s homepage. But when I go to a post page the right sidebar is blank. No problems with the left side at all.

Leave a Reply to Angie Cancel reply

Your email address will not be published. Required fields are marked *