register_activation_hook in wordpress usage

register_activation_hook -Plugin activation function in wordpress will be run plugin is activated...

how can add menu and sub menu on wordpress admin area plugin creation


function travel_admin_menu() {
 add_menu_page("Test", "Test",3,

 add_submenu_page(__FILE__,'Site list','Site list','3','list-site','pro_admin_list_site');

how can get template directory on wordpress

You can get current template diretory
<?php get_template_directory(); ?>

wordpress admin how can add javascript to header

function my_custom_js() {
    echo '<script type="text/javascript" src="myjsfile.js"></script>';
// Add hook for admin <head></head>
add_action('admin_head', 'my_custom_js');
// Add hook for front-end <head></head>
add_action('wp_head', 'my_custom_js');

how can add script function in wordpress

how can add script  function in wordpress

add_action('template_redirect', 'add_my_script');

function add_my_script() {
wp_enqueue_script('my-script', plugins_url('my-script.js', __FILE__), array('jquery'), '1.0', true);

how to create redirect page in wordpress

how to create redirect page in wordpress

wp_redirect( $location, $status );


Ex:<?php wp_redirect( home_url() ); exit; ?>

Web Design Development Company Trivandrum Kerala India

Web Design Development Company Trivandrum Kerala India

At Artemas, the company’s powerful web development techniques are the fundamental driving force to all of its well acclaimed successful websites. The company has various processes in place to create entire web products to meet various client requirements. Business analysts translate business data from the client end, which technical experts analyze to create robust websites, purely tailored for the client’s business and its web purpose.
421, Nila Technopark, Trivandrum – 695 581
Tel: +91 471 2700061

simple class example in php

simple class example in php

class Customer {
public $name;

public function setName($name) {
$this->name = $name;

public function getName() {
return $this->name;

$c = new Customer();
$c->setName("Sunil Bhatia");
echo $c->name; // this will work as it is public.
$c->name = "New Name" ; //