Problem with baseurl and interaction with plugin

Most of the problem was resolved by pasting the following into my functions.php function my_init() { if (!is_admin()) { wp_deregister_script(‘jquery’); // Load the copy of jQuery that comes with WordPress // The last parameter set to TRUE states that it should be loaded // in the footer. wp_register_script(‘jquery’, ‘/wp-includes/js/jquery/jquery.js’, FALSE, ‘1.11.4’, TRUE); wp_enqueue_script(‘jquery’); } } … Read more

plugin modal/popup integration best practice

You should put it inside ‘the_content’ hook. 1)Create first plugin which has the form that proccess simple form submission. 2)And then call that page in iframe window.Like this: <—YOU DIV STARTS HERE FOR POPUP WINDOW–> <div id=”iframeclasses”> <?php add_thickbox(); ?> //Your form link <a href=”https://wordpress.stackexchange.com/questions/248296/YOUR_LINK_GOES_HERE&KeepThis=true&TB_iframe=true” class=”thickbox”> </div> 3)iframe window open by following code. <input type=”submit” … Read more

How to create a simple plugin which show/hide an html code in wordpress?

There is many ways to do it, create a shortcode to place anywhere you want or filter the post content and add what you want. If you plugin is not activate, this will not display, <?php /** * Plugin Name: Europhonica Image/Vidéo switch (by Jules) */ // the_content method add_filter( ‘the_content’, ‘image_my_switch_function_content’ ); function image_my_switch_function_content($content){ … Read more

Define a url for an email confirmation from within a plugin

Insert in your functions.php file the following code function order_confirm_token() { if(isset($_GET[‘myconfirmation’])) { $confirmation_token = $_GET[‘myconfirmation’]; // Do something with token } } add_action(‘init’, ‘order_confirm_token’); Then when you send the user the email to confirm the email direct them to the home page like this: www.example.com/?myconfirmation=TOKENCODE

Ajax functionality not being called under wordpress plugin

Syntax error comes from your js file that is containing php code. You don’t need this part to be in the js file and need to be in a php file. <?php function form_ajax_process_request() { if( isset( $_POST[“post_var”] ) ) { $response = $_POST[“post_var”]; echo $response; die(); } } add_action(‘wp_ajax_form_response’,’form_ajax_process_request’); add_action(‘wp_ajax_nopriv_form_response’,’form_ajax_process_request’); ?> This part need … Read more