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.
There were no files from today, we worked on your individual projects.
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.
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 Students.zip). 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) Images_to_Students.zip
- Text content of four articles: certifiedtestsite.wordpress.2013-05-02.xml
- 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
- add the comment you see at the top of the page and then
- 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
- Add functions to functions.php to create the menu/sidebar
- Go to the WP dashboard and create the menu or add widgets to the sidebar
- 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: http://profstein.clarify-it.com/d/zcda42
Here is the starting theme for the day:
At the end of class
Today we worked on a number of differnt areas:
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.
Today we looked at some new page types:
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.
We worked on how to show comments. We worked on two pairs of files
- index.php + content.php
- single.php + content-single.php
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.
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.
There were no files from today. What we worked on was too close to the assignment.
Today I went over assignment #3 and the files we did were essentially the assignment. So, I will not be uploading today’s files.
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.
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.