JavaScript and images files are not recognized

You need to give the full path to your theme files. To get the URL of your theme, use the WordPress function bloginfo( ‘template_directory’ ); so at a minimum you would need: <script src=”https://wordpress.stackexchange.com/questions/18828/<?php bloginfo(“template_directory’ ) ?>/jquery.js” type=”text/javascript”></script> However, scripts / styles should really be “enqueued” using wp_enqueue_script(); (see http://codex.wordpress.org/Function_Reference/wp_enqueue_script) I would recommend taking a … Read more

How can I receive the image id using the media box?

You can also add in a filter that can add the ID as a html5 data attribute to the returned HTML fragment from send_to_editor. public function image_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt){ $dom = new DOMDocument(); @$dom->loadHTML($html); $x = new DOMXPath($dom); foreach($x->query(“//img”) as $node){ $node->setAttribute(“data-id”, $id); } if($dom->getElementsByTagName(“a”)->length == 0){ $newHtml = $dom->saveXML($dom->getElementsByTagName(‘img’)->item(0)); … Read more

Theme currently showing thumbnails, how to show full size?

Here is the relevant code from home.php (the Blog Posts Index): <?php if($grisaillePostCount == 1) { the_post_thumbnail(); } else { the_post_thumbnail(‘following-post-thumbnails’); } ?> Here is the relevant code from index.php: <?php the_post_thumbnail(‘following-post-thumbnails’); ?> So, the difference is the default thumbnail size, and the custom ‘following-post-thumbnails’ image size. In functions.php, the Theme defines the defualt ‘thumbnail’ … Read more

Images not working using Featured post

I believe there are some root-links that you haven’t changed. Please follow these steps Login to admin section www.xyz.com/wp-admin Navigate to settings->general-> and change the ‘Site Address (URL)’ and ‘WordPress Address (URL)’. Also please check the permalinks and settings->media there is an upload directory and the default wordpress location is wp-content/uploads, check if it is … Read more

Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?

Basically the img_caption_shortcode filter allows you to completely replace the default image caption. If you want to do that, you’ll need to ask WP to pass all the argument of the filter to your callback function. <?php add_filter(‘img_caption_shortcode’, ‘wpse81532_caption’, 10, 3 /* three args */); Then your callback will need to take care of all … Read more