0
votes
0answers
22 views

Working widget does not show up in appearance->widgets

I try to add a custom widget for use outside of a normal sidebar. For that I have created class myfirst which extends WP_Widget and with appropriate function overrides. namespace widget; class ...
0
votes
4answers
32 views

How to obtain the current website URL in my theme?

I am working on a custom theme and I have the following doubt about how to correctly insert the link to some section of my website into the theme. If you open this link you can understand what I need ...
0
votes
2answers
27 views

Differences when using the the_time and the_date functions

I have some doubts about how work the WordPress the_date() functions definied into general-template.php In a page I show the posts archive using this code snippet into a loop: <article ...
0
votes
1answer
31 views

Can I show also the post date using the wp_get_archives() function?

I am pretty new in WordPress theme development and I have some doubt about the wp_get_archives() function: http://codex.wordpress.org/Function_Reference/wp_get_archives In my website I have create ...
0
votes
0answers
15 views

Iris color picker

i try to implement Iris color picker in my wordpress theme and it works fine, but when i include the Iris color picker's files i can't call a custom function via a tag. this is the Iris color picker ...
0
votes
1answer
38 views

What exactly do this function declared into functions.php file of a WP theme?

someone can help me to understand what exactly do this function declared into the functions.php file of a theme? function exclude_featured_tag( $query ) { if ( $query->is_home() && ...
0
votes
1answer
28 views

is_dynamic_sidebar always returns true while using Jetpack visibility

If I have any widgets in the sidebar, even if the jetpack visibility is set to not show on that page, is_dynamic_sidebar return true. Here's the code in my theme functions file: add_action( 'init', ...
0
votes
1answer
93 views

Passing postid of Testimonial Custom Post in Shortcode Parameter

I am trying to create Testimonial custom post and display using shortcode function create_post_type() { register_post_type( 'testimonials',//new post type array( ...
1
vote
3answers
65 views

Show excerpt for only first post in query

I'd like to only show the excerpt for the first post in my main query. I was wondering the best way to approach this. What I have tried so far is: Making a custom homepage and using two queries, ...
0
votes
1answer
833 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 ...
1
vote
2answers
49 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
77 views

Pulling Twitter RSS feed not working as expected (fatal error)

I'm trying to get some of the latest posts from a Twitter account, without a plugin. According to Botcrawl.com's tutorial, this should be enough: <ul> <?php include_once(ABSPATH . WPINC . ...
0
votes
1answer
63 views

Allow tags and attributes in post and pages content

I am trying to allow the "onclick" attribute on links as well as some html tags such as iframe to the content displayed in posts and pages. In my theme's functions.php file, I tried removing ...
0
votes
1answer
1k views

Why a SlideShow (made using JQuery FlexSlider) can't work if I load it form functions.php but work if I load it from my footer.php file? [closed]

I have the following situation: I am carrying this pure HTML theme (that use BootStrap CSS framework) into a WordPress theme. This is the original pure HTML demo theme (I have the entire source code ...
0
votes
2answers
109 views

Why I can't load my JavaScripts using an hook inside my functions.php file?

I am pretty new in WP (I came from Joomla) and I have the following problem: I am carrying this pure HTML theme (that use BootStrap CSS framework) into a WordPress theme. This is the original pure ...
0
votes
1answer
120 views

How to use get_template_directory_uri() to load an image that is in a sub-folder of my theme?

I am pretty new in WordPress and I have the following doubt about how to insert in my homepage an immage that is in a subfolder into my theme directory. So I have the following situation: Into my ...
0
votes
2answers
60 views

Some questions about how proper add 2 CSS file in a WordPress theme?

I have the following situation loading a CSS. I have a WordPress theme that load a style.css settings file by this code into my functions.php file: /* Function automatically executed by the hook: * ...
0
votes
0answers
47 views

Wordpress javascript call functions?

wordpress runs jquery in noconflicts mode which means that you either need to write your JS code using the jQuery function call $(document).ready( function($) { $("html").niceScroll(); } ); ...
1
vote
1answer
213 views

Is it possible to get a theme customizer setting from wp.customize using jquery?

I am wondering if it is possible to directly interop with the wp.customize api to get a value of a theme customizer setting. The way I am doing it now is using ajax to get a response from a php ...
0
votes
0answers
65 views

Customized Upload File Control not saving the files URL as value

I have modified a customized version of the Upload File control so that I could upload mp4 videos and use the media library. The control seems to be saving the videos as 'Array'. After uploading a ...
0
votes
0answers
28 views

Can anyone tell me why I can't edit a plugin when it is installed without having to re-install?

I am using a shortcode plugin as a framework for the short codes I want to add that go with my theme. I decided to just include the plugin in a repo for the user to dl so I am not building theme right ...
0
votes
0answers
133 views

WordPress Bones theme, changing default Excerpt amount of words

Been back and forth with this one and cannot find anything on the Themble site about this. I am trying to shorten the length of the_Excerpt from 55 words to 20. Have checked the codex and know what I ...
0
votes
1answer
65 views

get_template_directory adding FTP root folders in urls

I am creating a theme, and now I am adding some functionality for my custom post type, such as different metaboxes in post page, extra post config page. It seems when I try to get the sites theme ...
0
votes
3answers
850 views

How can I loop into two different DIVS without repeating the DIVs

I am having a little trouble trying to figure out how I can accomplish this: I have a container with two colums in it, a right and a left column. Each column will have 3 posts with a short excerpt ...
0
votes
2answers
136 views

How can I assign separate stylesheets to different pages?

I am trying to figure out how to assign a seperate stylesheet for different pages? I wan't to use the same stylesheet for my front page, and page template and a different stylesheet for my blog and ...
0
votes
1answer
74 views

Need advice on theme customizer and child themes

I have been working on a theme, initially it only had one design and I made almost all of the front page elements customizable through the theme customizer. Now I would like to offer a few variations ...
0
votes
1answer
42 views

How to make sure relative URL works when site is not on root domain?

I just tried installing my theme on another WP install that lies in a subdirectory of the domain. I never really thought too hard about subdirectories, but it does happen so I know I need to change ...
1
vote
0answers
105 views

Need help setting default setting value for radio button in theme customizer

I need help figuring out how the radio button saves it's value in the theme settings. In my theme I added Radio buttons in the theme customizer. So far they are working great. Although I have one ...
0
votes
1answer
63 views

Is there an error in get_the_tag_list()?

I'm using the theme TwentyThriteen1.0 for my WordPress blog. I recognized that the tags in the meta-part of an article are not separated by a comma. I had a look at the function ...
1
vote
1answer
1k 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(). ...
0
votes
1answer
161 views

Add content after get_header

I'd like to add content directly after the div#main (end of header.php) and before /div#main (beginning of footer.php). I'm using an own child-template (of twentythirteen), that contains only ...
0
votes
0answers
43 views

Disabling All in One Seo Pack plugin in functions.php does not work

Here is my code: function my_title($title) { global $aiosp; if ( defined('AIOSEOP_VERSION') ) { error_log( print_r( $aiosp, true) ); remove_action('wp_head',array($aiosp,'wp_head')); ...
0
votes
1answer
105 views

Can't change theme name

I am developing a theme and it currently has no theme information. Right now it is pulling it's name from the theme folders name and the "Author"is anonymous. I tried changing it by adding code into ...
0
votes
0answers
106 views

All “Featured Images” not displaying after Wordpress update

After updating to the latest version of WordPress today, I noticed that all "Featured Images" on my website are no longer displaying. After trying to figure the problem out for hours, I added the ...
0
votes
1answer
79 views

How to set default values for edit_post_link() in my theme?

How do I set default values for the edit_post_link function in my theme? I'd like to change the 'Edit This' string to a custom value, but specify this only once, so I can use instead of everywhere. ...
1
vote
1answer
161 views

Should I use include or load_template for including shortcodes, plugins and so on?

I am wondering what is the right way to include additional php files for theme options, shortcodes, plugins and so on. Both load_template and include will work, but what has better semantic value? ...
0
votes
1answer
122 views

Warning: Invalid argument supplied for foreach() [closed]

I have this code from home.php that will going to display a content from a page which has a custom post type of "about" <?php $post_status1 = 'publish'; $post_type1 = 'page'; ...
0
votes
2answers
324 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
402 views

Change the “Default Avatar” admin option via functions.php

So I'm trying to add a new default avatar for my theme using the following code: add_filter( 'avatar_defaults', 'mytheme_default_avatar' ); function mytheme_default_avatar ( $avatar_defaults ) { ...
0
votes
1answer
174 views

enqueue script if page is not equal to

I'm registering some js scripts in my function.php, I have 2 versions of one js file, one FOR the homepage, and one for every other page. I've managed to get this to work to register the homepage ...
0
votes
3answers
699 views

JQuery undefined and Stylesheet loads in bottom along with js files

I'm developing a theme for wordpress and I'm using this function to enqueue scripts and styles function Joy_scripts() { wp_enqueue_style( 'Joy-style'); wp_enqueue_script( 'Joy-scripts', ...
2
votes
1answer
35 views

Returning Variables back into a template

If I put a function that I want to use in a template I can put it into functions.php function myfunction(){ echo 'My String'; } add_action('myfunction','myfunction'); and in a template file put: ...
0
votes
1answer
292 views

apply_filters to featured image

I have a page where I have embedded the page using these lines of codes at function.php: //------Embed Content------ //Title function CustomFunction_ShowPage_Title($id) { $post = get_page($id); ...
0
votes
1answer
186 views

One button to change all settings in theme customizer?

I have been attempting to create a theme reset button for the theme customizer that automatically removes all of the theme_mod settings. I have tried multiple ways to do this and have never been able ...
0
votes
0answers
76 views

How to get dynamic data in page hierarchy?

I'm trying to mimic the page hierarchy rules of WP. I'm checking for the existence of certain files, then requiring them if they exist -- in the same order as I understand the hierarchy rules. Here's ...
1
vote
2answers
122 views

How to remove the cufon script from Dzonia Lite theme [closed]

I am using Dzonia Lite theme in my website. When I try to remove the cufon script from my functions.php file the sliders that were present in the website are not working. Colud anyone suggest me how ...
0
votes
1answer
87 views

How to disable controls in theme customizer?

Edit: I have rewritten the question in hopes I will get a reply from someone who knows the theme customizer. I am trying to figure out how to disable setting controls in the Wordpress theme ...
0
votes
0answers
49 views

Wordpress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache

I have been working on a theme for a few days and when I realized my JS file for my theme customizer wasn't updating I decided to clear the cookies and cache, and wow that was problematic. As soon as ...
0
votes
1answer
68 views

Custom post type isn't working

I just built up a beta environment for testing my new Wordpress site. I didn't migrate the database; I did my own installation again and ported over my theme (it's a simple theme) to my new instance. ...
0
votes
0answers
109 views

How do I link a button I created in theme customizer to a function?

I created a button in the theme customizer and I want to use it to execute a function? All I can find is using controls to add theme settings such as CSS and text. Although this button is to clear out ...