Having problems loading Jquery in functions.php

You have multiple errors here. You’re including CSS and JS on the same and wrong hook For JS you could use wp_enqueue_scripts For CSS you could use wp_print_styles wp_register_script / wp_enqueue_script only accepts 4 parameters. You should only register your scripts and enqueue only the last one with its dependencies. Use the third parameter to … Read more

Shortcode Variations?

function btn($atts, $content = null) { extract(shortcode_atts(array(‘link’ => ‘#’, ‘color’ => ‘teal’ , ‘size’ => ‘large’), $atts)); return ‘<a class=”btn ‘.$size.'” href=”‘.$link.'” style=”background:’.$color.’;”><span>’ . do_shortcode($content) . ‘</span></a>’; } With that function you get by default color teal and size large. I suppose that for size you are using classess and for color just background. If … Read more

Adding a filter to my posts

The excerpt must be used by the Theme. I don’t think it is. Use ‘the_content’ filter to append to the post. Excerpts are usually used in feeds and only by certain themes. add_filter(‘the_content’, function($content){ if(!is_archive()) return $content; global $post; // This is the current output post ob_start(); // Echo stuff to append to post here! … Read more

WordPress Comment functions

I do hope I understand what you’re asking, as you’re not giving much information. From what I specifically to customize the output of your comments. Well, there partially is. The wp_list_comments accepts a callback argument among several others. This callback allows you to run a custom function; in your case, a custom function to manipulate … Read more

Changing functions.php and .htaccess files

functions.php file is where you can do wonders with your theme without touching the core WordPress files. Most of the time the backup functions.php trick would work for you unless you aren’t changing anything in the database with any of your action or filter hooks. You could check this link too -> http://codex.wordpress.org/Theme_Development#Functions_File Regarding the … Read more

Echo custom field value in shortcode function

Try this code, I’ve removed query_posts and used get_posts instead because I’m not sure if query_posts will work in a shortcode and using get_posts is safer. function featured() { $posts = get_posts(array(‘post_type’ => ‘property’, ‘posts_per_page’ => 2)); if(isset($posts) && !empty($posts)) { foreach($posts as $post) { echo “<div class=\”singlefeatured group\”>”; //I wasn’t sure what you wanted … Read more