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

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’ ); }

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’;?>”

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