How to insert a short code into Contact Form 7 in WordPress that will call a function once the submit button is pressed

You can achieve it by changing the action of the particular form and then use the function to store the data in the database into a new file. add_filter(‘wpcf7_form_action_url’, ‘wpcf7_custom_form_action_url’); function wpcf7_custom_form_action_url($url) { global $post; $id_to_change = 1; if($post->ID === $id_to_change) return ‘wheretopost.asp’; else return $url; }

Shortcode Attribute not defined

If you look at the defaults for location and popTrigger they have single quotes around them… Assuming this is correct you need to add these around the new location value, so it does not think bottom is an (undefined) javascript variable, but rather a string value, via providing ‘bottom’… Or if you don’t want to … Read more

Logout user if click on a custom page link

yes we make custom page as logout link on this way add this in function.php add_action( ‘init’, ‘log_out_user’ );function log_out_user() { global $wp; $url=”http://”.$_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’]; //get current page url if(!empty(get_current_user_id()) && $url == ‘example.com/logout’ ) //check if user is logged in and current page url { wp_logout(); //this will logout user $siteUrl = site_url(); //get site … Read more

How to create custom variables in wordpress

Have a look at the get_user_meta function. Assuming the litecoin address in the user’s profile is stored as user meta, with the key of litecoin_address you can output the link like so:- $litecoin_address = get_user_meta( get_current_user_id(), ‘litecoin_address’, true ); if( !empty( $litecoin_address ) ){ // maybe do some additional sanitation of the litecoin address here … Read more

create shortcode that changes url endpoint

it’s hard for me to say if the remote API allows you to get stats for given player only, but… There’s another way and I would go for it just to minimize the number of requests to remote API… class Remote_Player_API { private static $instance; private $remote_data; public static function init() { if ( ! … Read more

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