Load plugin on specific page only

I have figured it out. There is a good explanation here You edit the wp.config file with the scripts you wish to not load… define(‘WPCF7_LOAD_JS’, false); …and then manually enqueue them on the pages you wish to load the script.

Ways to have multiple front-page.php templates that can be swapped out?

One way is to have a single front-page.php and then using get_template_part(), to show different content based on user choice. Rough code: get_header(); $layout = get_option( ‘front_page_layout’, ‘default’ ); get_template_part( ‘front-page’, $layout ); get_footer(); After that you need to create a file for every layout, they should be called, something like: front-page-one.php front-page-two.php front-page-three.php front-page-default.php … Read more

Correct way to serialize the data of options table?

The correct way to store multiple options is as a multidimensional array and save to one option field. $myopt = array( ‘variable1’ => … ‘variable2’ => … …. ); Then simply pass the array to update_option() update_option(‘my_settings_field’, $myopt); If you pass an array WP will auto serialize the data for you. Then to read back … Read more

Is there a plugin for posting inline comments, like in MS Word? [closed]

There is a plugin with that readers can post comments inline, like in Microsoft Word. The WordPress plugin bases on inlineDisqussions by Tsi and is called Inline Comments: http://wordpress.org/plugins/inline-comments/ Inline Comments adds the great Disqus Comment System to the side of paragraphs and other specific sections (like headlines and images) of your post.

Why does wp_enqueue_style() in plugin not load stylesheet?

First thing to mention is that you don’t need to use wp_register_style if enqueuing within the same function. You can replace it with wp_enqueue_style and remove the duplicate. As for why your stylesheet isn’t loading, start by checking the file path. Try this instead: wp_enqueue_style(‘cl-chanimal-styles’, plugin_dir_url( __FILE__ ) . ‘css/cl-chanimal-styles.css’ ); https://codex.wordpress.org/Function_Reference/plugin_dir_url

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