Monday , June 27 2016

add css/js in wordpress

use below code to add js/css in your wordpress header or footer put in code in function.php function add_theme_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/slider.css', array(), '1.1', 'all'); wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true); if ( is_singular() && comments_open() && get_option( …

Read More »

Change and Update WordPress URLS in Database When Site is Moved to new Host

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Read More »

Create an admin user programmatically in WordPress

–> Create an admin user programmatically in WordPress add_action('init', 'add_user'); function add_user(){ $username = 'username123'; $password = 'pasword123'; $email = 'drew@example.com'; $user_id = wp_create_user($username, $password, $email); $user = get_user_by('id', $user_id); $user->remove_role('subscriber'); $user->add_role('administrator'); }

Read More »

Online Pdf Viewer

http://pdfviewer.softgateon.net/ http://www.pdfonlinereader.com/WebPdf2/editor.html http://www.docspal.com/viewer http://www.viewdocsonline.com/  

Read More »