Blog

Cappelen Art & Design site launched, takes over AcornArtwork

Welcome to Cappelen Art & Design’s website for the sole proprietorship business created in 2011 by Ann Christin Cappelen. As this site launches, another site is meeting its end and is moving in here.

As it got complicated and a little pointless to keep two separate portfolio sites, one for the freelance work I do in my business and one for anything else, I decided to combine it all together in one place. That means farewell to my old portfolio site, AcornArtwork. And what’s better than taking this merge as a challenge to write a customized theme for and using the great WordPress CMS which does everything I want and need for a business and portfolio site?

All AcornArtwork’s blog posts have been transferred into Cappelen Art & Design’s blog, and I hope to post more often. Be it a link to an another site’s post about something awesome, or the occasional self-written WordPress tutorial.

Introduction to Linux Commands

All web developers need to work with a web server, and it’s then necessary to know a few Linux commands. If you’re not all too familiar with the Linux OS, this is a must-read. This post goes through basic Linux commands and gets more advanced without becoming to confusing.

At the heart of every modern Mac and Linux computer is the “terminal.” The terminal evolved from the text-based computer terminals of the 1960s and ’70s, which themselves replaced punch cards as the main way to interact with a computer. It’s also known as the command shell, or simply “shell.” Windows has one, too, but it’s called the “command prompt” and is descended from the MS-DOS of the 1980s.

Mac, Linux and Windows computers today are mainly controlled through user-friendly feature-rich graphical user interfaces (GUIs), with menus, scroll bars and drag-and-drop interfaces. But all of the basic stuff can still be accomplished by typing text commands into the terminal or command prompt.

February 5th 2012 Interesting Reading, Resources
2

WordPress Theme Lesson 14: Finalizing Your Theme

This final lesson is about improving pieces of our theme. We add a favorite icon, screenshot for WordPress admin, looking at other WordPress functions to make some parts better, and finally take a look at plugins you can install to make the theme better.

It hasn’t been easy to find a good closing point on a WordPress theme tutorial because there is so much more you can do. But the initial goal of this tutorial was an introduction to create your own theme from scratch, getting a strong foundation, and getting familiar with the WordPress API. Hopefully it has been enough to achieve an overview of the path ahead on what you want to learn next, and you now have a basic theme as a starting point. The internet is full of tutorials for pieces of WordPress theme and plugin coding – just Google it.

Read more »
0

WordPress Theme Lesson 13: Page Templates

One of the last things I’m going through in this tutorial is how you can create page templates for even more variability in your site. If you’ve ever needed or wanted to code a single page doing or showing something else than the default pages we’ve looked at up to now, page templates is a way to go.

In this lesson we’ll create two page templates. We will create an archive page (different from the default archive page, archive.php), which on a single page lists all posts in a short form, and below displays tag clouds – one for categories and one for tags. This gives the reader easy access to all information on your site, and is a good example for using in your search results or 404 error templates. The second page template we will create is an example of a front page for our blog, which displays a different featured posts slider than we created in the last lesson and some text. Many use a page template to create a different front page, as opposed to the traditional listing of recent posts. In both page templates we will go full-width, skipping the sidebar. As default all of our pages or posts displays the sidebar, so we can simply tell our page templates to skip the sidebar instead of modifying our existing theme files.

Read more »
0

WordPress Theme Lesson 12: Featured Posts, Dealing with Multiple Loops

In this lesson we’ll add the featured posts section formed as a jQuery slider on top of the front page. By placing it on the front page template we need to adress the issue of creating multiple loops on the one and same page. This lesson accumulates many of the lessons so far in this tutorial; we need to write a custom query code, fetch post thumbnails in a specific image size, and include libraries and scripts to make our slider work.

We begin with registering and enqueuing the necessary scripts for our jQuery slider, for which we will use the jQuery Tools library. We will then add the initializing slider function call in our <head>, and finally write the custom query loop in our index.php to fetch posts from our featured posts category.

Read more »
0

WordPress Theme Lesson 11: Including Javascripts The Right Way

Our design doesn’t require much javascript, but it’s increasingly more common to use javascript to spice up a web design or for displaying dynamic content. For our theme we need to use jQuery for dynamic content on top of the front page, a slider with featured posts. You can improve more of the theme by using jQuery tabs, accordion menus, or to load content without requiring a page refresh. It can make the website more elegant, as long as you don’t overdo it.

If you’re creating a web page from scratch without a CMS, you’d just add each javascript library or script in the <head> section, like we’ve done with the stylesheet so far in this theme. But using WordPress as a CMS we need to take in consideration all scripts which might be added in the wp_head, scripts from both WordPress itself and all active plugins. This is why we need a safe way of adding scripts so that we don’t load the same libraries more than once, and that WordPress loads them in the right order. WordPress has a quite-simple-to-use mechanism for this.

Read more »
5

WordPress Theme Lesson 10: Related Posts, Dealing with Nested Loops

In this lesson we’ll focus on writing the related posts section in the single post view, which should appear between the post content and the comments section. The idea is to list a small number of posts related to the post the reader has just read to inspire her or him to read more of your posts. By adding this piece of code we need to learn more about the Loop and how we handle custom queries.

In all of our templates, including the single.php, we have a Loop which loops through a predefined set of posts. We use a Loop in the single.php and it works just fine because the set of posts we loop through contains a single post. The challenge is not only to write a custom WordPress query, but we need to be extra cautious as this results in nested Loops, a new Loop inside another Loop. We need to make sure that the nested Loop exits properly so the Loop on the outside can continue as normal. There are several ways to make this work, the WordPress Codex suggests one way, but I’ll show you another method since we’re going through WordPress’s suggested way in a later lesson.

Read more »
0

WordPress Theme Lesson 9: Adding Support for Custom Menu

In version 3.0 WordPress launched a custom navigation menu system, allowing users to create custom menus in WordPress admin without the need of editing the theme code. If you’re not familiar with this yet, this is a great and informative Codex page you should read. The traditional way to organize a menu in WordPress was to create pages, and list all pages in the menu. As listing pages has certain obvious drawbacks, for instance you might not want to display all of your pages or you might want to use pages for something else contentwise rather than let them make up the site’s main menu, the new custom menu system provides the author greater flexibility and an user-friendly interface.

So far in the tutorial we’ve used the traditional way to organize our menu in the sidebar and footer, or maybe you chose to manually write out your menu items in the templates. The theme user/blogger/you don’t have a simple way to modify the site’s menu – the only way to change it is to edit the theme files, requiring knowledge in HTML and perhaps even PHP. That’s no good. So in this lesson we’ll replace our menus with support for the new custom menu system.

Read more »