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

learn more… | top users | synonyms

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
356 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
7k 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
2answers
171 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
2answers
1k 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
3answers
9k 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
9k 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
1answer
60 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 ...
4
votes
1answer
342 views

Enqueue Stylesheets After Theme's “rtl.css”

I am currently developing a theme with internationalization support, and would like to load stylesheets after my theme's rtl.css (an alternative style.css loaded for languages with a right-to-left ...
4
votes
5answers
1k views

How to create .pot files with POedit?

I've spent hours today on what seemed like something really simple, which is to create a .pot file for a Wordpress theme that I'm creating. I've read the Smashing Magazine article, the Tutsplus ...
4
votes
1answer
193 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
407 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
166 views

function_exists call in function.php

In the function.php file of the twentyeleven the setup function checks to see whether it exists before running it: if (!function_exists('twentyelevent_setup')): function twentyelevent_setup() { ... ...
4
votes
2answers
48 views

What is the correct way for a theme to support plugin UIs?

For instance if my plugin is creating a form on a page, what can I do to make it as easy as possible for theme developers to skin the form too?
4
votes
3answers
1k views

Hide wordpress plugins from list

I am using a couple of wordpress plugins for my theme, enabling them programmatically. I would not want the user of my theme to be bugged with plugin updates for these plugins, as well as viewing ...
4
votes
1answer
3k views

Pages: frontpage.php, home.php, posts page etc

When do I use the following: home.php frontpage.php Under Settings > Reading Settings Front Page Posts Page I wish to clarify this as I find myself using "Placeholder Pages", empty pages just ...
4
votes
2answers
3k views

How to effectively reset the post object after calling get_posts()

The function below is called from my index.php just below the main content block. Its purpose is to write out a link list of the latest posts. However, I need to reset the post object once this ...
4
votes
2answers
814 views

Call dynamic_sidebar but include/exclude named widgets?

Is it possible to include or exclude specific named widgets that are assigned to a named dynamic_sidebar call? For example, if I've registered a sidebar named "my_sidebar" and the user had placed a ...
4
votes
3answers
1k views

“Quick Edit” > update clears out my custom meta values

I have two custom meta fields that I've enabled for each post, scottb_customHeader and scottb_customTitle These work fine as long as I'm using the full edit feature to edit posts. However, when I ...
4
votes
1answer
120 views

What, specifically, should be included in theme_name_setup()?

I’ve “inherited” the development of an old theme that I’m now bringing up to speed for WP 3.9. The theme code comes with a functions.php that has a function theme_name_setup() that hooks into ...
4
votes
3answers
34k views

WooCommerce shop page to use my custom template [closed]

Before asking the question I want to tell you that I have already asked the question in http://stackoverflow.com/questions/15025213/wordpress-woocommerce-template-file-overiding I am using the ...
4
votes
2answers
2k views

PHP unit testing WordPress?

Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme ...
4
votes
3answers
6k views

How to get gallery images?

I have some images uploaded in wordpress posts (eg. post#1, and post#2). Now I've created a new post (eg. Post#3), and in this post I have inserted the WordPress 3.5 gallery, I did not upload any ...
4
votes
3answers
1k views

Posts in multiple Categories different single.php

I am smashing my head against some code. Here is the situation: I have one post in 3 different categories, this post has to be visible in "category 1" with the single1.php, in "category 2" with ...
4
votes
2answers
627 views

How to change admin bar color scheme in MP6 / WP 3.8 front end?

I need to change default color scheme for all users. The admin bar on my site is vidibile for all users including guests. The default black color scheme isn't beauty with my design and I would like ...
4
votes
1answer
908 views

Understanding wp_add_inline_style

I am trying to get my head round the wp_add_inline_style() function in WordPress. //setting inline css. function my_styles_method() { wp_enqueue_style( 'custom-style', ...
4
votes
2answers
882 views

Add custom user capabilities before or after the custom user role has been added?

Should custom user capabilities be added before the custom user role has been added, or the other way around? add_role() asks for and array of $capabilities in the third parameter of the function. ...
4
votes
1answer
77 views

When coding a Wordpress theme, where does the theme (i.e. the presentation) end and the plugin (i.e. the functionality) begin?

The best guideline I have seen for what should be in a theme is to put "functionality" in a plugin. I am looking at adding more "premium features" like jQuery image sliders. This requires a back-end ...
4
votes
4answers
14k views

Twenty Eleven home page show only excerpt

I am using the brand new twenty eleven theme, my home page is set to show latest posts, but it displays the entire posts, I want to only show the excerpts, not the entire content, Here is the ...
4
votes
2answers
415 views

Custom theme/plugin update checks

At the moment, Wordpress checks the wordpress core for it's updates. But, I'd like to add an additional check to repeat the process for themes and plugins using a seperate address, for updating ...
4
votes
2answers
761 views

Any official way to create an admin theme?

I was wondering whether there's a common way of customising the aspect of the admin panel. I know you can play with the css and js files but what I was looking for is some kind of "admin theme" like ...
4
votes
1answer
158 views

Display admin notice only on main dashboard page

I'm using following code to display a notification in the admin dashboard. I want to display only on the main dashboard page (index.php), however the following code would display on all pages in the ...
4
votes
5answers
688 views

Remove settings if theme is deleted?

Is it possible to perform an action only if the theme is deleted (not deactivated) from the theme directory ? For example, I want to remove the theme settings from database after the theme is ...
4
votes
1answer
94 views

Update exisiting site to 3.5 release candidate

I have an existing site that I want to update to 3.5 now, because I want to see if my plugins and themes work in it. I don't want to wait for the full release (when I'll be able to automatically ...
4
votes
1answer
463 views

Setting multiple default background images?

The following code lets me set a default background image. Is it possible to set multiple custom backgrounds? add_theme_support( 'custom-background', array( 'default-image' => ...
4
votes
1answer
2k views

How to add a 2nd “featured image” to a post?

My theme has a slider widget that allows the end user to select a category and it assigns the posts in that category to the slider. If a post has a featured image, its used as the background of the ...
4
votes
2answers
865 views

How to add Color Picker in Theme Options for the following?

I have a landscaping09 theme. This is what I want: A theme options page with the following options: ->Theme color background change (with colorpicker) or url of the image ->General Navbar color ...
4
votes
2answers
2k views

Add a new checkbox in theme options

I'm trying to add a new option to a theme options panel to hide/show the comments links in the theme template files. I've got the option to show up in the panel, but there's something wrong in that ...
4
votes
3answers
3k views

wp_nav_menu sort order?

Hey Guys, I'm trying to build a right aligned, wrapping capable wp_nav_menu powered menu. Is there a way to have it rendered backwards, so that float: right; would work and not mess up the order? I ...
4
votes
1answer
104 views

Is having multiple theme customizers for different pages possible?

If you have a theme that for instance has a blog, front page and misc pages is it possible to have more than one theme customizer, so that you can provide a live preview when editing styles? My theme ...
4
votes
1answer
707 views

How do I show sticky posts on a static front page that also contains content?

In my theme, I'm using front-page.php for the static front page. I'm also using a page to store the content on the static front page. The front-page.php file is set up to show the content from that ...
4
votes
1answer
1k views

Best practices - Should I create a child theme vs. customizing a framework theme? (such as HTML5 reset)

I have built quite a number of wordpress sites and have worked frequently with the HTML5 reset theme. My workflow has been to simply edit the files in the theme because I often use quite a bit of ...
4
votes
1answer
1k views

How to use Plupload in themes

I am developing a theme which needs uploading from front-end. I want to integrate plupload in my theme while keeping in mind that: Uploading will be handled upon form submission, and not from the ...
4
votes
2answers
56 views

How to edit an existing WordPress theme? [closed]

I've been hired to modify/update/change an existing WordPress theme. The site is already live, and I'm wondering how to work on the theme locally first.
4
votes
4answers
651 views

Any walker causes blank menu?

Using the following, or any other custom Walker_Nav_Menu seems to cause a blank navigation menu, I tried specifying the default to make sure I wasn't going crazy yet it still blanks the output... Any ...
3
votes
5answers
10k views

How to customize wordpress login/register pages?

My question is how do I customize the default WordPress login and register page without editing WP's core files. I'm thinking more along the lines of a functions.php code. Can anyone help me out by ...
3
votes
2answers
7k views

How can I get page slug

How can I get the slug of a page or post?
3
votes
3answers
1k views

How to enqueue script if widget is displayed on page?

I created a widget that uses a jquery plugin, and I used is_active_widget to enqueue the script, it's working fine but it's also including the script even on pages that doesn't show this widget. so is ...
3
votes
2answers
273 views

How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]

Or to make it easier: you just want to disable the caching in order to see your changes in realtime. Any solution that would allow you to disable caching based on IP, logged user or cookie will be ...