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

learn more… | top users | synonyms

1
vote
1answer
180 views

Assign single template to multiple custom post types?

I have a number of custom post types that I would like to display with the same template which I have created initially as single-photography.php in my theme. Is there any way to assign this template ...
0
votes
2answers
19 views

Pagination not working on custom post page

I have created custom post type called natural food In my page-natural-food.php <div class="main container"> <div class="content left"> <?php ...
0
votes
0answers
19 views

current-menu-item class not working

current-menu-item class not working for particular menu in my theme, My css code is .mainNav ul li a { color: #686868; font-size: 14px; height: 38px; line-height: 38px; display: inline-block; ...
-7
votes
0answers
33 views

Why WordPress developers get VERY LOW salry? [on hold]

There is nothing exists like wordpress developer. Its called WordPress customizer with lowest skill set.I tell you WordPress cusromizer tasks 1.take/steal WordPress package from wordpress.org. 2.take ...
1
vote
0answers
247 views

Adding Custom Product Attribute and Variable in WooCommerce Programatically

Can you please let me know how I can add Custom Product Attribute and Variable in WooCommerce Programatically? I know this easy to be done in Woocommerce GUI but I need to do this through ...
2
votes
1answer
798 views

Wrapper class: How to get rid of call_user_func_array() warning?

I have several installations of wordpress and now im trying to create my own small framework so I can create and maintain my themes more efficiently. What I would like to do is to have a wrapper for ...
1
vote
1answer
21 views

Theme Options page not showing up in admin menu

I'm currently developing a WordPress theme and would like it to have a preferences pane in order to specify the user's Google Analytics tracking code for example. Following the instructions I got on ...
1
vote
5answers
2k views

WP_Query returns no results

I'm using wp_query to create a custom query that retrieves search results but it is returning 0 results. Here is the code: $query = 's=the&posts_per_page=5&paged=1'; $custom_query = new ...
0
votes
0answers
15 views

Video Background Replacing Full-width image background

I have a client who would like to change their current theme so it can use video backgrounds instead of full-width image backgrounds. I thought the easiest way to accomplish this would be by using ...
1
vote
0answers
24 views

Overwrite Parent Theme add_image_size in Child Theme

I'm using a child theme of a parent theme. Now on my parent theme, theveloper adds some custom image sizes like this - if ( function_exists( 'add_image_size' ) ) { add_image_size( ...
2
votes
3answers
570 views

How to export/import theme customizer settings?

I am wondering if it is possible to export theme customizer settings(theme_mods) to be imported into another install of the same theme. I know that the settings are saved into the database so I am ...
0
votes
2answers
33 views

Show different website layout if no sidebar added

I have a question about website layout with and without wp widges in sidebar. Here is the code i have for my registered sidebar. <?php if ( !function_exists('dynamic_sidebar') || ...
0
votes
1answer
17 views

Get all Custom Post Types

I am creating a WP theme with a built in custom post type (and I am using WPAlchemy to add a couple of custom metaboxes). $theme_custom_metabox = new WPAlchemy_MetaBox( array( 'id' => ...
0
votes
1answer
272 views

Why is contact form not working?

I am using a custom contact form plugin from code.tutsplus but it is not working. It looks as if the form is sent because I get the confirmation badge, although I receive no email (I have tried ...
0
votes
0answers
24 views

Fully editable footer

I'm making a theme from scratch and I want to add a footer with editable stuff like copyright / social network / About author excerpt / some link. I looked around on google but I find answer who say ...
0
votes
1answer
146 views

Why adding Categories does not auto refresh in Backend while using my custom theme?

If I am using my own created custom theme, the Post Categories Page in admin panel is not getting updated automatically when I add a new Category. To see the new category I have to reload the page ...
0
votes
1answer
28 views

Filter URL and shortcodes from the_excerpt

I just noticed a weird behavior on a theme I'm working on. If I have a post with just one link or shortcode, the_excerpt will print that URL or shortcode. But if I have some text in the post, below or ...
1
vote
1answer
483 views
0
votes
1answer
4k views

How to add “Template” option in page attributes panel?

I am new in WordPress. In my theme, I do not have "Template" option in 'Page Attributes panel'. I want to add this option. I tried to solve this problem from the following post. But It did not work ...
0
votes
1answer
15 views

Changes to template not showing up unless ?reset=1 added to URL

As title states, I added something to a template file: echo '<img src="'. get_site_url() . '/wp-content/themes/enfold/images/leverage.png" />'; But on firefox and IE, the addition won't show ...
4
votes
4answers
653 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 ...
0
votes
1answer
18 views

Check if redirected from a specific page template

I have a page template, which redirects to the homepage using this: wp_redirect( home_url() ); Now, on the homepage is it possible to check if it has been redirected from a specific page template ...
0
votes
1answer
19 views

Wordpress pulling in random page themes

I have a website that has multiple custom templates -- a variety for pages and a couple for custom post types. However, WP is now screwing it all up. For instance: All of the pages that were setup ...
0
votes
1answer
33 views

Let user to add input fields on theme option page

I'm creating a Theme Option page for my own wordpress theme and I've been trying to create something like this on my option page It means my user(admin) can add any number of input fields (in this ...
1
vote
1answer
37 views

Prevent theme from activating [duplicate]

I am working on a theme that runs code only once on theme activation (using the after_switch_theme hook). I am wondering if it's possible to safely prevent my theme from being activated if certain ...
0
votes
2answers
17 views

wp_post->post_parent object returning 0

I'm developing a Wordpress theme and I've registered a new menu location (called primary menu) and am using a menu with it. In my menu, I have a page called "tier-2 page" under a page called "tier-1 ...
0
votes
2answers
412 views

Creating a Link Text like Submit Button in Admin Page

I'm making an admin page for my plugin and I'd like to make a text link designed like the form button of admin pages. I tried this but didn't work well. <a href="" cless="button-primary" ...
0
votes
1answer
504 views

How to add menu support to a theme?

I tried few tutorials. All i think is i should use register_nav_menus() and then add the menu in header.php Here is the code i tried in functions.php from this help site itself function ...
0
votes
0answers
23 views

Let users to add any number of input fields in the theme option page

I've been creating a custom settings page for my own theme according to this article. What I want to know is how to let users to add any number of input fields. Just like this image I have ...
2
votes
2answers
263 views

Easy WordPress theme creation tutorial? [closed]

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, ...
0
votes
2answers
396 views

How to add icon over specific thumb

I wanted to do the following, and I know its possible, but I don't know how. I'm looking at in_category, but it doesn't make to much sense. Basically what I want to do, for an example on my homepage, ...
0
votes
1answer
22 views

Following/tracing page construction through theme PHP

What tools and methods will allow me to figure out how a page is being constructed by WP? I have a mix of plugins that are involved in the theme, and starting with the code I can't begin to figure ...
0
votes
2answers
2k views

Get the blog page URL set in Options

I have set the blog to be a different page other than the home page. I want to have a link from single.php to this blog page. Is there any function that pulls out URL for the blog ?
0
votes
0answers
23 views

Iframes are not being showed in customized theme

I've build a customized theme with the client website layout based in twentyten but none of the iframes are being showed. An example can be seen in ...
1
vote
0answers
19 views

Add custom buttons with custom actions in Edit Post screen in WordPress?

I am creating something for a client and I have a Class that I created with a Custom Post Type called 'PuSH Feeds' and when the user adds a new post and publishes it they can then click on one of two ...
0
votes
1answer
18 views

Trouble in enquing all js files under certain directory

I am using _s theme .I have all js files under js folder.My code function _s_scripts() { $js_dir = get_template_directory_uri() . "/js/"; foreach(glob($js_dir.'/*.*') as $file) { $label = ...
0
votes
3answers
45 views

Custom meta box in custom post type not working

As a wordpress newbie I am having problems in adding custom meta box in my "slider" custom post type which I used in some old wp theme. I'm getting a warning: Warning: call_user_func() expects ...
0
votes
1answer
24 views

html5-reset theme does not show the image [closed]

I am started to create a custome theme based on the HTML5-reset theme that a downloaded from GitHub. before touching/modifying anything, just I tried to put an image under the get_header(); and above ...
0
votes
1answer
31 views

Custom HTML structure in wp_list_categories

I am trying to accomplish an Ajax navigation for the categories and for that I need the code to look something like: <ul> <li data-level="1">Parent Category</li> <li ...
3
votes
1answer
685 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 ...
0
votes
0answers
18 views

Display backend function to frontend?

Hello senior developers i have a problem to display to fontend.. //register settings function theme_settings_init(){ register_setting( 'theme_settings', 'theme_settings' ); } //add ...
0
votes
1answer
20 views

Plugin's required JS not being inserted in my theme

All my plugins and their necessary .js files aren't being inserted in my theme's head. The CSS files are being inserted ok, but not the .js files. Not sure what's wrong. When I switch to a default ...
0
votes
0answers
123 views

How To Display Value from Theme Options Field in Front End Template?

I put this code into my functions.php https://gist.github.com/corvannoorloos/4703066 and it work nice. Now I want to display value from Sample Select Options filed in some front-end templates. How ...
0
votes
2answers
24 views

WordPress HTML5 Gallery Support - Convert HTML4 -> HTML5

As of WordPress 3.9, WordPress generates HTML5 Galleries if HTML5 is supported in the theme: add_theme_support( 'html5' ); Originally in my theme development I did not declare HTML5 support and ...
0
votes
0answers
199 views

Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?

I'm working on a new theme to replace an old one. The existing theme has custom menus and I can't figure out why in my new theme a call to has_nav_menu is always coming back false. In my ...
1
vote
1answer
14 views

Wordpress empty Nav Menu error

i have created Multisite. i have assigned menu for the first sub domain while for the second sub domain i have not assigned Menu. i just enabled the Debug mode and got Following error: Notice: ...
0
votes
1answer
28 views

How exactly *does* unit testing work for themes?

As the majority of material on unit testing focuses on plugin development rather than theme development, I've hit a stumbling block when trying it out for myself. I've installed PHPUnit, grabbed the ...
6
votes
2answers
14k views

How to get the path to the current theme?

This code is used to get the directory of the current plugin: plugin_dir_url( __FILE__ ). What should I use to get the directory of the current theme?
0
votes
1answer
22 views

Managing Wordpress Theme

A Wordpress theme has following components: theme.zip file demo-content.xml PSD.zip file (contains files such as icon-blog.psd, icon-home.psd, integrity-blog.psd, ... renew-home.psd) Using WP ...
1
vote
1answer
290 views

WP Customize refresh problem

Hi I am adding options to WP Customize. Mostly everything works, but One of my variable is not refreshed in the preview window. $wp_customize->add_setting('checkbox', array( 'capability' ...