Web development, eBook creation, and Print Design

Some small modifications of the SimpleFolio WordPress theme

I’m using the delightful SimpleFolio WordPress theme for the Rabbit Software website. I made a donation; it’s nice to support good opensource work.

I found a few issues with it that I have addressed.

1. The single post view was incorrectly showing the excluded “Portfolio” category in its Recent Posts sidebar widget. In this theme, you can select a specific category to populate the homepage slideshow. One doesn’t necessarily want those posts to appear as normal blog posts. Unfortunately, the exclusion function wasn’t working on the single post view page. This problem is easily addressed by editing the sf_portfolio_filter function in the theme’s functions.php file.

Change line 50,

if(!is_archive() && !is_admin() && !is_single()){

to

if(!is_archive() && !is_admin() ){

2. I’m using more than 3 homepage widgets, and they weren’t wrapping nicely. While the first one had a proper margin-left:0, the fourth one had the default margin-left:30px. I realized there must be some javascript at work behind the scenes, inserting the inline styling to adjust the left margin. Indeed, I opened custom.js in the js folder, and found this line:

$(".home_widgets .widget:first").css("margin-left", "0");

A bit of snooping on the JQuery site clarified this usage for me, and I added this line:

$(".home_widgets .widget:eq(3)").css("margin-left", "0");

to make the 2nd line of 3 widgets line up with the first batch.

3. Of course, I’ve made a few custom tweaks to the stylesheet so far, such as adding more space below the unordered lists in the .home_widgets .widget class, and adding underlines to the links in the .home_widgets .textwidget.

52 Responses to “Some small modifications of the SimpleFolio WordPress theme”

  1. I like SimpleFolio too, but couldn’t get the slider to work properly. I’m waiting for the new version now, but these hacks are pretty useful. Thanks

    • Diana Brewster says:

      Thanks for the comment, Bart. If you’d like, I can walk through all the steps for getting the slider to work correctly. As I recall, it’s essential to carefully review the readme.txt file that came with the theme package. It took me a while to get it working; I had to read instructions a couple times. One must use the custom homepage template. It’s a beautiful slider.

      • Austin says:

        Hello,

        Are you able to help me to get the slider working?

        Thanks,

        Austin

        • Diana Brewster says:

          Hi Austin, thanks for asking. I don’t know what more I could do besides advising you to carefully read the “readme” that’s enclosed with the theme download. Clear your browser cache, too. I note that this particular slider is NOT very robust, and it’s not unusual for it to get into an odd state. If I get around to upgrading it, I’ll post about it.

  2. Nigel says:

    Most slider probs seemed to be ppl not having the correct image file sizes in place before wanting to see it working. Make sure your dimensions are correct! :)

  3. Monil says:

    Hi Diana,

    I am trying to make the portfolio site using simplefolio wordpress theme. But I am unable to get portfolio categories as shown in the demo. “All | Category 1 | Category 2 ” etc. Can you please help me to figure out how to create sub-categories for portfolio section.

    Regards,
    Monil

    • Diana Brewster says:

      Hi Monil. Did you download the most recent version of Simplefolio, 1.5?

      In Admin, look at the left column, and select at the bottom “Theme Options”.

      Under Portfolio Options, select the name of the category under which you will post your portfolio items.

      Farther down that page is the option for “Subcategory navigation”, to add child categories (subcategories) to your portfolio category. Be sure that box is checked. Set up the necessary subcategories in your dashboard category management.

      Important! Be sure to add a page for your portfolio, using the “Portfolio” template.

      I was able to get the subnav working by following these instructions.

      Hope this helps!

  4. buddy says:

    wondering if you have tried to get the simplefolio single.php to show the next previous links for single posts.

    that seems like a basic blog function and I can’t get this to work.
    any help would be appreciated.

    b

  5. Diana Brewster says:

    Good question. I’ll try and take a look at that in the next week and I’ll reply here.

  6. Matthew K. says:

    Hi Diana,

    Thanks for the tips! I love the SimpleFolio theme, and I think these tips will make it even better. I just have one question for you, though. Have you tried using SimpleFolio with the latest version of WordPress? I’ve been hesitant to upgrade my WordPress installation out of fear that it will break the theme and my site. If you have any experience with SimpleFolio and the latest WordPress, I’d love to hear it.

    Thanks!
    -Matthew

    • Diana Brewster says:

      Hi Matthew. Yes, I’m using Simplefolio with the most current WordPress. I like to keep my blog software and plugins updated.

    • Ryman says:

      I was looking for a fix, for the Image Slider in SimpleFolio, and came upon this site.

      Anyway, it was working properly until I upgraded my WordPress to 3.1 today. Using the previous version 3.0.5 it was working fine.

      I tried deactivating plugins and extra JavaScript codes and deactivated the new ‘navi bar’ from WordPress that appears on top of your page when you are logged in as admin, but still the slider isn’t working.

      Just a heads up before upgrading your WordPress to 3.1

      • Diana Brewster says:

        After much fooling around with different versions of jQuery, I found that deselecting “Exclude Portfolio from Blog” in dashboard > Theme Options will fix this.

        However, your portfolio images will now appear in your blog stream. There’s a way to customize the loop to exclude a particular category. I’ll post if and when I figure it out.

  7. Dave says:

    cool stuff! I just started using this theme and modified it quite a bit! check it out… daveodden.com/wordpress

  8. Maura says:

    Is there a way to remove the SimpleFolio logo in the top left-hand side of the homepage? Is this possible with the free version or must I have a paid version of to have it removed? Please advise.

    • Diana Brewster says:

      Hi Maura. SimpleFolio was a free theme created by Omar Corrales of Slimmity for Smashing Magazine. There is no cost to this theme, although the author appreciates donations.

      When you downloaded the theme package, you will find a document called Readme.txt in the root of the package, above the contained theme folder. That’s a good place to start.

      Many features of this theme can be administered from the dashboard, including the logo. When logged in to your dashboard, look at the bottom left of the dashboard menu, and click on the Theme Options button. The first field will override the Slimmity logo when you provide a logo. On Rabbit Software, I replaced the existing logo image with my own.

  9. Adam says:

    Hi there. First of all let me just say how great it is to have found somewhere where people are still using and discussing the SimpleFolio theme.

    I’ve recently setup a wordpress website using this theme. I’ve set it all up correctly and have got the slider on the homepage working as should be. I’m however wanting to add a lightbox (or fancybox) onto some of my images within a post. The post being one which is linked through the homepage slider.

    I have tried adding the lightbox 2 plugin, however this seems to wipeout the homepage slider. The images in the post are ones which I have added in myself, meaning not the one which is displayed on the homepage slider, but one I have added in myself through the WYSIWYG editor.

    Any ideas on how I can get this to work and not conflict with the homepage slider?

    Hope this makes sense!

    Thanks in advance,

    Adam

    • Diana Brewster says:

      Hi Adam. Thanks for your comment. Unfortunately, I doubt I can be of much help here, but perhaps another reader will have some ideas.

      Are you saying that the lightbox plugin doesn’t work on the single page view, even when the slider isn’t present? Or are you trying to have the lightbox work on the homepage, where the slideshow is also displayed?

      While SimpleFolio is a premium-styled theme, it isn’t being supported by the author, so that puts you at a disadvantage. The complexity of themes and plugins can lead to conflicts, as you are discovering.

      I wonder if the likely cause of the problem is a shared Javascript namespace. You’d have to search for variable names that might be duplicated in the lightbox plugin and the built-in slider, and then change the variable name.

      I think that the slider that’s included in the theme is not a robust one. It might be a better idea to replace the slider with a plugin.

  10. Adam says:

    Hi Diana,

    Thank you for the prompt response. Yes, the lighbox was causing the homepage slider to not work, however worked on a post. I did a little digging and appears to be a conflict as you say.

    I did manage to resolve this however by using a plugin called Shadowbox JS which was an easier option than editing the code conflict.

    Thanks,

    Adam

  11. dirk adamsky says:

    Hi Diana,

    in ie9 the simplefolio top menu doesn’t work on the homepage.

    best regards,

    dirk adamsky

    • Diana Brewster says:

      Thanks for pointing this out, Dirk. I finally got around to it. Lacking IE9, I found a useful tool in Adobe Browser Lab, free for now. There’s an update to the cufon-yui.js script which generates the fonts. Just replace the script with the new one. Feexed!

  12. Chris says:

    Any ideas on how to show the slider and the slogan on all pages and posts as well? Being struggling with this one for 10 hours now

    • Diana Brewster says:

      You’re in luck, your question stimulated me to find the answer.

      The problem is that the S3Slider script wasn’t being invoked because header.php loads it conditionally depending on the template.

      In header.php, look for
      <?php if (is_page_template('template-home.php')) { ?>
      and modify that conditional to include whatever templates you are using for your pages, or remove the conditional entirely if there aren’t any conflicts with other scripts.

  13. Chris says:

    Thank you for the prompt answer Diana, but that didn’t seem to fix it for some reason… Maybe I’m doing something wrong… I really suck at coding…

    • Diana Brewster says:

      Chris, if you want the slider and the slogan to appear on other pages of the site, you would copy the relevant code from template-home.php to single.php (for the individual post view) and to whatever other templates you’re using for your pages.

      If you don’t understand PHP and HTML, this could be difficult, but essentially, you will copy the #slider div and the .slogan class elements. Notice that these elements appear after the php get_header call.

      don’t miss the closing </div>s!

      I tested this procedure myself, so I can assure you that it will work as long as you activate the S3slider.js for the templates it appears on, by editing header.php.

      Need I say that you’re working in the simplefolio theme files for all of this? Never touch any of the WP source files unless you want to depart from the future update path. (highly discouraged.)

      There’s no problem with copy/pasting the slogan, since it doesn’t use javascript, so that part shouldn’t have caused you any problem. Again, you need to recognize opening and closing divs, and where the code needs to be pasted.

      If this still doesn’t work for you, you need to study PHP more. I’m only a very basic programmer myself.

  14. Chris says:

    I actually try to have the slider [which will be the same image], slogan and the small text on all of the pages on my website.

    Also I’m struggling to remove the timestamp and the Author on the posts that apper on blog page, and from every post.

    Thank you for taking the time to answer my previous question, really appreciate it.

    • Diana Brewster says:

      Chris, this kind of edit is part of the mainstream WordPress code. You can read about editing the single.php template here:

      The Loop in Action.

      All you need to learn about how WordPress displays single posts is there.

      The WordPress Codex is a fabulous resource for customizing WordPress and understanding how it works.

  15. Shaun says:

    does anyone know how to add phone number on top right corner? I can add a phone number by editing style.css and header.php but I wanted it to be in line with the wrapper and not all the way to the right.

    align to the right makes the phone number goes all the way to the right while adding a margin doesn’t look good when viewing it in different resolution. float right doesn’t work as well, any ideas? thank you

    • Diana Brewster says:

      [NOTE: Markup fixed thanks to Preserve Code Formatting plugin!
      Did you try adding it this way:

      
      <div id="pagenav">
           <ul>
                <li class="page_item" style="float:right;">my phone number here</li>
           </ul>
      <ul class="sf-menu sf-js-enabled sf-shadow" id="nav">
      ....
      

      If you don't like inline styles, use CSS, but this would be the fast-and-dirty way. I'm not 100% that works, I just tried it out with Chrome's indispensable web development tools. The Cufon nav links went "poof" in the display when I tried that, but I think that might just be an artifact of the tools. I inspected the element, edited the HTML in-browser, and tried out styles.

  16. Shaun says:

    Diana, thank you so much for your help. unfortunately that code didn’t work for me. I tried that code using firebug for preview and it did shows up ok – just the way i wanted to, but result is different once the code is uploaded.

    • Diana Brewster says:

      Shaun, if you could try out the code in my comment above (I fixed the HTML markup, so you can see it), I can then take a look at your website and figure out what isn’t working. I don’t see a phone number on your website yet.

      • Diana Brewster says:

        Shaun, there’s something screwy with the divs on your template. There are two instances of div ID=”pagenav”. I don’t know how that could happen. If you were making edits anywhere else, you should delete those edits. If you’re not familiar with PHP and HTML, basically, you shouldn’t be trying to edit WP templates.

        In your theme file header.php, at the bottom of the page, you should see this code:

        <div id="pagenav">
             <ul class="sf-menu" id="nav">
                  <?php wp_list_pages('title_li='); ?>
             </ul>
        </div>
        

        Change that to this:

        <div id="pagenav">
             <ul>
                  <li class="page_item" style="float:right; margin-right:0.5em;">
                        <a>my phone number here</a> 
                  </li>
             </ul>
             <ul class="sf-menu" id="nav">
                  <?php wp_list_pages('title_li='); ?>
             </ul>
        </div>
        
  17. Shaun says:

    Diana, you are a life saver. thank you very much for your help, you just save half of my hair from falling out. thank you!

  18. Ryan says:

    Diana – Thanks for such awesome information on simplefolio! I have a noob question. What is the ideal height/width for slider images on the home page? Thanks in advance.

    • Diana Brewster says:

      Ryan, the easiest way is to use your browser’s “get info” feature for an image. Visiting rabbitsoftware.com I used FireFox browser’s contextual menu (right click) to pull up image info for a slide, which tells me that the slider image is 900px by 250px. This information might also be in the theme package instructions somewhere… I’m too lazy to go check for you right now. ;-) I do believe you can make your slides shorter or taller, but they should all be the same size.

    • Diana Brewster says:

      Hi Ryan. The problem you’re seeing is due to the unequal heights of the divs causing them to wrap oddly. The equal heights code that’s in the theme doesn’t work. Use the code described in my post here.

      • Ryan says:

        Thanks. As my custom.js link above shows, I added the line that should make the second row of 3 line up correctly. Somehow it isn’t working though. I’m sure I must have screwed something up somewhere. I will go back and double-check my steps and changes. Everything seems to be fine, other than that one pesky issue. Thanks again for your info.

        • Diana Brewster says:

          Ryan, so there are 3 things you must do.

          1) Upload equalHeights.js to the simplefolio theme javascript directory: /wp-content/themes/simplefolio/js/

          2) Edit simplefolio/header.php in the two places identified in my post: before loading custom.js:
          <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/equalheights.js"></script>

          3) a bit farther down in header.php you must edit the document ready function thus:

            $(document).ready(function() {
              $('#slider').s3Slider({
                timeOut: 6000
              });
              $('.home_widgets').equalHeights(true);
            });

          I don’t understand what you’re doing in the javascript that you linked. It’s got nothing to do with my solution.

          By the way, I see that my hyperlink styling is way too subtle; I’m going to bump that up now.

          Also, let’s take this discussion to that post, since it isn’t so relevant to this one.

  19. Ryan says:

    Please excuse my lack of skills. You are helping me learn. Thank you so much. I finally got it together with the two posts.

  20. Shweta Misra says:

    Hi,

    My Simplefolio 1.5 theme has suddenly gone awry. (I have upgraded to WP 3.3.1). Could you please help me understand what went wrong and how can I fix it.

    Thanks

    Shweta

    • Diana Brewster says:

      Shweta, can you provide a link to your website so we can see how it looks? What version of WordPress did you have prior to the upgrade? How did you do the upgrade? I know that SimpleFolio works with WordPress 3.3.1.

      • shweta says:

        Hi Diana,

        The website URL is http://www.craftworkz.in and I am currently on WP 3.3.1

        I did the normal click-based update from the WP Dashboard.

        Shweta

        • Diana Brewster says:

          Hi Shweta,
          If you look at the source for your homepage, you will see that your website is not completely loading.
          The first thing is to check if there is a conflict with any plugins on your site. So the first step is to turn off all plugins, and see if the homepage loads. If your homepage loads, then the problem is a conflict with a plugin. To find out which one, turn them on one by one, and check if the homepage loads.

          • shweta says:

            Thanks Diana,

            The problem was not in the plugins either. But your suggestion helped me discover the problem in the Header.php file of my theme. Now its fine.

            Thanks a ton :)

            Shweta

Trackbacks/Pingbacks

  1. Altering CSS for every nth element of a class | DB Webwork - [...] wanted to improve on my previous jquery fix to remove the left padding for the 4th floating div.widget on ...

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WordPress | Designed by Elegant Themes