Adaptive Blog Theme: The Loop and Templates
videos

Adaptive Blog Theme: The Loop and Templates

Tutorial Details
  • Screencast duration: 43 mins
  • Difficulty: Beginner
  • Topic: WordPress
This entry is part 3 of 12 in the Adaptive Blog Theme: From Photoshop to WordPress Session
« PreviousNext »

Let’s move on to cover The Loop, and using the Theme Unit Test XML Data to populate your WordPress install.


The Loop (Simple Structure) and Theme Unit Test XML Data


Alternatively, Download the video, or subscribe to Wptuts+ screencasts via YouTube

Posts Navigation, The Loop, and Post Formats


Alternatively, Download the video, or subscribe to Wptuts+ screencasts via YouTube
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.facebook.com/khaled.weslati Khaled Weslati

    thank you Adi

  • Richard

    Is it only me or the videos are not showing?

    • Adi Purdila
      Author

      Nope, not seing the videos either.

      • http://wp.tutsplus.com/ Japh

        I’ve noticed that this happens on the occasional page load. A refresh usually resolves the issue.

        I will mention this to our devs to look into.

  • anghor

    One question about gallery post format: Once you’ve entered into single post view there was no another 7 images. Is that OK, or this need to be fixed in single post formating?

    • maroberto1

      That’s because there is no single template at this stage so it’s just using the index hence you’ll get exactly the same data, once a single template is coded it will use this, I’m guessing he many create a custom single template for each post format

  • http://twitter.com/borowskirafal Rafał Borowski

    Para pam pam pam… I’m lovin’ it ;) Saw them several hours ago on YouTube :D

  • http://www.ruturaaj.com/ Ruturaaj

    Nice tutorials… no hurry whatsoever; just steady improvisation and the theme simply evolves out of static HTML. Nice presentation Adi. But you do a lot of typing my friend… there are some good IDEs which allow to use, what’s better known as Intellisense (CTRL + Space on Windows PC and you get a list of functions/properties). I’m feeling how lazy I’m after watching your video as I type only half of the function name and depend on my IDE to complete the rest for me. :-)

    Yes, I must admit, this is not a good idea for those who’re learning WordPress programming. I may sound slightly old school person here; but trust me, more and more typing the actual function names like Adi, you’re doing in these videos, better you remember the entire syntax of function.

    I’m waiting for your next tutorial parts… hopefully this tutorial series will also include the “Publishing your Theme over WordPress Repositories” and “Posting Updates to Theme” so the Users will see the “Update Available” message for our theme as well. It took me a while to figure out how to implement this functionality; I’m sure you can present it in a much easy to understand way. :-)

    • Adi Purdila
      Author

      It’s true I do a lot of typing, but I wanna go through the whole process slowly so that it’s easier to follow :D Unfortunately, I’m not covering the part with the theme publishing since the series was already huge, but I’ll consider it for a QT it you guys want :)

      • krim belkacem

        i’m ok with you.
        may be you will cover how to create templates pages like (categories, archives, autors)
        thank you adi
        as always you’re doing a great job this is even better than premium tutorials

        thank you very much

      • http://www.ruturaaj.com/ Ruturaaj

        Thanks so much Adi, you’re already doing a wonderful tutorial series and any addition on top of the current List will surely be a cherry on top! :)

    • Richard

      Would you mind sharing the knowledge? :)

      • http://www.ruturaaj.com/ Ruturaaj

        why not, always a pleasure. in fact we all have a very generous creative community here. please elaborate on which issue you wish to discuss. :)

        • Richard

          Well I would like to know more about “Posting Updates to Theme” and how to implement this feature :)

          • http://www.ruturaaj.com/ Ruturaaj

            Check this out:

            http://wp.tutsplus.com/tutorials/plugins/a-guide-to-the-wordpress-http-api-automatic-plugin-updates/

            This explains the update feature for Plugins hosted in WordPress Repository. With just a few changes in the code, same class is applicable to Themes as well. The Update feature for self-hosted Themes and Plugins is a bit tricky and this comment area is too small to discuss this topic.

          • Richard

            Thanks for the link, seems like a lot of code :)

            What I am interested in is the update feature for my own themes that my clients use. Seems that will be a lot harder than i thought.

  • krim belkacem

    thank you very much adi purdila
    after making the best tutorials in webdesign.tutsplus
    you’re again making the best tutorial in wp.tutsplus
    we waited for this for so long and you’re the one that got the anser
    so thank you very much adi
    great job

  • Bucur

    Salutari personale lui Adi,bravo man,excellent tutorial.

    • Adi Purdila
      Author

      Mersi mersi :)

  • http://www.facebook.com/al.mcrorie Al McRorie

    love this series, would really appreciate a file of the code developed in each step or at the end. I want to be able to check my work as I go along or certainly at the end.

  • John

    How do you export those individual photoshop layers so quickly (from the psd section of the tutorial)?

  • sajid

    This is initial question: Is there any plugin for Dreamweaver cs6 which transform text into tags? like u do.. div.classname>

  • http://www.facebook.com/al.mcrorie Al McRorie

    been coding up the wordpress theme as you go along Adi, but I cannot get the gallery format page to work, it shows all of the images in the test unit, and does not show only one, as well, the message about the number of images does not show so I am sure that it is not going through the gallery loop correctly.. how do I debug it?

    • Adi Purdila
      Author

      We didn’t get to the gallery format yet, we’ll build a custom one later in the series. For now, we’re using a generic template that’s why all the images are shown :)

      • http://www.facebook.com/al.mcrorie Al McRorie

        sorry Adi, made a typo in the template name. one other thing I am running into is that the single image now does show but the number of images shows as 0 photos, not about 20 that are attached to that post. still working on that, trying to figure it out. when I show $gallery_count, it shows as 0, not 20 as expected (unless it is only showing one digit of the total).

        Al

        • Adi Purdila
          Author

          Hmm, my mistake, I mixed up the videos, I thought we didn’t get to the post formats yet :D

          @facebook-100000340022981:disqus Try to echo the count without the _n(), see if that works. If it does, maybe you didn’t write the _n() correctly.

          • http://www.facebook.com/al.mcrorie Al McRorie

            got it working correctly now, also wondered why the sidebar stuff was showing up without sidebar.php being set up, did not realize there was a default version, learning lots of new material with this tutorial

            thanks for doing this one Adi

            Al

        • http://www.facebook.com/al.mcrorie Al McRorie

          found another type ‘images’ works better than ‘iamges’, number of photos shows as 22 and theme code should be good now, now to dissect the code you have shown for this

  • http://twitter.com/beingsagir Sagiruddin Mondal

    can anyone please send the code ? I am really strugling with the header one :( , my twitter @beingsagir pls do help me :)

  • dj

    Adi… It would seem that in many, if not most, cases we would want to display some entered text inside the link and gallery formats. I.E. if I wanted to bother to put up a recommended link in a post – I most likely would want to explain it a bit (why it was there etc.) for the readers of my blog. Same thing for the gallery.

    I don’t see that you’ve done that – how would one make that happen? I assume that there are wp codes to add it – would it merely be the_content()?

  • BounasserAbdelwahab

    I’m Sorry But i Have a Question
    Is this a premium tutorial ?

  • http://www.facebook.com/kohutiv Ігор Когут

    thanks a lot for your great job

  • Bharat

    Thanks Adi. Very nice tutorial. I never worked on WordPress but after watching your video series I feel I know WordPress.

    Now I am waiting for custom CRUD WP Plugin series.

  • http://twitter.com/tenzin_says Tenzin L.

    I get an error after editing the functions.php file. When I put no code in the functions.php and leave it blank, I don’t get an error. why is that? The code thats in the functions.php file are:

    __(‘Top Menu’, ‘tenzin-framework’),

    ‘main-menu’ => __(‘Main Menu’, ‘tenzin-framework’)

    ));

    }

    add_action(‘init’, ‘register_my_menus’);

    ?>

    • Adi Purdila
      Author

      Hi Tenzin,

      Apologies for the big delay in answering this. The code you provided is not valid, it seems to be a part of a function (register_my_menus function) so that’s why you get php errors. Have a look at the tutorial source files to see the exact functions.php.

      Adi

  • http://twitter.com/tenzin_says Tenzin L.

    Hi all,

    I was just editing my theme’s function.php file to enable post thumbnails when suddenly my site and dashboard became inaccessible. I am getting the following message:

    HTTP Error 500 (Internal Server Error)

    • Adi Purdila
      Author

      See my reply below. Once you correct your functions.php you should be able to access the dashboard :)

  • Thomas

    Hey at the moment I have trouble with the preview of my portfolio which is a gallery. I’m trying to get the first of the gallery to show up, but nothing shows up. Can anyone help me? http://www.bigtukker.nl (I’ve been on it for a good part of today)

    • Adi Purdila
      Author

      Hi Thomas,

      Did you follow the code from the video? If so, it would help if you can share the code you wrote for the gallery bit.

      Adi

  • Pingback: From Photoshop to Wordpress Theme | MBAx.me

  • ahmed ameen

    an issue please tell me how to solve it

    • Adi Purdila
      Author

      I think you need to add some bottom margin for the pictures. I’m guessing the lack of spacing is the problem you’re referring to, correct?

      • ahmed ameen

        no, the image with caption an another image appear above it and i
        downloaded the attached theme that you put and i found the same issue,
        thanks for fast reply

        • Adi Purdila
          Author

          Hmm, I’m really sorry, but I still can’t see other problems than the one I talked about. I only see 2 pictures in this screenshot: one on top and one on bottom with caption and custom border. The only problem I see is the lack of spacing between the two pictures.

          What am I missing?

          • ahmed ameen

            it must be one image only not to as the post format why there are two pictures and this problem appear on your theme but didn’t appear in your screen cast

          • Adi Purdila
            Author

            Oh, I see now :) Hmm, did you check that post? Maybe you’ve attached two pictures to it by mistake and it’s displaying both of them.

            Adi