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

learn more… | top users | synonyms

0
votes
0answers
13 views

If it is a top level category show children otherwise show sibling categories

I found a great piece of code for my category.php file to list categories for a specific taxonomy (not tested). BUT - how can I change the code (or achieve it) to show the default Wordpress categories ...
0
votes
1answer
20 views

Issue on Getting Custom post type Thumbnail's URL

I need to get the URL for Custom post type Thumbnail and assign it to the_post_thumbnail('', array('class' => 'group1 img-responsive', 'href' ...
0
votes
1answer
29 views

Issue on Counting CPT's Under Taxonomy Term

I am using this code to count number of Custom Post Type $tax_terms = get_terms($tax, $args); foreach ($tax_terms as $tax_term) { echo '<li>' . '<a href="' . ...
0
votes
0answers
15 views

Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update

am using this code to create a Metabox for CPT. Now I am able to view the updateded / saved Text input on post but the Checkbox and selected options return null after save or update. Can you please ...
0
votes
1answer
24 views

How To Pick Custom Size Of Uploaded Image In Theme Via the_post_thumbnail();?

I am designing a magazine style theme and I want different image sizes as to show on index.php page. Now for this, I am using <?php the_post_thumbnail( array(100, 100) );?> but it is picking ...
0
votes
0answers
18 views

Editing attributes of ul and div by wp_nav_menu

According to documentation of codex site, the code $defaults = array( 'theme_location' => 'header-menu', 'container' => 'div', 'container_class' => 'navCtrl', ...
7
votes
3answers
710 views

Get 'page' number with infinite scroll

I added infinite scroll support of the Jetpack plugin to my own theme using this tutorial: add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'footer' => false, ...
52
votes
27answers
8k views

Software for WordPress Theme and Plugin Development? [closed]

What software do you use for your WordPress related needs? Please state your OS. On windows XP I use: filezilla (FTP) notepad++ (for reading of PHP / CSS files) firebug (a firefox extension to ...
1
vote
1answer
476 views

Adding WordPress colorpicker in widget settings

I want to add the WordPress default colorpicker in widget settings form. Here's what I'm trying: In my functions.php, I have this: function widgets_scripts( $hook ) { if ( 'widgets.php' != $hook ...
1
vote
1answer
24 views

Customizer: Unique identifier that distinguishes which image upload control is uploading an image

In the Theme Customizer, I've got a custom add_action('wp_handle_upload', 'upscale_responsive_bg_imgs') which upscales responsive background images when uploaded from the theme customizer. It's ...
0
votes
1answer
20 views

Output richtext metabox value

I have rich text metabox.When I echo the out put it shows html tags.If I write <h1>Hi</h1> in editor metabox it ouput the same.My works so far <?php $valueeee2= ...
0
votes
0answers
25 views

How to avoid Ajax in wordpress theme in making mulitple request?

here is my function that make request, When ever page loads this scripts makes multiple request in front end making web site load very slow. function enqueue_scripts_styles_init() { ...
1
vote
1answer
18 views

Symlink a directory to wp-content/themes

Is it possible to symlink a directory from my project folder to my wp-content/themes folder which is in a Vagrant setup called chassis: https://github.com/Chassis/Chassis ? I tried to symlink already ...
0
votes
1answer
369 views

How to use WP switchEditors.switchto(this) JS function in your own script?

I have a tab switching theme that lets the user choose 3 editing modes when adding new pages (HTML and Visual- these are WP defaults and the new Syntax mode using Code Mirror). I have issues when ...
0
votes
0answers
12 views

Adding Co-authors Plus Plugin to Oldpaper Theme [on hold]

I'm trying to add the Co-authors Plus plugin to the theme Oldpaper. However, I've followed the documentation and it simply isn't displaying multiple authors. As per the instructions here, the code ...
0
votes
0answers
16 views

Theme Url relative, like plugin_url

Relative URL in plugin is very simple and transparent: plugins_url( 'ph.js', __FILE__ ); In theme: get_template_directory_uri(). '/I DONT KNOW THIS/' . 'ph.js'; How take URl by __FILE__? ...
0
votes
0answers
9 views

Support for new language packs in WordPress 4.0

WordPress 4.0 added a new language pack system. Is there a guide or api documentation or an article about this that you are suggesting to read? I only found translations_api in codex.
0
votes
1answer
394 views

Get all first images of posts in same category

I am trying to build a list of thumbnail images linked to their associated single content pages within the same category. So, when I am in the category of 'x' the list returns all image attachments ...
0
votes
1answer
3k 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
0answers
15 views

Adding Wish-List feature to a WP [closed]

My client would like a WP site that would showcase his products. He is not planning to do actual sales online. However, he would like to have a feature where website visitors can create a login and ...
1
vote
1answer
459 views

Allow non-logged in users to see a future post after clicking on a list of future posts

I have been able to list out pages that are set for future in a custom template like this: ...
-1
votes
0answers
21 views

Cannot access to wp_query for custom query

On a custom page template, I run a custom query to get posts, here it is: $wp_query = new WP_Query( $args ); if ( $wp_query -> have_posts() ) : while ( $wp_query -> have_posts() ) : ...
1
vote
1answer
56 views

Messing up with transient API - getting flushed on refresh

Following the _s theme I wanted to make my own version of Post Categories List with Transient, and here's what I made: function my_blog_categories() { global $post; if ( ( ...
1
vote
2answers
345 views

Get url of thumbnail from the media uploader

I want to select image from the WordPress 3.5 media uploader. I can get the image URL with the following code, but it gets the full size image. I want to get the thumbnail image url,how can I get ...
0
votes
0answers
16 views

theme_mod and option type in WP_Customize_Manager's add setting API

The WP_Customize_Manager's add setting API support the type argument: type Optional. Specifies the TYPE of setting this is. Options are 'option' or 'theme_mod' (defaults to 'theme_mod') What is the ...
0
votes
3answers
857 views

Getting author URL outside the loop

I am trying to get author information in my header.php. This is what I use to display the name and it works like a charm: <?php $author_id=$post->post_author; ?><?php echo ...
0
votes
1answer
21 views

Load slideshow.css file only if Slideshow is checked / on

I use <?php if ( get_option('mytheme_slider') == 'checked') { get_template_part( 'partials/slider/slider-java-script' ); } ?> to include the slider-java-script.php template part into my site. ...
3
votes
2answers
12k 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?
1
vote
0answers
21 views

Theme Inspector “X-Ray”

I looked around and sadly didn't find anything answering this, and I'm almost 100% sure that it doesn't exist but I figured I'd ask this active community. I work in a Rails environment as a Front-End ...
0
votes
1answer
389 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
2answers
361 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
0answers
13 views

Custom wp_editor content format missing

I am using this code to render wordpress editor like page body editor. $content = ''; $editor_id = 'mymail_html_template'; wp_editor( $content, $editor_id, $settings = ...
0
votes
0answers
16 views

How to correctly add the featured immage (thumbnails) support in a WP theme? Why I can't add a featured immage?

I have developed this custom WP theme: http://www.asper-eritrea.com/ As you can see into the post excertpt (in the home page) it is showed the first immage into my posts. To do it I use this code: ...
0
votes
1answer
19 views

Custom CSS no getting applied

I have a WordPress theme that I created, but for some reason in my template header, some of the styles I have declared are being overridden somehow. When I inspect in Chrome some of those elements are ...
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 ...
0
votes
2answers
20 views

Wordpress app page not found error for posts with hyphen in permalink

I need some help related to permalinks. I have two custom post types "books" and "authors"(created using CPT UI plugin). i have created few authors where the permalink is generated as ...
0
votes
1answer
13 views

Two theme options pages for a theme

i am currently using a theme options page for a theme im building buti am looking to add another for advance settings. is there a way of doing this? Both would be using the same options would this ...
0
votes
1answer
374 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
2answers
40 views

Child theme CSS file is not loading background image

Hey guys I'm developing a child theme, I've created a style wich loads a background, I've created the images folder in my child theme as well. most of the styles are being loaded as planned, this one ...
4
votes
4answers
517 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
506 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, ...
2
votes
2answers
393 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 ...
1
vote
1answer
35 views

I think emoji are killing my WordPress site… How can I debug?

I have had a rather frustrating last couple of days… after quite a bit of trial and error, I have come to the suspicion that emoji are killing my WordPress installation. Specifically, emoji in the ...
1
vote
2answers
281 views

redirect does not work in ajax function

I'm using ajax to post the form data. In the end I want to redirect to homepage. I'm trying following code, it does not work. It returns error 302. How can I redirect in the following function? ...
0
votes
1answer
25 views

Import from HubSpot COS into Wordpress 4?

I've been having zero luck finding any information on how-to migrate an existing site (HusbSpot COS) into a WordPress site. Does anyone know of any existing documentation (or suggestions) on the ...
0
votes
1answer
43 views

Creating Page Based on Category

I'm using WordPress 4.0, and the Hemingway theme. I've created a custom page template which currently pull blog posts based on the category I give it. However I'm currently using ...
1
vote
1answer
25 views

Usage of theme name in functions

I've been studying some functions.php files to get my head around theme development, and I keep stumbling upon a reference to the theme name inside functions. Something like this: <?php ...
0
votes
2answers
111 views

wp_head() not inserting the default stylesheet style.css

I have a custom theme with just a name in its style.css. I've activated it in admin which shows it just fine. In the index.php just <?php wp_head(); ?> and it doesn't output the line that is ...
5
votes
3answers
5k views

Get first image in a post

I am using this code directly from the codex. function echo_first_image ($postID) { $args = array( 'numberposts' => 1, 'order'=> 'ASC', 'post_mime_type' ...
0
votes
2answers
312 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 ) { ...