Scroll to top

Blog

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.

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

Read More »

How to get wordpress site title name from url ?

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 =

Read More »

How to upload file into wordpress child theme folder in wordpress ( file upload) ?

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); }

Read More »

How to pass variable id through href in php

<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>

Read More »

Check User Has Already Purchased Product in woo-commerce?

  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>”; }

Read More »