jquery bookmark links

You must output the propper HTML to make it working. Specifically, the href-attribute needs to contain the URL and the title separated with the | sign, like <a href=”http://example.com/post-url|post-title” rel=”shareit” …. That will enable the script you’ve posted above use a concrete URL and title. As I don’t know you PHP code from your theme … Read more

WordPress plugin isn’t loading completely

Muzzamil – I have looked at your site and it appears you running an outdated plugin which could be possibly causing you the problem. Sexy Bookmarks, Sidebar Login, WP Page Navi and Count Per Day state that they are WordPress 3.1.1 compatible (although one of them hasn’t been updated in over a year). However, Syntax … Read more

Best way to add some custom javascript using jquery to a child theme

Here you go. add_action(‘init’, ‘register_custom_jquery’); function register_custom_jquery() { wp_deregister_script(‘jquery’); wp_register_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js’, array(), ‘1.6.1’ ); wp_register_script( ‘my-custom-script’, ‘http://example.com/js/script.js’, array(), ‘1.0’ ); } add_action(‘wp_enqueue_scripts’, ‘add_js_to_page’); function add_js_to_page() { wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘my-custom-script’ ); }

How to show last comment on hover?

The comments_popup_link_attributes filter will allow you to output attributes within the link. function add_comment_hover_action() { echo ‘ onHover=”fireMyJSCode();”‘; } add_filter(‘comments_popup_link_attributes’, ‘add_comment_hover_action’); Alternately, you could hook into the comments_number filter to add a span wrapper around the comment number text with a common class name and the parent post id as an attribute. Then in JavaScript … Read more

my example with ajax doesn’t work

Your code is technically correct, though you should be doing ajax calls via the WordPress provided means. Also, your path to ajax-php.php will fail if WP isn’t installed in root. What does ajax-php.php contain and what are you expecting it to return? If you’re trying to use WordPress functions inside of that file, you need … Read more

How to add shortcode to show/hide press releases?

I coded this up quickly, based on Scribu’s writeup on script loading, might work for you or provide a starting point. The plugin file: <?php /* Plugin Name: MO_expander_shortcode */ class MO_expander_shortcode { static $add_script; function init() { add_shortcode(‘moexpander’, array(__CLASS__, ‘handle_shortcode’)); add_action(‘wp_footer’, array(__CLASS__, ‘add_script’)); } function handle_shortcode($atts, $content = null) { self::$add_script = true; // … Read more

Absolute path to stylesheet_dir/images/my_img.jpg does not work?

i always start every theme w/ some constants ` define(‘THEME’, get_bloginfo(‘stylesheet_directory’)); //or you could use this one: //define(‘THEME’, get_stylesheet_directory_uri()); define(‘IMAGES’, THEME . ‘/images’); ` and some others, but the point is that at any place in my code i can point to my theme’s image folder img src = “https://wordpress.stackexchange.com/questions/21398/<?php echo IMAGES .”/image.png’;?>”

inner anchor scrolling with wordpress

Your anchor should point to an element with an id, e.g. <a href=”#topic1″>….</a> content <h3 id=”topic1″>….</h3> Otherwise the anchor doesn’t have somewhere to point to. Hope this helps.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)