Tag Info

Hot answers tagged

9

To make the header on the Twenty Ten theme less tall (i.e. a height with fewer pixels) put this code at the bottom of your theme's "functions.php" file (being sure to change the number 180 to whatever height you want): <?php add_action('twentyten_header_image_height','yoursite_header_image_height'); function yoursite_header_image_height($height) { ...


7

@Ben, If you look at line 132 of loop.php in Twentyten you will find the conditional statement that is telling WordPress to only display the_excerpt on category archives. Right below that after <?php else : ?> is how all posts that are not on an archive page, in the asides category or in the gallery category will be displayed. (The asides and ...


5

Hi @Himanshu Vyas: There are several steps to creating additional menus using the new menu system in WordPress in the TwentyTen theme or any WordPress theme (of which some of these steps can be done out of order). In addition, I'm going to highly recommend you create a child theme based on TwentyTen instead of modifying it directly: Create a Child Theme ...


5

Twenty Ten modifications will be overwritten with upgrades so you should be using a Child Theme of Twenty Ten instead of modifying it directly. There really is no way to stop the upgrade/overwrite without renaming the theme and putting it in a different folder with a different name.


5

Short answer: Yes. Longer answer: Just because something is released as open-source/under the GPL doesn't mean you can't put it behind a paywall. All WP themes have to be licensed GPL if you distribute them, because they are derived from the WordPress code, which is itself GPL, but you can still charge for it. Your css and images, however, do not have to ...


4

Actually, Twentyten has a no-sidebar page template already. Modify the template option in the page edit screen: And viola:


4

I don't think there is an option to do that. You can edit the theme to remove those elements, but then you will have a problem when the theme gets updated (pretty frequently for Twenty Ten right now. But if you did want to do it, you have three ways to do it: You can edit PHP files for the presentation (e.g. loop.php) under Appearance/Editor and delete ...


4

Hi using Function Reference/remove action and usingFunction Reference/remove filter.using these two functions only we can overriding the functions.


3

in your theme's functions.php, look for this: // The height and width of your custom header. You can hook into the theme's own filters to change these values. // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); ...


3

It looks like twenty ten displays the excerpt on category archives. If you're using manual excerpts, this is an easy fix. Just add this line of code to your theme's functions.php file. It tells wordpress to run the excerpt through the do_shortcode function/filter. add_filter( 'the_excerpt', 'do_shortcode' ); If you're not using manual excerpts, we have ...


3

The code you are looking for is in functions.php (line 106 to 211). To understand what they have done in TwentyTen, I would suggest that you read the following: http://codex.wordpress.org/Function_Reference/add_custom_image_header


3

I wrongly assumed that @Elpie meant to make a Child Theme. Therefore my answer now becomes that I suggest making a Child Theme of Twenty Ten to a. protect your changes for future updates and b. still have all the benefits that Twenty Ten offers now and in the future. To do so, you will also need to duplicate the twentyten folder and give it a different ...


3

You need to have the script in a separate file (normally it would be filename.js; I suppose filename.php would work?). Then, you need to register and enqueue that script file, using wp_register_script() and wp_enqueue_script() e.g.: function mytheme_register_custom_scripts() { if ( ! is_admin() ) { $scriptsrc = get_stylesheet_directory_uri() . ...


3

Here is a quick snippet I use to get started on my projects: The first step is to add some code to the functions.php file. This is what will enable the WordPress Custom Navigation. The controls will be in Appearance>Menu's once your finished. Code for functions.php: <?php add_action( 'init', 'register_my_menus' ); function register_my_menus() { ...


2

I was curious about this myself one day. Here's a link explaining it. Excerpt from Wikipedia link above: XOXO (eXtensible Open XHTML Outlines) is an XML microformat for outlines built on top of XHTML. Developed by several authors as an attempt to reuse XHTML building blocks instead of inventing unnecessary new XML elements/attributes, XOXO is based on ...


2

The solution was very simple! Just use Superfish.js as instructed on http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started Be sure to include superfish, hoverIntent and jQuery in your wordpress. In your custom js script file, something like this works like a charm: $('ul#theidofyourmenu').superfish({ delay: 600, // This will fire ...


2

WordPress admin screen -> Settings -> Discussion -> "Allow people to post comments on new articles". Uncheck it. For existing posts, go to Posts -> All Posts. You can click "Quick Edit" on any post to find the "Allow Comments" checkbox and turn them off for that post. To bulk-edit existing posts, you can select all the posts you want to edit at once using ...


2

The classes are not added by the Twenty Ten theme, but by the common custom navigation menu code, in _wp_menu_item_classes_by_context(), which is called from wp_nav_menu(). If you want to add extra classes you can do that by either hooking into wp_nav_menu_objects, called once with the whole menu tree, or into nav_menu_css_class, called when rendering each ...


2

Twenty Ten has been tested by the theme review team and it passes all the unit tests. You can see how it looks on one of the demo test installs or another install I found. Try doing a fresh install of WordPress with a new database with no plugins.


2

You're probably looking for something like this: <?php function add_classes_to_body_class($classes) { // make sure 'page-template.php' matches your template name if ( is_page_template('page-template.php') ) { $classes[] = 'main'; } return $classes; } add_filter( 'body_class', ...


2

At the moment, WordPress replaces core files when it updates. This will change in the future, but for now all core files get replaced, i.e. every file that comes with WordPress. This includes the default twenty ten theme. If you modify twenty ten you should save your modified theme with a different name. To do this, make a copy of the twentyten folder and ...


2

This is a known issue with the Twenty Ten theme, arising from both the theme and core code. Twenty Ten has a number of accessibility issues - see Trac: http://core.trac.wordpress.org/ticket/14782 Some of these have been corrected in a child theme for Twenty Ten that you can get here: http://accessible.sprungmarker.de/2011/01/accessible-1-0/ The CSS and ...


2

Several options: Manually add the <!--more--> link to each of your posts, at the appropriate location (as suggested by @spartacus) Filter $content at the the_content hook, to return the appropriate amount of content (I'm not sure how you would filter to return 20 lines of content), plus a read more link Use the_excerpt() instead of the_content(), and ...


2

You don’t new »statements«. Take a look at the Template Hierarchy: WP does most of the work for you. 1. Find the name Just create a new post list template, similar to your index.php and name it category-slug.php. To get the slug part, go to wp-admin/edit-tags.php?taxonomy=category and look at the column named … slug. See the full size image In my ...


2

You have the basic idea. You can build up a theme using html and css as you see fit. That controls the look and feel basically. The php brings the content and function. I learned to make themes by picking at other themes until I figured out what the php did. You can look up each template tag in the codex to get an idea of what it does The 'twentyten' ...


2

Viewing your pagesource and clicking on your first style sheet link brings up this error: <html> <head> <title>Not Found</title> </head> <body> <h1>Apache server with mod_pagespeed</h1> OK <hr> NOT FOUND:http://mikewills.me/blog/links-for-2011-02-24/ ...


2

Not sure I understand your question completely hakre but here is the code that shows the featured image for twenty-ten in header.php.The image sizing is defined in the functions.php file. It also uses a function called http://codex.wordpress.org/Function_Reference/get_header_image. <?php // Check if this is a post or page, if it has ...


1

My VoodooPress site is a twentyten child theme. Has some pretty cool functions going on behind the scenes. But pretty much every post on the site is about things to do with a twenty ten child theme. For instance, the things you ask about: Working with thumbnails Adding image sizes etc. Hopefully you can find some help on there!


1

create a new page template, simply duplicate the current page.php or index.php. remove the following: <?php get_sidebar();?> and place a template title at the top of the file <?php /* Template: No-Sidebar Template */ ?> Then you can choose that when publishing. NOTE: This will probably impact on your styles, may need to tweak your ...



Only top voted, non community-wiki answers of a minimum length are eligible