Class Files

I decided it might be easier to find files if I also made a page that just has the files I worked on in class. I will add them to this page as we go along. Most recent at the top.

Thursday 5.09.13

There were no files from today, we worked on your individual projects.

Tuesday 5.07.13

On this day we worked on showing the bio information for the person the article is about (not the author). We worked mostly in content-single.php and also had to add Custom Fields to posts in the Dashboard in WordPress. We changed the div around the author to have the class of .author-box and added a div for the bio info called .extra-box. We also had to edit style.css to style the new information we added.

Thursday 5.02.13

In this class we worked on content-single.php to add the author div and information about the author. To make it actually work we had to go in and also modify functions.php and put in the my_show_extra_profile_fields() function that gives each user profile an extra bioimage field to put in a URL to store their image. Then we had to go into the actual profile (in the WP Dashboard>Users) and put in an image for the user. The image we used was the square one for Archana that is in the zip file of images from today (Images to This day is also the day I gave you the first article content, located in the XML file

  • Theme files from class: InClass_5.2.13
  • Featured Images for articles (and some others)
  • Text content of four articles: certifiedtestsite.wordpress.2013-05-02.xml
  • Thursday 4.25.13

    Here is the starting theme for the day:

    At the end of class

    Thursday 4.11.13

    Today we worked on a number of differnt areas:

    • archive.php: this page template is for when a user requests a list of all posts based on date, category or tag. To test it out install one of the widgets that shows category or tag or calendar and then click on the links.
    • no-sidebar.php: This is an example of a Page Template. In order to make this you need to
      1. add the comment you see at the top of the page and then
      2. Make a page in the Dashboard and choose the template for that page (doesn’t apply to posts)
    • functions.php (footer.php): in functions.php there is example code for adding multiple menus and multiple sidebars. Each of these has the same basic 3 step process
      1. Add functions to functions.php to create the menu/sidebar
      2. Go to the WP dashboard and create the menu or add widgets to the sidebar
      3. Write a Template Function in the place where you want the menu or sidebar to appear.

      I’ve also made a tutorial for doing the menus. You can find it here:


    Tuesday 4.9.13

    Today we worked on adding multiple menus and multiple widget areas (sidebars) to a page.

    The files to look at are functions.php and footer.php, which is where we did the work. Don’t forget you will have to create the menus and add content to the sidebars in the dashboard.

    Thursday 4.4.13

    Today we looked at some new page types:

    • Search
    • 404

    To get the search to work you need to add the search form (we did in header.php) and the the search results (in search.php, and that uses content-search.php)
    404.php is the page template that runs if someone looks for a page that isn’t found.


    Note, I only included the four files mentioned above. You need the other theme files for this all to work.

    Tuesday 3.19.13

    We worked on how to show comments. We worked on two pairs of files

    1. index.php + content.php
    2. single.php + content-single.php
    For the index+content pair all we added was code in content.php to show the number of comments for the post using comments_popup_link() Template Tag. See the post for 3.19.13 for more info.
    For the  single+content-single pair we first saved index.php as single.php and then saved content.php as content-single.php. Each file needed a small change. Again see the post for 3.19.13 for what those changes are.
    Finally we created comments.php. Attached here is the comments.php file.


    Tuesday 3.12 and Thursday 3.14.13

    We worked on Assignment 4 directly on those days. I am not sharing the files because the examples showed are what you need to complete for the homework.

    Tuesday 3.5.13

    On this day we started making a theme from scratch. We started with the zip file containing an HTML and a CSS file. We ended with a new theme folder with index.php, style.css, header.php and footer.php files.

    Thursday 2.30.13

    There were no files from today. What we worked on was too close to the assignment.

    Tuesday 2.28.13

    Today I went over assignment #3 and the files we did were essentially the assignment. So, I will not be uploading today’s files.

    Tuesday 2.26.13

    We worked on Loops in class. Specifically we looked at the query_posts() way of getting information from the database. That file is page-test-query-posts.php and you will have to change the category number on line 29 to an actual category id from your blog instead of 13 like it is now.

    Thursday 2.21.13

    We worked on two themes Thursday. The first one, Twenty Twelve, we mainly worked on the sidebar-new.php file adding in Template Tags.

    The second one was Twenty Ten and it has the small edits we made at the end of class to add the_excerpt to loop-single.php.

Leave a Reply