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

learn more… | top users | synonyms

3
votes
1answer
498 views

Why to check if function doesn't exists in functions.php?

I see in the twentyeleven theme, before most custom functions they check if it exists <?php if ( ! function_exists( 'twentyeleven_comment' ) ) : function twentyeleven_comment( $comment, $args, ...
3
votes
1answer
156 views

How to display wp_nav_menu() conditionally only when not on a 404 page?

I made a custom design for my site. On my header i put my navigation so everytime i call the header the navigation will be called to, so that i would not be calling it all the time. But now i have a ...
3
votes
2answers
2k views

Custom Taxonomy Tree view

I have been trying google for this, but not so easy to search for. I have a custom hierarchical taxonomy, something along the lines of: Chainsaws - Electric - Petrol - Other Grasscutters - Electric - ...
3
votes
1answer
929 views

What is the best book to learn how to make themes for wordpress?

Do you any good book or video tutorials that easily explain how can I make my own theme for Wordpress? and how to change the structure of the content? Cheers.
3
votes
2answers
189 views

Is it proper to create a page just to generate a listing page (eg. for a custom post type)

I find myself creating pages just as a "placeholder" to a listing page. eg. I create a page "Blog" and "Portfolio". Both has the editor emtpy. And I just use it so that I can use page-blog.php and ...
3
votes
1answer
691 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 ...
3
votes
4answers
488 views

Suggestions for creative use of post format feature, or themes that use them well

I'm looking for themes or examples of sites that use the post format feature in an interesting way. I suppose adding special styling for each post format would be a good start. But if anyone knows ...
3
votes
3answers
5k views

How to add a WYSIWYG text editor to the Category Edit Screen

I've been working lots with categories lately, what with the increased awareness and demand for themed or silo'd site structures. To that end, I'm looking to enhance my category landing pages by ...
3
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 ...
3
votes
4answers
1k views

With Wordpress themes, where do I store the images and files relatively?

In pure HTML, I'm used to storing the files relative to where the particular HTML file is, such as css/style.css. However, with the theme I'm using with Wordpress, "Responsive" I don't know where the ...
3
votes
1answer
355 views

Customize WordPress>Error Page

Is there a way to customize the WordPress>error page template so that the user isn't shown just a blank screen with text? I'm not talking about 404, but when WordPress displays an error. I'd like to ...
3
votes
1answer
613 views

Theme Review: post thumbnail, header image, content width

A followup to my previous question about my theme that was rejected for the WordPress.org theme directory: RECOMMENDED: No reference to the_post_thumbnail() was found in the theme. It is ...
3
votes
1answer
109 views

Where to post/upload the new theme for WordPress theme repository

After a long dedication, I developed a GPL Theme for WordPress. I want it to be available for FREE to WordPress.org Theme Repository. But consulting many Codex resources, I found no direct link where ...
3
votes
1answer
366 views

Should I use set_transient or update_option?

I want to store some Twitter API data in WordPress. After every hour, I want to fetch new data from Twitter, and update only if the data is successfully retrieved from API (sometimes the API gives ...
3
votes
1answer
513 views

When to use esc_url, esc_html, esc_attr, and friends?

Discovered esc_url today while customizing an _s theme. I understand what the function does (sanitizes the URL inside), but what I'm unsure of is the scope of its use. It makes sense to me that if ...
3
votes
1answer
54 views

Where to put archive-{post-type}.php

I have a plugin that adds a custom post type for a website I'm building. I am using the_content filters to change how a singular page looks, and it works great, allowing me to keep everything ...
3
votes
1answer
93 views

What is the best practice for customizing a plugin's JavaScript/jQuery?

Most well written plugins support a safe means for a developer to customize/theme the plugin by copying PHP files to the theme directory and modifying the copies rather than the original plugin file. ...
3
votes
1answer
844 views

What is the difference between strip_tags and wp_filter_nohtml_kses?

What is the difference between strip_tags and wp_filter_nohtml_kses. I tried to figure wp_filter_nohtml_kses from the source but it looks like it does something a bit more complex than strip all html ...
3
votes
1answer
650 views

Reset positions of metaboxes in admin

I am writing a theme and in it I have a function which creates two metaboxes. The forth parameter of the "add_meta_box()" function I used can be set to ( high, core, default or low). I want the boxes ...
3
votes
1answer
249 views

Why max-width:97.5% on content images?

Is there a specific reason why we can find max-width:97.5% instead of 100% in common themes such as Twenty Eleven?
3
votes
2answers
682 views

How to set the default value of a option in a theme?

$shortname = "nuod"; array( "name" => "Custom Logo URL", "desc" => "Enter the link to your site's custom logo.", "id" => $shortname."_logo", "type" => "text", "std" => ...
3
votes
1answer
686 views

is_home() returns false on the home page! When is the home page NOT the home page?

I've placed the following code in my functions.php file if(!is_home()){ echo "Not Home";} if(is_home()){ echo "Home";} However, no matter what page I'm on, I get "Not Home", And I'm real sure I'm ...
3
votes
2answers
187 views

Why might $input (Settings API) be coming through empty?

I'm trying to be a good thememaker and pass all my settings through the Settings API, but I'm running into some difficulty in the sanitization callback function. The core of the problem is this: the ...
3
votes
3answers
1k views

Integrating plugins in themes

I could not find a thread discussing this, so starting this one. I am currently working on a rather elaborate theme for 3.1+, and by elaborate I mean that in addition to styling and regular front-end ...
3
votes
2answers
501 views

Seeking clarification on page request life-cycle

I'm just trying to get my head around the "life-cycle" of a typical page request in WordPress. The Action Reference page lists 38 actions that occur during a typical page load, but two things aren't ...
3
votes
2answers
535 views

Add a preview to a Wordpress Control Panel

I'm trying to create a new wordpress template and inside it I added a Control Panel, inside this control panel there is an option that allows user to choose where he want's to place a on a map, I try ...
3
votes
3answers
2k views

Can You Export Theme Settings From WordPress Multisite?

I do local WP development on a WordPress Multisite instance. What is the best way to move theme settings from there to the live instance? By theme settings I am talking about widgets and theme ...
3
votes
3answers
1k views

Automatic Updates For Private And Commercial Themes?

Is there any way to get wordpress to check for, download private theme updates? I found this plugin for private plugin updates.... ...
3
votes
2answers
249 views

Easy WordPress theme creation tutorial?

I've been looking for a truly simple wordpress theme creation tutorial and haven't been able to find one. I'm specifically looking for something with sample code, a basic introduction to the syntax, ...
3
votes
2answers
494 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 ...
3
votes
1answer
622 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', ...
3
votes
1answer
137 views

Get file headers in custom file

in my one of my plugins i have modules (kind of like plugins in a plugin), is there a function like get_plugin_data() or wp_get_theme() that will allow me to get the header section of a custom file ...
3
votes
3answers
2k views

How to remove duplicate link from add_menu_page

In the theme admin menu below, the "MyTheme Menu Label" is being duplicated twice on the sidebar menu, once for the main menu link and again for the first submenu link. How can I remove the 2nd ...
3
votes
2answers
83 views

Active theme responds to theme change request to alert user

I'm trying to intercept the install themes routine in order to alert the user from the active theme. I'm cobbling together a crude javascript alert below. What are some other options? if ( ...
3
votes
4answers
632 views

Run shortcode before filters

My users post snippets code in comments. I created a shortcode for this : function post_codigo($atts,$content=""){ return '<code>'.$content.'</code>'; } ...
3
votes
2answers
1k views

How to get Images included in Post

is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the ...
3
votes
1answer
386 views

How to call the_excerpt() with tags or the_content() as an excerpt?

Is it possible to call the_excerpt() with tags intact? I'd like to create a excerpted listing of my posts in a specific category, but I'd also like the links and formatting carried over from the post ...
3
votes
1answer
102 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 ...
3
votes
1answer
121 views

How to add a section to the menus configuration, offering hard coded items?

So, let me explain what I'm actually trying to do, maybe there's a better way to achieve it. I'm working on a theme, and I'd like the user to be able to easily position "special" items in the menu ...
3
votes
1answer
981 views

Show a user their recently viewed posts

I am working on a project that showcases a number of products, so i'd like to add a "recently viewed product" selection that keeps track of the last 5 or so viewed products or posts. I saw this ...
3
votes
1answer
1k views

wp_remote_get doesn't work with secure connections https?

I'm querying the twitter api when I use non secure connection http:// it works fine no wp_error (but twitter exceed limit error) but when I use https:// it works in my browser I can see the json and ...
3
votes
2answers
848 views

How to force Media manager to overwrite files of same name?

I have a widget that works with my theme that expects images named in a certain way, slide1.png, slide2.png, etc... However, when the user uploads their own images, named slide1.png, slide2.png, etc ...
3
votes
1answer
366 views

Enqueue scripts inside a class

I have written a small class that will handle enqueues in my theme : <?php class Header { public function init_hooks() { add_action('wp_print_scripts', ...
3
votes
2answers
776 views

Multiple Custom_Background, is it possible?

Is it possible to create multiple "custom background" administration pages? A site I'm doing now needs 2 different background in 2 different areas, I would really love giving my client the same ...
3
votes
1answer
389 views

Setting up partial Right-to-Left admin interface

I am building a custom theme WordPress instance, which needs to be Arabic at the public face and English on Admin site, but with RTL (flush right) in editing fields. My theme takes care of the public ...
3
votes
1answer
130 views

How can i change menu link when page content empty?

I have a menu with parent and child. I created menu from admin panel using Appearance >> Menus with selecting page. But some of my parent pages content empty so i want to set link(null) when page ...
3
votes
1answer
224 views

Custom Comments - Parent / Nested Reply

I am making a custom theme and have edited comments.php, but I'm unable to get the comments to save as a reply to another comment. I have succeeded in showing the comment parent id to show as a hidden ...
3
votes
1answer
529 views

Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying

I am registering sidebars and sidebar widgets. The theme currently supports two sidebars. Primary and Secondary. add_action('widgets_init', array($this, 'add_sidebars'), 10, 2); public function ...
3
votes
1answer
90 views

Change permalinks for posts but not for custom post types

Currently my permalink structure for posts is domain.com/post-title I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and ...
3
votes
1answer
658 views

How to remove the Theme Customization Button from the dashboard and themes options page?

In my Wordpress theme that I've currently been building I do not take advantage of the Wordpress Theme Customization API. As much as I would like too, I've invested far too much time into my own ...