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

learn more… | top users | synonyms

1
vote
1answer
43 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
0answers
8 views

How to add a custom HTML attribute to a parent element of wp_nav_menu?

I am using wp_nav_menu and I want to add a custom attribute that I need for uikit drop down component (data-uk-dropdown attribute) This is how the HTML should look like: <ul class="uk-navbar-nav ...
0
votes
2answers
24 views

What is the best way mark entries as featured?

In quite a few wordpress projects I have a request in which Projects (or other post type) have to be featured in the Portfolio page (or other listing page) instead of the default date sorting lists. ...
0
votes
0answers
8 views

how can I remove author box, category and tags section in TopNews theme? [on hold]

I bought a theme TopNews on themeforest (Demo: http://www.mvpthemes.com/topnews/) in the single post, I want to remove Author box, Category, and tags section (Image in bellow) dear everyone, how ...
0
votes
0answers
8 views

Widget code for showing Opening hours without using plug-in [on hold]

I'm learning develope wordpress theme and I want to create my own widget to show opening hours for my template as image below. Can you advice for my issue? Thank everyone.
0
votes
0answers
14 views

Wordpress login error [closed]

Working on a web when all of a sudden the error message appeared. Parse error: syntax error, unexpected end of file in ...
4
votes
4answers
704 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
0answers
7 views

How to enable certain screen options on particular page page

In my screen options i have 5 different options, they are 1) Camp schedule 2) Services 3) Map 4) Address 5) Opinion form I want to enable/check these options on certain particular page not ...
0
votes
0answers
9 views

Avoid wp-load.php within a PHP/CSS file? [duplicate]

There was a similar question already but it uses ajax, and I am not. I want to have dynamic css in my theme, but I can't get the WP functions to work in my php/css file. In my functions.php file, I ...
1
vote
0answers
25 views

How Can I setup WP CLI on Windows development machine running AMPPS?

I want to setup WP CLI. On the home page it says that it needs a UNIX like operating system. I am running windows 7 for development but I could probably setup a virtual Ubuntu box or something. Would ...
0
votes
1answer
22 views

variable created in page.php is null inside of header.php

Ok, so i'm instantiating a class in page.php. Then i'm calling get_header() to include header.php now in header.php i need to access this class object and execute one of its methods but i get this ...
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
2answers
41 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 ...
1
vote
1answer
36 views

Having Problem On Getting WP Post Gallery Images URL

I need to get the URL (actual Size) of all images of gallery associated with a post in single.php. The following code from Codex returns all images in very small size 150x150 which is not suitable for ...
0
votes
0answers
10 views

Issue on Getting WP Gallery Items In cpt-single.php As Attachments

Having a "Custom Post Type" called Projects I am trying to get actual URL of images added into Post Gallery and list them in class other than WordPress built in .gallery. This is the code which I ...
0
votes
2answers
414 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
2answers
433 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" ...
5
votes
2answers
254 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
1answer
550 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
1answer
30 views

Searching post types

Is it possible to take a user input from a search form, use that to search a custom post type via the WP_Query class and then redirect the user to a page template to display the results? For example, ...
0
votes
0answers
188 views

FitVid not working for iframes on particular theme install

I am using FitVid in my theme and all is well except for a specific site that was migrated from Drupal. FitVid works fine with objects and embeds but not iframes, and only on this particular site. The ...
0
votes
1answer
40 views

Remove h1 from 2015 theme

I'm a Wordpress newbie! I have two h1 when I list my site categories using a URL of the following format: http://www.example.com/category/YYY I get a HTML page with a header of Category: ...
0
votes
1answer
18 views

How would I get this to work - send to post from thick box

I have the following javascript which talks to about 6 elements. The first three open a thickbox for media upload and what not upon clicking on a specified button, the last three target the input ...
1
vote
2answers
72 views

Converting HTML Template to Wordpress Theme

While I was trying to convert a Static HTML page to Wordpress Theme , I had an issue . the page Doesn't run properly After Checking Google Chrome Console it turns that it loads the CSS file with the ...
28
votes
2answers
7k views

Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?

Has anyone used autoloading and/or PHP namespaces within a plugin or theme? Thoughts on using them? Any harm? Pitfalls? Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know ...
0
votes
1answer
32 views

Subdirectory install error

I'm seeing the error the theme directory "twentyfifteen" does not exist for the twentyfifteen theme after trying a WordPress subdirectory install for the first time. I can access the admin ...
0
votes
0answers
16 views

Data not saved Wordpress Custom Admin Page

I try to create an option page for a Wordpress theme. I manage to create the page, the Metaboxes , but when I send the form, the data are not saved. Before I show you my code , I specify that I use a ...
-1
votes
2answers
1k views

Integrating WordPress Content into a jQuery Slider

I have a pretty basic 'featured-list - image slider' implemented above my content in my custom WordPress theme. How do I integrate WordPress content into the slider so that the slide content is pulled ...
0
votes
1answer
23 views

add_editor_style not working

I created a style sheet editor-style.css I want to load this css file using add_editor_style() function, In my functions.php function my_theme_add_editor_styles() { add_editor_style( ...
0
votes
1answer
28 views

Displaying a custom post types custom taxonomy value?

I've got a custom post type with multiple custom taxonomies + metaboxes. I've used multiple approaches from the codex and other on line resources but none seem to work. I basically want to display the ...
0
votes
1answer
18 views

How can I detect a chosen Isotope layout option from within Javascript to generate appropriate layout?

I am trying to make a custom gallery post where a user may select Isotope layout modes (masonry, packery etc.). I don't want to create a custom template for each layout mode and then get it depending ...
2
votes
2answers
1k views

Get category slug and display it on a query_post

I just read "How to create option page for wordpress theme" in wp.tutsplus.com - I have a problem with getting categories . there is two parts to my question - Part A - Get category slug and ...
0
votes
0answers
32 views

Add “post option” support parameter in custom post type using Hueman Theme?

I created a custom post type and I want to add "post option" in my custom post type where in I would be able to select if I would include a sidebar or not, a layout option. I would like to ask if what ...
0
votes
2answers
1k views

contact form in template with jquery,validate and ajax

I have a page-contact.php for my contact form in my template. I wanted to add jquery validation and some fancy ajax action to my form. This is already a working code in a simple PHP page, but getting ...
0
votes
1answer
12 views

Never actually adding the action? Or do I have to call the action?

I have the following class that is instantiated in the function.php file. In the constructor I am setting up a activation and a deactivation hook for the theme. How ever neither seem to be called when ...
1
vote
1answer
334 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' ...
0
votes
1answer
51 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
15 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 ...
0
votes
2answers
329 views

Passing array in add_option()

I have to create a option page in my custom theme wordpress. here is is a sample of code <?php function bguru_register_settings(){ $default_options=array( ...
0
votes
0answers
37 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() . ...
1
vote
2answers
547 views

Custom header images won't appear when set to random

I'm using a custom theme, developed from Boilerplate (some time ago). I noticed that the header images work fine when set statically, but fail to appear when set to random. I tried switching themes, ...
0
votes
0answers
26 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
1answer
463 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 ...
2
votes
2answers
496 views

Add custom field to existing meta box?

First off, I have been able to successfully implement custom fields within a custom meta box in Wordpress. I understand how this works. My question is, is there a way for me to add a custom field to ...
0
votes
2answers
2k views

Conditional tags issue for multiple is_page() conditions in sidebar.php

I've been pulling my hair out today trying to get this right. Basically I have a sidebar, which makes requests to individual files (such as sidebar-home.php, sidebar-residential.php) and different ...
9
votes
5answers
7k views

Theme Activate Hook

I would like to write a function to email me the URL of the website when my theme is activated. What is the hook initiated when the theme is activated?
0
votes
0answers
23 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 ...
0
votes
1answer
1k 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 ...
0
votes
2answers
297 views

How to make different custom post layouts?

I am new to wordpress, and have encountered some difficulty in making my own custom layouts. I'm using _S framework (underscore.me) as well as Custom Post Templates plugin. I'm using custom fields ...
0
votes
2answers
474 views

Get attachment meta (I need attachment ID, unsure how to find it)

I've got the following example code, which creates a custom field and adds to the attachment meta: function be_attachment_field_credit( $form_fields, $post ) { ...