Themes create the public (front-end) interface for a WordPress site.

learn more… | top users | synonyms

6
votes
1answer
199 views

Is there any sort of theme dependency management?

I'm developing a Wordpress theme with a few other individuals and am running into a problem where I add a plugin and then I have tell the other developers about the plugin I installed and the settings ...
6
votes
4answers
1k views

Using Bootstrap in themes

Twitter has just came out with a new web framework called Bootstrap. What's the right way to use it within a theme? Update: The stylesheet inclusion is simple indeed. I want to know which caveats or ...
6
votes
2answers
561 views

Theme customizer - settings order

If I add more than 5 Settings to a single section, the order of the settings gets weird. For example: // Link color $wp_customize->add_setting( 'tonal_'.$themeslug.'_settings[link_color1]', ...
6
votes
2answers
180 views

Add default Backgrounds

Is there code or a plugin that would make it possible to add default backgrounds, like you can with default headers in Twenty ten. Seems like the same frame work for backgrounds and headers.
6
votes
1answer
576 views

What is the difference between esc_html and wp_filter_nohtml_kses?

What is the exact difference between esc_html and wp_filter_nohtml_kses. Everywhere I look says that both strip all the html, the only difference I can see is to do with exactly how they do this. Does ...
6
votes
1answer
694 views

Mini-Site Strategy

I'm working on a project to allow a number of mini-sites within a WordPress multisite installation. Here's how it's supposed to function: The client has a large number of individual locations, each ...
5
votes
6answers
1k views

What Wordpress E-Commerce theme should I use to get started?

I've done created a LOT of Wordpress themes and plugins, but I haven't done much with the Wordpress E-Commerce plugin. If someone asked me what theme they should start playing with to learn about ...
5
votes
1answer
10k views

How to add posts to custom menus?

I'm just beginning to work the "Custom Menu" functionality that was introduced in 3.0 into my theme. I like everything about this new capability and API, with one exception: Why no posts? I can ...
5
votes
6answers
2k views

Where to store PHP files created by plugin / themes

There are cases in which a plugin or theme needs to create a php file somewhere that can later include it. For example a captcha plugin, or some kind of a templating system like twig/smarty (In my ...
5
votes
2answers
4k views

Generating CSS Files Dynamically Using PHP Scripts?

As part of my efforts to speed up my themes for my clients I am delivering my CSS via a dynamic PHP file. At the end of the called for example my_theme_css.php: This allows me to add Expiry headers ...
5
votes
2answers
384 views

What are the ADVANTAGES of ORIGINAL wordpress template structure?

Precondition: coming from a Custom PHP applications(using symfony, zend and so on) world, for me it feels unnatural to have template separated in a way that is done in original wordpress theme. e.g ...
5
votes
3answers
370 views

How to: Update live sites theme from version control repo via plugin or library? [closed]

Maybe someone knows how i could update my live sites theme from a version control*) project repository. Point is that it's really time consuming if you got your theme hosted with version control (as ...
5
votes
1answer
1k views

Why when I submit a form in wordpress it loads a 404 page though URL is correct

I am just creating a simple contact form, but I notice that it seems to post to an invalid page. The url in the browser is correct but the title of the page is "Page not found" on the top of the page ...
5
votes
3answers
10k views

wp_nav_menu(), how to change <li> class?

I'm building a menu for my website. The static is looking like this: <nav> <ul id="menu"> <li class="item_1"><a href="#">Item 1</a></li> <li ...
5
votes
3answers
1k views

Change admin bar to default:off

While I quite like the admin bar I actually want it to be OFF by default instead of ON ( I don't want to disable it altogether because I want users to be able to turn it on if they want - but but I ...
5
votes
2answers
6k views

Adding Language Support using .pot and .mo files to a WordPress Theme?

How do we add language support using .pot and .mo files in a WordPress theme? And how we retrieve the theme?
5
votes
2answers
564 views

Wordpress Settings API error

Hi I am trying to creating some custom options for a template I am developing but I seem to be getting an error: Warning: Illegal string offset 'show_header' in ...
5
votes
3answers
3k views

Plugin for custom sort order for categories?

I'd like to employ a sort order option in my theme to allow categories to be sorted similar to pages. Can anyone recommend a plugin that does this?
5
votes
5answers
1k views

Form Submitting Error with get_template_part()

I have come across an interesting problem regarding the get_template_part() . I have created a theme options page (named sitewideSettings.php) normally I would include this in functions.php like so: ...
5
votes
3answers
512 views

Get 'page' number with infinite scroll

I added infinite scroll support of the Jetpack plugin to my own theme using this tutorial: add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'footer' => false, ...
5
votes
2answers
4k views

how to create a conditional content_width for a wordpress theme?

I'm trying to create a conditional statement for the content width in the functions.php of my theme. So some categories will have a content_width of 580, some will have 900. This will make the oEmbed ...
5
votes
2answers
527 views

Are the wordpress Core css styles really all nessasary?

On WordPress Codex there are this CSS styles listed, its a quite big list of styles but it seems they are doubled unnecessary. It says: Each Theme should have these or similar styles in its ...
5
votes
4answers
514 views

design and development workflow

We're developing a set of websites, complex ones with a lot in common, and the company have decided to use WP as a base CMS. As in every site, there is a design process, followed by HTML, then ...
5
votes
3answers
322 views

Nested comments ignored for max per page in wordpress

I have the default setting (IIRC) of 10 comments per page, and max nesting of 5 deep. The problem (or at least, minor annoyance) is that replies to comments are not counted towards that maximum of ...
5
votes
2answers
256 views

Best practice for including plugins as part of a theme?

I'm working on a theme that includes some functionality I've developed as separate plugins (as I'm hoping to release them independently). I'd like to include these plugins as part of the theme core ...
5
votes
1answer
1k views

What is the difference between wp_register_sidebar_widget and register_widget?

What's the difference between them and when should we use each one ? I'm using wp_register_sidebar_widget right now and it's working fine but I've seen a lot of tutorials online on how to create a ...
5
votes
1answer
197 views

Why doesn't default Wordpress page view use force_balance_tags?

I noticed that the default WP theme uses force_balance_tags for listing posts' excerpts. This way, it doesn't cause major html breakage whenever someone writes a post like <div><b>This is ...
5
votes
4answers
1k views

A way to automatically install pages on theme install?

I'm trying to build a theme which would require specific pages to be included. Is there a way to automatically create pages and assign them to their page templates when a theme is installed?
5
votes
1answer
4k views

Form to Add Posts to Custom Post Type

Basically I want to display a form on my blog (on a certain page) that will allow anyone to fill it out and it will create a post in a custom post type. I saw the answer once before but I can't find ...
5
votes
1answer
751 views

Should we use get_template_part() in functions files instead of include_once?

I'm using the theme-check plugin to check my theme for errors and recommendations, I'm using get_template_part() in theme files like header.php and index.php but in functions.php I'm using ...
5
votes
3answers
3k views

Is it possible to stop selected plugins from loading on certain template pages?

I have a template page that has form on that is only used once in my site. The form uses form validation using jquery validate plugin (such a great plugin). Once the cart66 Plugin is loaded, the form ...
5
votes
1answer
331 views

WP 3.4 - what action/hook is called when theme customisation is saved?

i'm looking for the action/hook called when saving theme customs colors in the new admin interface? i need to call a custom function to save a set of php generated images. if anyone have clues... :) ...
5
votes
2answers
149 views

Template for individual post designs

I browsed through the suggested posts, and couldn't find anything that was exactly answering my question. I apologize in advance if I'm reposting something obvious here, but there you have it. I want ...
5
votes
3answers
640 views

Splitting WordPress theme CSS into multiple files, good or bad?

I'm developing a WordPress theme framework. I want organize CSS for each section into separate files for the following reasons. Developers can easily deregister styles by parent theme and load their ...
5
votes
1answer
375 views

What is the difference between WP: template_directory vs TEMPLATEPATH

I am trying to code in more consistent manner and would like to know what is the difference between WP: template_directory vs TEMPLATEPATH.
5
votes
2answers
4k views

Possible to “Attach” images to multiple posts without inserting or uploading twice?

How can I attach images to a post which have already been attached to other posts without having to upload them twice? I don't want to insert the images into the post, I simply want to attach the ...
5
votes
3answers
325 views

How to make a theme with more than one CSS file?

I've made my first theme and now I want to create different "profiles". These profiles are just independent CSS files that user can try. The point is, how to make these files to allow users to choose ...
4
votes
3answers
5k views

Add Plugins to Wordpress Theme

I'm creating a wordpress theme that I aim to sell at some point. Now, I've discovered that some of the wordpress.org plugins would be great for things that I want to do. They already hold much of the ...
4
votes
1answer
591 views

Enqueue a stylesheet for login page and make it appear in head element

I try to style the login page in my theme. Very simple: add_action( 'login_enqueue_scripts', function() { wp_enqueue_style( 'TEST', get_template_directory_uri() . '/css/login.css' ); }); ...
4
votes
2answers
947 views

WP 3.3 Tooltips API?

Does anyone have a tutorial on how to implement the new Tooltips API into a theme or plugin? I'm eager to tap into this to help first time users of my theme and plugins. From mashable'e excellent ...
4
votes
2answers
162 views

Where do I start from

I'm student web developer and I'd like to know the things I should know before venturing into WordPress. Where do I start?
4
votes
3answers
7k views

How to remove search bar from a wordpress theme?

How to remove search bar from a wordpress theme?
4
votes
4answers
2k views

Including CSS and JS on Admin Screen of Custom Theme Options

I am creating a custom theme with a theme options page. I would like to style the options page and do not want to include inline styles. Is there any way to include an external stylesheet from say ...
4
votes
2answers
7k views

When to use add_action('init') vs add_action('wp_enqueue_scripts')

In my theme's functions.php, I'm calling an add_action in order to gain a measure of control on where jquery is loaded (in the footer along with my theme's other scripts). The problem I'm having is ...
4
votes
2answers
1k views

How to add a checkbox element to attachments editor with example

The code below adds a custom input field to the attachments editor. How can I convert the text input to a checkbox and get/set the value of the checkbox on load and save? Note: "input" => ...
4
votes
4answers
2k views

Adding a div to wrap widget content after the widget title

I'm trying to add a div to a widget's content in my dynamic sidebar. Here is the register code; register_sidebar(array( 'name' => "Sidebar1", 'id' => 'home-sidebar-1', ...
4
votes
4answers
3k views

Get first image in a post

I am using this code directly from the codex. function echo_first_image ($postID) { $args = array( 'numberposts' => 1, 'order'=> 'ASC', 'post_mime_type' ...
4
votes
1answer
128 views

Adding Action Hooks In Parent Theme For Easier Child Theme Customization

I was wondering why isn't anyone (haven't be able to find one with it) adding custom hooks an the beginning and at the end of the theme's function.php for theme development. The reason I'm asking ...
4
votes
2answers
178 views

Why I can't add a CSS style in this WordPress theme?

I am trying to add a CSS style to a WordPress theme that I am developing as is shown in this tutorial: http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/ ...
4
votes
1answer
58 views

Why doesn't /2013/01/ properly return January's archives in archive.php?

I've figured out how to implement pagination into WordPress archives, etc.., but the content isn't being returned correctly. Instead of /2013/01/ returning January 2013's archives, it instead returns ...