background preloader

Customizing TwentyEleven Theme

Facebook Twitter

10 Handy WordPress Comments Hacks - Smashing Coding. Comments sections are neglected on many blogs. That is definitely a bad thing, because comments represent interaction between you and your readers. In this article, we’ll have a look at 10 great tips and hacks to enhance your blog’s comments section and give it the quality it deserves. The problem. Whether or not you allow readers to add comments without having to be approved, you will often need to edit, delete or mark certain comments as spam. By default, WordPress shows the “Edit” link on comments (using the edit_comment_link() function) but not “Delete” or “Spam” links. The solution. Function delete_comment_link($id) { if (current_user_can('edit_post')) { echo '| <a href="'.admin_url("comment.php? Once you have saved functions.php, open up your comments.php file, and add the following code where you want the “Delete” and “Spam” links to appear. Delete_comment_link(get_comment_ID()); Code explanation.

Source: How to: Add “Delete” and “Spam” buttons to your comments. The problem. Sources: Advanced Wordpress Comment Styles and Tricks. Comments are gold. There’s little a blogger loves more than to see a whole list of comments posted on his/her article. It’s great to know people want to engage with you, and they can add a lot to an article.

However, if comments are not done well, they can be difficult to read and follow, or even just downright boring. What we’re going to do first is create a custom comment callback that allows us to specify the way the comments are output, then lay out the structure for the comment list and reply form, add extra functionality such as author-only styles, implement comment subscription options and spam protection, and, finally, we’ll add nice CSS styling to everything we’ve done. We will be working with the default WordPress theme in order to make everything easy to follow, and to ensure everyone can follow along. We will also be ignoring all styling elements until the very end, so if it looks bad, just be patient!

1 – Create Custom Comment Callback 2 – Lay Out Your Template File like so: Twenty Eleven white space above header [How to remove it] Twenty Eleven white space above the theme’s header is probably a very easy task but not everyone knows this simple step. If you have updated your blog to the latest wordpress version, you will notice the new default theme, which is called Twenty Eleven theme. I have posted some few tutorials about this theme, which are: Twenty Eleven logo video How to replace site title of Twenty Eleven’s theme with an image.TwentyEleven child theme How to create a child theme of TwentyEleven wordpress 3.2 default themeChange continue reading of TwentyEleven theme If you want to change the “continue reading” wording of TwentyEleven, then this tutorial might help.TwentyEleven header image size This tutorial I have made to make the original size a bit smaller by editing functions.php of the child theme I know it depends on people’s preference, some might find it fine, some find it too big, and want to remove that Twenty Eleven white space above the header image. 1. 2.

I actually really love this part. Steps: Twenty Eleven Header Image How to Change size. If you use default theme of WordPress 3.2, you may notice that Twenty Eleven header image is quite big. Although I have no doubt of the theme’s coolness, I personally think that the header is too big. This I already mentioned when I wrote Twenty Eleven theme video introduction post. Twenty Eleven header image features is really nice, because you can make them loading randomly, without adding special codes in the template files. When you want to change the Twenty Eleven theme header size and dimension, especially the height, we should do one important thing first. What this means, when you upload your picture or image to be the header, this image should be made or created in the exact height, so that the height we want to edit the functions.php will be the exact height of the image itself. How to change Twenty Eleven header image size?

First of all, all we need is a child theme of wp 3.2 default theme. Screenshot of smaller header: Changing Twenty Eleven header image size video: 1. 2. 3. 3. 4. Function Reference/add theme support. Function Reference/add theme support Languages: English • 日本語 • 中文(简体) • (Add your language) Description Allows a theme or plugin to register support of a certain theme feature. If called from a theme, it should be done in the theme's functions.php file to work. It can also be called from a plugin if attached to an action hook. If attached to an action hook, it should be after_setup_theme.

Usage Parameters $feature (string) (required) Name for the feature being added. Features list: Default: None $args (array) (optional) Optional arguments (see below). Default: true Addable Features Post Formats This feature enables Post Formats support for a Theme. To enable the specific formats (see supported formats at Post Formats), use: add_theme_support( 'post-formats', array( 'aside', 'gallery' ) ); To check if there is a 'quote' post format assigned to the post, use // in your theme single.php, page.php or custom post type if ( has_post_format( 'quote' ) ) { echo 'This is a quote Post Thumbnails Custom Background.

Replace/Remove Default Header Image Twenty Eleven Theme - WP TIPS. [This post has been updated to reflect the code of Twenty Eleven version 1.4] Ten days ago, on July 4, 2011, WordPress 3.2 was released and with it came a new default theme: Twenty Eleven, which is actually based on a theme called Duster. By far the most popular tip on WPTIPS is “Replace Default Header Image Twenty Ten Theme“, which we wrote almost a year ago and has generated almost 5,000 views at time of writing this tip.

Although the process to replace the default header image of the Twenty Eleven WordPress theme is very similar to that of Twenty Ten, we thought it appropriate to show it here on WPTIPS as people will be looking for tutorials on this subject. Let’s get started – Child Theme As you probably know, to protect yourself from future updates, we first make a Child Theme of Twenty Eleven. For a Child Theme to have basic functionality you need the index.php file, the style.css file and the functions.php file. Copy the index.php from twentyeleven and paste it in your new folder.

The More Tag. You can truncate your blog entries so that only the first part of certain posts is displayed on the home and archive pages. When you do this, a link will be placed directly after your excerpt, pointing the reader to the full post. You can find the More Tag button in the first row of the visual editor toolbar or by pressing Alt+Shift+T: Using the More tag Go to Posts -> Add New in your dashboard to create a new blog entry.Note: this does not work with Pages.Begin writing your post.

Finish writing your post.Publish the post and view the front page of your blog. Click on the link, and you will be taken to the post in its full form. But wait, there’s more! You can further customize the message that displays in the link to the full post content. You will need to do this in the HTML view of your editor. . ↑ Table of Contents ↑ Custom Read More Message To customize the message, simply add a space after <! The front page of your blog should now display your post as such: Formatting Issues.

Support » [Theme: Twenty Eleven] How to change navigation background. How to: Create a Child Theme Based on Twenty Eleven. This is a follow-up of our previous post where we reviewed Twenty Eleven – the new default theme for WordPress 3.2. In the previous post I explained the the structure of Twenty Eleven and why it’s so easy for developers to take advantage of the theme to customize it for their own purposes, i.e. creating a child theme based on Twenty Eleven. Today we’ll have more code, we’ll talk about some neat actions and filters that Twenty Eleven has to offer. We’ll create a new child theme for Twenty Eleven but instead of overriding it’s templates, we’ll use our PHP skills to create a new color scheme for Twenty Eleven — an orange one.

Understanding Color Schemes in Twenty Eleven You’ve all seen the Theme Options settings that Twenty Eleven ships with, which not only looks good and works well, but is also extensible with plugins, extra code snippets in Twenty Eleven (not recommended) and a child theme (recommended). Creating the Child Theme The Child Theme Stylesheet The Orange Theme Stylesheet.