How to use PHP session in wordpress?
Use PHP session in wordpress. add_action(‘init’, ‘myStartSession’, 1); function myStartSession() { if(!session_id()) { session_start(); } } Get more information Read More Posts
I would like to discuss on whatever your requirement will be. Also I feel pleasure to be a part on that. So let’s just the conversation and finish this in efficient way.
Use PHP session in wordpress. add_action(‘init’, ‘myStartSession’, 1); function myStartSession() { if(!session_id()) { session_start(); } } Get more information Read More Posts
get wordpress site title name from url <?php // Exit if accessed directlyif ( !defined( ‘ABSPATH’ ) ) exit; function oops_script(){ wp_enqueue_style(“oops-style”, plugin_dir_url(__FILE__).”style.css”); }add_action(“wp_enqueue_scripts”,”oops_script”); /*+++++++ Declaring Global Variables +++++++++*/$domain =
upload file into wordpress child theme folder in wordpress ( file upload) if(isset($_POST[“submit_p_img”])){ $filename = $_FILES[“p_img”][“name”]; $tempname = $_FILES[“p_img”][“tmp_name”]; echo $folder = $_SERVER[“DOCUMENT_ROOT”].”/messanger/wp-content/themes/twentytwenty-child/pimg/”.$filename; move_uploaded_file($tempname,$folder); }
<table class=”table table-hover”> <thead> <tr> <th>Subject</th> <th>Add Topic</th> </tr> </thead> <tbody> <tr> <?php foreach($subjects as $sub):?> <td><?php echo $sub->subject;?></td> <td><a href=’approve.php?id=”.$sub->id.”‘ role=”button” class=”btn”>Add Topic</a></td> </tr> <?php endforeach;?> </tbody></table>
Send id to another page via href link in table list <div class=”row”> <a href=”<?php echo site_url(); ?>/pagename/?ID=<?php echo $print->ID ;?>” class=”link”> <div class=”col-2″><?php echo $print->person_name ;?></div> <div
WooCommerce: Check if User Has Already Purchased Product function start_deal_button(){ ob_start(); global $user; global $product; $current_user = wp_get_current_user(); if(!is_user_logged_in()) { echo “<a href='”.site_url().’/my-account’.”‘ class=’start-deal-button’>Start Deal <i class=’fa fa-handshake’></i></a>”; }
Redirect on any page in wordpress in php wp_redirect(site_url().’/page-name/‘); Get more information Read More Posts
wpcodekit Website Designers is one of the best website designing company in punjab 2020. We create beautiful looking, fast and secure websites.We are create professional websites in punjab since 2016.