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

learn more… | top users | synonyms

1
vote
1answer
301 views

“Cheatin’ uh?” error message on multple theme directories

In my wp-config.php I've added another theme directory; register_theme_directory( dirname( __FILE__ ) . '\..\themes' );. I'm not sure if this is the correct place to add it. When I then try to ...
0
votes
1answer
357 views

How to make Isotope and Wordpress work together?

I am trying to make my Wordpress theme using Isotope plugin. http://isotope.metafizzy.co/ So far, I have such a result after doing that was suggested: I believe that Isotope Masonry should not ...
0
votes
0answers
17 views

Safe way to echo wp_trim_words

Is this unsafe to echo as following in the theme? $excerpt = get_the_excerpt(); $trimmed_excerpt = wp_trim_words( $excerpt, 30); echo $trimmed_excerpt; If yes, please let me know what is the safe ...
5
votes
2answers
272 views

Should I create a theme or a plugin?

I'm working on a pro bono project to try to learn WordPress. I've been provided with a rough design (see screenshot below) and I'm struggling trying to think of how to approach the issue. My main ...
0
votes
0answers
91 views

how to pass variable of shortcode of wp to javascript

I have create a shortcode of google map in my theme. whole code is below. function google_map_view_scripts() { wp_enqueue_script( 'googlemap', get_template_directory_uri() . ...
0
votes
0answers
78 views

The 'default' attribute from $wp_customize->add_setting() method not in db?

At theme customization, the values from the 'default' attributes, which I added when calling the add_seting() method within the functions.php, are properly filled in. They are not filled into the db ...
0
votes
2answers
56 views

How to Display CPT Posts on index Page

I have created Custom Post type called "Natural Food" and displays the Post of this CPT Under Natural Food Menu, my index page also contains some post, as well as i want to display "Natural ...
0
votes
0answers
30 views

Add button in “Manage Themes Page” or change default link “customize”

I'd like to redirect to another URL the "Customize" button of current theme, or hide that one (I could do it with display:none) and add a custom button. (the blue button in the image). I googled it ...
1
vote
0answers
46 views

Override a theme function in a child theme?

Most if not all of the answers to this question are pretty old, or are for edge cases. I have a child theme for a commercial theme ("Total"). The parent theme's functions.php loads functions from ...
0
votes
1answer
139 views

Displaying Page Title on index.php

I have my posts page set as index.php, and on there I have my main heading (as I do on all pages). I'm having trouble displaying the page's heading however. The page is called 'Blog' in WordPress, ...
0
votes
2answers
59 views

Only the latest post shows up on post page?

disclaimer: this is my first foray into wordpress I'm creating a custom theme and in the single.php file, i have the main loop, however if i navigate to different posts, all that shows up is the ...
0
votes
2answers
134 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
1answer
400 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; ...
1
vote
1answer
350 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 ...
0
votes
0answers
65 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
138 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( ...
0
votes
1answer
41 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
2answers
96 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
0answers
117 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
107 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 ...
0
votes
1answer
20 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 ...
0
votes
1answer
52 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
31 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
89 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
64 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
45 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
0answers
33 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 ...
0
votes
1answer
49 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
0answers
29 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
53 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
33 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
1answer
37 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
184 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 ...
0
votes
0answers
74 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
24 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 ...
1
vote
1answer
36 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
34 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 ...
0
votes
1answer
48 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 ...
1
vote
1answer
48 views

Display a list of certain categories by ID

I have a list of custom taxonomy IDs like (1, 2, 3, 10). I want to display a list of these specified categories by names and each should have its childs like: Europe France Germany Africa ...
0
votes
1answer
21 views

How to add drop symbol to parent nav items which have child

I have a navigation system like this: As you can see I have two Parent Menus as "Projects" and Plans which they have some sub menus. Now when the result rendered I am getting a navbar like this: ...
0
votes
2answers
53 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
4answers
828 views

Theming Using Bootstrap Glyphicons and WordPress Dashicons

I use a mixture of both Bootstrap Glyphicons and WordPress Dashicons in my WordPress themes. However, something which really bugs me is how the WordPress Dashicons don't seem to scale appropriately ...
-1
votes
2answers
485 views

Custom single template for a specific category

What is the best way (performance & code structure) to create a custom template for a WordPress Post, which belong to a specific category? I realized that you can’t just create single-catname.php. ...
0
votes
1answer
150 views

Postname permalink page not found error

Page not found error when using permalink ‘postname’setting.Some pages are working for example http://example.com/questions is working but pages like http://example.com/questions/something. This is ...
3
votes
1answer
848 views

Redirect Visitors to a Temporary Maintenance Page without Plugin

To prevent my visitors from seeing a broken version of my syite during a big maintenance and giving them a heads up on the updates, i will redirect them automatically to a temporary Maintenance Page ...
-2
votes
1answer
54 views

How to split the site's layout without damaging this layout? [closed]

I have a site: http://roomble.com and I need to migrate it to wordpress (to be particular, I need in the nearest perspective it's plugins and ability to login thgrough the social networks via ...
0
votes
1answer
13 views

Execute upgrade-theme with coding

I'm executing some functions remotely from xmlprc with wordpress. I would like to run upgrade-theme remotely for theme that I develop. Assume that wp knows there is new version of theme. ...
0
votes
0answers
24 views

Single page of CPT

I'm trying to create a single page of a CPT. My cpt: <?php // CONVENZIONI CPT + TAXONOMY function cpt_convenzioni() { $labels = array( 'name' => _x( 'Convenzioni', ...
0
votes
2answers
493 views

Custom Post Type Permalink Page Not Found

I've been wasting hours and hours trying to solve a permalink issue with custom post types. It keeps returning page not found (404). When I use the default permalinks, it works, but when I switch to ...
0
votes
0answers
38 views

Custom upload option get an error. (WordPress)

I have successfully created front-end upload option for the users. By following this tutorial. But, When I upload the images it's getting an error. I had enough to goggling now. Below is my codes, ...