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

learn more… | top users | synonyms

10
votes
2answers
306 views

Single functions.php or split into many small files?

I am creating a simple framework with theme options. I have divided chunks of code within functions.php and placed it within a specific folder structure. Now in my main functions.php file, I only ...
0
votes
0answers
2 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
0answers
11 views

How to create a button for importing demo content (.xml file)

I want to create a button (Import Demo Content) in my theme option panel. If user click Import Demo Content button then selected .xml file uploaded automatically and send successful message. I ...
0
votes
1answer
705 views

How to call custom category field data in theme?

I am trying to add two custom fields to my categories (which I have done thanks to this answer - Any examples of adding custom fields to the category editor?) And now I need to call them within my ...
0
votes
1answer
80 views
+100

Wordpress Multisite: Have the same header and footer of main-blog on all sub-blogs

I'm trying to do the following: I have a Main-Blog and dozens of subblogs. I want all the subblogs to use the same theme (or child-theme, not sure yet) but have the same navigationitems of the ...
6
votes
2answers
601 views

Is wp_is_mobile() effective?

I'm going to test the user agent to load a mobile template instead of the desktop theme. There are many mobile detection scripts out there. Does wp_is_mobile() function work well? What is your ...
0
votes
2answers
20 views

How to register and enqueue JavaScript files without breaking plugin dependencies?

In theme development, what is the best way to register and enqueue JavaScript files to avoid problems with plugins? I want to create a theme which uses scripts like jQuery, Masonry and so on. I ...
-1
votes
0answers
8 views

additional information and reviews tabs not working in woocommerce [on hold]

i created a wordpress theme and recently i installed woocommerce 2.1.7 . when i activated it every thing works well but additional information and reviews tabs in single product page not working well ...
0
votes
2answers
9 views

How to show part of the_content?

i wanna show 20 chars of the_content i tried this but doesn't work for me . <?php $content = ''; $content = the_content(); $count_content = strlen($content); if($count_content > 20 ) { ...
1
vote
2answers
71 views

Why won't my taxonomy query show up?

I'm attempting to display posts from a 'Uncategorized' category under a custom taxonomy called 'Reviews' but without much luck. I'm using get_template_part('loop','review') to call loop-review.php ...
0
votes
3answers
43 views

How can I conditionally show different home page templates based on whether or not the user is logged in?

How can I conditionally load HTML for the home page based on whether or not the user is logged in? Currently my theme has an index.php file. In that file I tried to create: <?php ...
-4
votes
0answers
40 views

How much salary a Wordpress developer can get? [on hold]

How much salary a Wordpress developer can get?please tell.Thanks. I just asked as i work on Wordpress ,And wordpress is not having that much glamour as iOS,JAVA,Android.
1
vote
5answers
749 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
1answer
34 views

Custom theme won't use search.php

I have a custom searchform.php and search.php in my theme. However, when searching for something all I see is the front page (with mysite.com/?s=something in the adressbar). I use a filter to make ...
0
votes
1answer
22 views

How to create Page templates for showing Blog posts in different layouts?

I'm creating a Wordpress Theme, and I want to create few Page Templates for creating Blog pages with different layouts. So for example, I want to have blog-4-column.php, blog-3column.php and ...
-2
votes
0answers
19 views

Add Scripts to Wordpress

I would like to add the script given below (which I found somewhere on a forum) to my Wordpress theme. Can someone please provide the correct code which I can simply copy to the appropriate files in ...
0
votes
1answer
26 views

How can I disable/hide certain themes in multisite?

How can I disable/hide certain themes in multisite? I only want certain themes to be used for now.
0
votes
1answer
848 views

How do I implement jPanelMenu?

I have serious problems trying to implement jPanelMenu to the theme I'm building. The theme is nearly finished, I'm just trying to figure out this menu and I can finally start using it. Anyways, if ...
1
vote
2answers
448 views

Automatically install wordpress plugin at theme activation

I'm looking into using http://tgmpluginactivation.com/ to activate required plugins for my custom theme during the theme activation step. From what I can tell, this class only Activates plugins ...
0
votes
0answers
34 views

Support Multiple featured images

I've created a WordPress theme where in one of my pages I need to use two feature images, I know already how to add support for the featured image and I'm using it. My need is how to add a second ...
-1
votes
0answers
11 views

Hide a piece of theme based on screen size [duplicate]

I need to hide certain unimportant content from my theme when a smartphone loads it. There is a way to do it on Wordpress? I've added some non-responsive components on twentythrteen and I find much ...
9
votes
4answers
1k views

after_setup_theme always runs

I am setting up a child theme for some of my faculty members, and as a part of the theme, I would like a handful of plugins to be activated at the time that the theme is activated. So, naturally, I ...
0
votes
1answer
22 views

Sample Theme Options page for Multisite - what to consider

I used Theme Options page from the Tutorial of Ian Stewart in some of my WP site, and it works just fine. What I did externally was this (closest English Tuts). All those sites were single sites. But ...
-1
votes
1answer
15 views

Best practice to create required pages

Some times, when we work on custom wordpress themes, we need required pages. For example - custom login page. Some times, when user change slug, page template or something else - it a very difficult ...
1
vote
1answer
124 views

Trigger Customizer saving process with Javascript only

I'm working on a custom theme that uses WordPress Customization API to let the user play with parts of the content of his website, basically the front-page which he can modify by adding/removing ...
0
votes
5answers
5k views

get_template_directory_uri() and other URL tags not working in theme

So, I'm trying to add get_template_directory_uri or bloginfo() to my header.php file to create relative paths for the CSS and JS files in the theme. E.g., <link rel="stylesheet" ...
1
vote
1answer
35 views

wp_get_attachment_image_src() width and height boolean

I have the following code in my theme: <?php $size = 'large'; $postimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $size ); $url = $postimage[0]; $h = $postimage[2] ...
1
vote
1answer
28 views

Injecting a custom sql query into a page/theme

I have written a custom sql query for our WordPress website (fairly elaborate and not achievable with the standard wordpress code) and I've got it to run via $pageposts = $wpdb->get_results($query, ...
0
votes
1answer
245 views

Pagination: Keep prev and next link even on the first/ last page

On my index.php I'm using 'paginate links'. I want to make a pagination where you have a button for previous, than the page numbers and then a button for next, like: < PREVIOUS 1 2 3 4 [5] 6 ...
1
vote
1answer
25 views

Migrated Wordpress site renders Chinese

So, I have no idea what happened, but I tried to migrate a WP site and for some odd reason, it just renders in all Chinese/Japanese. I've been working on this site locally, and it renders fine ...
0
votes
1answer
24 views

Image not displayed

I am using the following inside images-options which is linked to functions.php.When clicked on submit button it crashes in wordpress admin <th scope="row">Image 1:</th> <td> ...
2
votes
3answers
115 views

How to add default images for custom backgrounds?

The custom header feature allows (in some code I have found) to suggest several default images to use in the custom header. Could the same be built in the custom background? The idea is to have ...
-1
votes
0answers
26 views

Theme developer only with css

Is it possible to make new themes for wordpress only by modifying the CSS of default theme ?
0
votes
0answers
26 views

How to enqueue stylesheet after rtl.css?

When you use rtl language by default wordpress enqueue rtl.css file at the end of all stylesheets. what I need is how to enqueue a stylesheet after rtl.css stylesheet so the result should be like the ...
0
votes
1answer
315 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 ...
0
votes
0answers
23 views

What's the policy for building a theme that doesn't support widgets/menus?

I'm developing a minimalistic theme, and my plan is not to include menus or widgets in it. The Theme Review page on wordpress.org states: Whether implementing required, recommended, or optional ...
1
vote
0answers
10 views

How to make theme elements customizable in wordpress?

In Wordpress there's a menu option called 'Appeareances'. I want to add (e.g.) a submenu 'header' there and then be able to customize the header from within wordpress (administration page). From what ...
1
vote
2answers
529 views

How to access options of Redux framework in front end

I'm creating a wordpress theme in which I'm using the Redux Framework for creating the theme's options page. Now I believe everything is well set up but I'm having trouble in getting the values ...
1
vote
1answer
480 views

How can I customize wp_footer, where is the code that controls what this function does?

I am using Wordpress 2013 theme as a starting point for a new theme from scratch. Under my themes folder, my footer.php theme looks like this. (Notice the final functionwp_footer(). ...
4
votes
4answers
122 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 ...
1
vote
2answers
851 views

How to add dynamic inline style?

I want to add dynamic CSS, so currently I am adding directly to the div, ie: $color = "#000000"; echo '<div style="background:'.$color.'"> Is it bad to add code like above? I have read in ...
-1
votes
1answer
30 views

Is it possible to create more than one design in a WordPress theme? [closed]

I have a HTML website that I need to convert to WordPress. It has three layouts, and each layout has a different menu and design. How I can do this in WordPress?
1
vote
0answers
35 views

Acivate all themes multisite wide automatically

I have a multi-site running locally. And it annoys me that I have to activate themes individually until I can use them on the sites. I am super admin, what is the reason WordPress handles plugins ...
4
votes
3answers
20k views

WooCommerce shop page to use my custom template

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 ...
0
votes
1answer
218 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" ...
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', ...
1
vote
2answers
42 views

When using wp_enqueue_script(); in a theme why don't we use add_action?

When using wp_enqueue_script in a plugin, I have always been told to use an add_action : function add_my_css_and_my_js_files(){ wp_enqueue_script('jquery-validate-min', ...
1
vote
1answer
29 views

Why does my functions.php cause white-screen and media-library issues?

Overview: I was authoring a child-theme, and realized that functions.php was causing problems with the media-library and caused a "white-screen" to appear after editing a post. I fixed the issue by ...
0
votes
1answer
2k 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 ...
1
vote
2answers
94 views

Generate Shortcodes by Taxonomy

Check this code: function slide_group() { register_taxonomy('Group', 'slides', array( 'hierarchical' => true /*visualizza come le categorie*/, 'label' => ...