• Home
  • About me
  • Gallery
  • WordPress
  • Life
  • Contact us

Laxman Prajapati

~ WordPress Blog

Laxman Prajapati

Category Archives: WordPress

How to increase WordPress website speed without a plugin

29 Saturday May 2021

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

WP Lovers Team

WordPress websites at their core are based on a slick and fast framework, there’s a reason WordPress powers about 35-40% of the internet. With extensive design and functionality options comes the possibility of slow performance.

Studies show that you have around 7 seconds to capture a user’s attention, therefore every second there is a delay in your website loading eats into valuable time which you have to make an impression on.

It’s not only the user experience that is affected, search engines such as Google use load speed as a metric for page ranking. The slower your load speed, the lower the search results from your website will likely appear and ultimately hinder your traffic.

If you haven’t already, we recommend you check out our previous article onhow to speed up your website loading time. This previous article focuses more on plugins to aid website speed, whereas we’re now focusing…

View original post 1,115 more words

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

How to install Twnety Twenty theme on WordPress Website?

19 Tuesday Nov 2019

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

  • For safer side, take backup of your current website.
  • Go to: appearance > Themes > Search “Twenty Twenty” > try “Live Preview” > activate.
  • For theme customisation, go to: : appearance > Themes > Customise > Site Identity > Colors > Theme Options > Cover Template > Background image > Menu > Widgets > Homepage Settings > Additional CSS.
  • After successful installation, click on heart bottom (on top right corner above download button) and subscribe to the theme.
  • Kindly share your feedback by writing theme review and giving rating out of 5.
  • You can write theme review, check support forum, and submit an issue (if any).

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

How to download PDF file using WordPress codex

24 Saturday Aug 2019

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

images

<?php
/* Template Name: PDF */
?>
<?php
// place this code inside a php file and call it f.e. "download.php"
$uploads = wp_upload_dir();
$ppp = explode('/', $uploads[path]);
$path = "/".$ppp[1]."/".$ppp[2]."/".$ppp[3]."/".$ppp[4]."/".$ppp[5]."/".$ppp[6]."/09/";
//$path = $uploads['path']."/"; // change the path to fit your websites document structure
$fullPath = $path.$_GET['download_file'].".pdf";
if ($fd = fopen ($fullPath, "r")) {
    $fsize = filesize($fullPath);
    $path_parts = pathinfo($fullPath);
    $ext = strtolower($path_parts["extension"]);
    switch ($ext) {
        case "pdf":
        header("Content-type: application/pdf"); // add here more headers for diff. extensions
        header("Content-Disposition: attachment; filename=\"".$path_parts["basename"]."\""); // use 'attachment' to force a download
        break;
        default;
        header("Content-type: application/octet-stream");
        header("Content-Disposition: filename=\"".$path_parts["basename"]."\"");
    }
    header("Content-length: $fsize");
    header("Cache-control: private"); //use this to open files directly
    while(!feof($fd)) {
        $buffer = fread($fd, 2048);
        echo $buffer;
    }
}
fclose ($fd);
exit;
// example: place this kind of link into the document where the file download is offered:
// <a href="download.php?download_file=some_file.pdf">Download here</a>
?>
<a href="pdf?download_fileq=<?php echo $filed_name[0]; ?>" ><img src="<?php bloginfo('template_directory') ?>/images/pdf.jpg" /><span class="pdf">Download the <?php echo $filed_name[0]; ?></span></a>

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

New Gallery Widget in WordPress 4.9

23 Saturday Jun 2018

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

WordPress 4.8 introduced new media widgets which included rich text, audio, image, and video. WordPress 4.9 builds up on that with the introduction of the new gallery widget.

gallerywidget

This new widgets allows you to create a native WordPress gallery and add it to your WordPress sidebar or any widget ready areas.

Just like the native WordPress galleries, this widget is also limited in terms of functionality.

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Template Hierarchy

02 Thursday Nov 2017

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

Overview

WordPress uses the query string to decide which template or set of templates should be used to display the page. The query string is information that is contained in the link to each part of your website. It comes after the initial question mark and may contain a number of parameters separated by ampersands.

Put simply, WordPress searches down through the template hierarchy until it finds a matching template file. To determine which template file to use, WordPress:

  1. Matches every query string to a query type to decide which page is being requested (for example, a search page, a category page, etc);
  2. Selects the template in the order determined by the template hierarchy;
  3. Looks for template files with specific names in the current theme’s directory and uses the first matching template file as specified by the hierarchy.

With the exception of the basic index.php template file, you can choose whether you want to implement a particular template file or not.

If WordPress cannot find a template file with a matching name, it will skip to the next file in the hierarchy. If WordPress cannot find any matching template file, the theme’s index.php file will be used.

Visual Overview

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Image

WordPress Work Sheet

13 Thursday Apr 2017

wordpress-cheat-sheet.pdf.png

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Posted by Laxman Prajapati | Filed under WordPress

≈ Leave a comment

#SRK

16 Wednesday Nov 2016

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Image

WordPress Anniversary today!

15 Tuesday Nov 2016

Three years ago I found WordPress and signed up.

1280px-wordpress_10th_anniversary_8863260113

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Posted by Laxman Prajapati | Filed under WordPress

≈ 2 Comments

Image

Happy Children’s Day

14 Monday Nov 2016

childrens-day

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Posted by Laxman Prajapati | Filed under WordPress

≈ Leave a comment

Custom post list ( Member ) with pagination

13 Tuesday Sep 2016

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

<?php 
/* 
Template Name: View All Members 
*/ 
?>
<?php get_header(); ?>

<?php $big = 999999999;
$args = array(
'post_type' => 'wp_member',
'country' => $country,
'meta_query' => $meta_query,
'posts_per_page' => '8',
'paged' => $paged
);

$wp_query = new WP_Query( $args );
while ( have_posts() ) : the_post(); 
// Code
endwhile;

<?php echo paginate_links( array('base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),'format' => '?paged=%#%','current' => max( 1, get_query_var('paged') ),'total' => $wp_query->max_num_pages) ); ?>

<?php get_footer(); ?>

 

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Disable plugin update

15 Friday Jul 2016

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

disablepluginupdates

Disable plugin update Add this code in your plugin root file.

add_filter('site_transient_update_plugins', 'remove_update_notification');
function remove_update_notification($value) {
     unset($value->response[ plugin_basename(__FILE__) ]);
     return $value;
} 

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Add Post Meta Box In Admin

14 Thursday Jul 2016

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

/*-------------- Called Post Meta -----------------*/
function meta_box_part()
{
    add_meta_box("meta-box-section", "Section List", "custom_meta_box_markup_section", "your-post-type", "side", "high", null);
}
add_action("add_meta_boxes", "meta_box_part");

/*-------------- Add Post Meta -----------------*/
function custom_meta_box_markup_section($object)
{
    // code goes here...
    
}

/*-------------- Save Post Meta -----------------*/
function save_custom_meta_box($post_id, $post, $update){
     if (!isset($_POST["meta-box-nonce"]) || !wp_verify_nonce($_POST["meta-box-nonce"], basename(__FILE__)))
        return $post_id;

     if(!current_user_can("edit_post", $post_id))
        return $post_id;

     if(defined("DOING_AUTOSAVE") && DOING_AUTOSAVE)
        return $post_id;

     $meta_box_value = "";
     if(isset($_POST["custom_input"])){
	$meta_box_value = $_POST["custom_input"];
     }  else{
	$meta_box_value = '';
     } 
     update_post_meta($post_id, "custom_meta_name", $meta_box_value);
}
add_action("save_post", "save_custom_meta_box", 10, 3);

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

Create New Pluging

21 Monday Dec 2015

Posted by Laxman Prajapati in WordPress

≈ Leave a comment


/**
 * Plugin Name: Ceremony Entry
 * Plugin URI: 
 * Description: FormEntry Plugin.
 * Version: The Plugin's Version Number, e.g.: 1.0
 * Author: 
 * Author URI: 
 * License: A "Slug" license name e.g. GPL2
 */

session_start();
add_action( 'admin_menu', 'ceremony_entry' );

function ceremony_entry() {
	add_menu_page('Ceremony Entry', 'Ceremony Entry', 'manage_options', 'my-top-level-handle', 'back_entry');
	add_submenu_page('', 'Edit Entry', 'Edit Entry', 'manage_options', 'edit-entry', 'edit_entry');
	add_submenu_page('', 'View Entry', 'View Entry', 'manage_options', 'view-entry', 'view_entry');
	add_submenu_page('', 'Delete Entry', 'Delete Entry', 'manage_options', 'delete-entry', 'delete_entry');
}
require_once(ABSPATH . WPINC . '/registration.php');
global $wpdb, $user_ID;
function edit_entry() {
// Code
}

function view_entry() {
// Code
}

function delete_entry() { 
// Code
}

function back_entry() {
// Code
}

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

How to create new plugin in Wp ?

10 Saturday Oct 2015

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

Tags

Wordpress

/**
 * Plugin Name: 
 * Plugin URI: 
 * Description: 
 * Version: 
 * Author: 
 * Author URI: 
 * License: A "Slug" license name e.g. GPL2
 */

add_action( 'admin_menu', 'front_register' );

function front_register() {
	add_menu_page('FrontRegister', 'FrontRegister', 'manage_options', 'my-top-level-handle', 'back_register');
}

require_once(ABSPATH . WPINC . '/registration.php');
global $wpdb, $user_ID;

$result = mysql_query('ALTER TABLE wp_users ADD	user_lastname VARCHAR(60) AFTER user_login;');
$result = mysql_query('ALTER TABLE wp_users ADD user_address VARCHAR(250) AFTER display_name;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_city VARCHAR(60) AFTER user_address;');
$result = mysql_query('ALTER TABLE wp_users ADD user_state VARCHAR(60) AFTER user_city;');
$result = mysql_query('ALTER TABLE wp_users ADD user_zip VARCHAR(60) AFTER user_state;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_phone VARCHAR(60) AFTER user_zip;');
$result = mysql_query('ALTER TABLE wp_users ADD	user_category VARCHAR(60) AFTER user_phone;');

function back_register() {
	echo "hy";
}

function font_register() {
/*  Front Code Type Here */
}

add_shortcode( 'FrontRegister', 'font_register' );

// Shortcode [FrontRegister] 

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...

25 12 2014

25 Thursday Dec 2014

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

Piyush Pujara

http://e.3875.com/christmas/em2.html?stra=deepika

View original post

Rate this:

Share this:

  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
  • Email
  • Print

Like this:

Like Loading...
← Older posts
Follow Laxman Prajapati on WordPress.com

About Me

Laxman Prajapati

Laxman Prajapati

Have to lose something to gain something

View Full Profile →

Total Blog Hits

  • 29,251 Views

Fish

Calendar

June 2022
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« May    

Logo

wordpress-logo-stacked-rgb

Category

Animal Anniversary birthday Blog BuddyPress Family Flower Friends Goal Google Happiness Happy new year Health Independence Day Life Love Mind Fresh Natural PHP Positive Republic Day WordPress

Blogs I Follow

Success Life

“Success is not final, failure is not fatal: it is the courage to continue that counts.” ― Winston Churchill
“If at first you don't succeed, try, try again. Then quit. No use being a damn fool about it.” ― W. C. Fields
“Nearly all men can stand adversity, but if you want to test a man's character, give him power.” ― Abraham Lincoln
“Success is most often achieved by those who don't know that failure is inevitable.” ― Coco Chanel

Recent Posts

  • How to increase WordPress website speed without a plugin
  • How to install Twnety Twenty theme on WordPress Website?
  • How to download PDF file using WordPress codex
  • New Gallery Widget in WordPress 4.9
  • Template Hierarchy
  • WordPress Work Sheet
  • Merry Christmas
  • #SRK

Category

Animal Anniversary birthday Blog BuddyPress Family Flower Friends Goal Google Happiness Happy new year Health Independence Day Life Love Mind Fresh Natural PHP Positive Republic Day WordPress

Gallery

success
tree_success
succaess
success-secrets-1
15_5_orig
sucscess
success-1
success2
success

Blog at WordPress.com.

Tianu Gujarati Blog - Anurag Rathod

જેને કશું કામ કરવા ના હોય એ નવરો બેઠો બેઠો બ્લોગ લખે.

WordCamp Ahmedabad 2019 a.k.a 3.0

#WCAhmedabad

Hinal Sanghvi

Hinal Sanghvi

WordPress Educator Zac Gordon

A Blog for Tutorials, Free Videos, and Updates on Courses, Talks and Workshops

seenu625

love nature, and all things creative

Hello Beautiful Book Blog

beautiful nerdy bookish things

How Useful It Is

Trying to be Useful, one post at a time!

vlandaman.wordpress.com/

On Becoming Fearless

Dreaming, believing, learning then achieving

Dil Ki Kitaab ( दिल की किताब )

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • Laxman Prajapati
    • Join 523 other followers
    • Already have a WordPress.com account? Log in now.
    • Laxman Prajapati
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d bloggers like this: