How to use div -ids in url to jump to specific post…Is trailing slash the culprit?

First, I’d recommend using “pretty permalinks” over the default query-string structure. This will eliminate most of your problems from the getgo. It will turn your http://www.example.com/?cat=15#post-170 urls into http://www.example.com/category/category-slug/#post-170 and the browser will move correctly to the post’s position in the page. That said … Yes, you can remove the trailing slash. The trick is … Read more

Hide reply button after moveForm is called

Ended up using jQuery to solve this. The form moves around using javascript anyways so it doesn’t break anything for users with js turned off. //when reply button is clicked hide it $(“.comment-reply-link”).click( function() { $(this).hide(); }); //when cancel button is clicked reshow reply button $(“#cancel-comment-reply-link”).click( function() { $(“.comment-reply-link”).show(); });

Morris.js for WordPress?

Create js folder in your theme directory then save Morris.js into it. it is not mandatory to store it in js folder you can store it anywhere else but i recommend to do it to seprate javascipt files from other files. Add follwing action into functions.php file function custom_scripts() { /* Include Scripts */ wp_enqueue_script( … Read more

How to load javascript file on homepage in WordPress in order?

In your functions.php: edit: First register the quicktags script under a different name than already registered in wp “quicktags” , see Codex function quicktags_script() { wp_register_script( ‘quicktags-min’, ‘/wp-includes/js/quicktags.min.js?ver=3.5.1’,”,”,true); wp_enqueue_script( ‘quicktags-min’ ); } add_action( ‘wp_enqueue_scripts’, ‘quicktags_script’ ); This will load the script for all the pages on your front-end. To load it only on front-page : … Read more

How to add comment on scripts using function in wordpress?

There is a generic way to use conditional comments – for styles. But unfortunately not for scripts until #16024 will be fixed. The details are described in this answer. To make your themes scripts filterable you could use a callback on wp_print_scripts and apply a custom filter in there. /** * prints a conditional comments … Read more

TypeError: window.tinyMCE.execInstanceCommand is not a function

https://stackoverflow.com/questions/22813970/typeerror-window-tinymce-execinstancecommand-is-not-a-function Thanks to Scott B In WordPress 3.9, the TinyMCE is updated to version 4, and in TinyMCE 4, the method “execInstanceCommand” has been replaced by the method “execCommand”. For compatibility issue (with old versions of WP), you must be check the TinyMCE version and used the suitable method. In below, i changed your code. … Read more