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

Laxman Prajapati

~ WordPress Blog

Laxman Prajapati

Daily Archives: April 9, 2014

Basic WordPress Method

09 Wednesday Apr 2014

Posted by Laxman Prajapati in WordPress

≈ 4 Comments

Universal Coder

Display Post URL as  Link Text
<?php the_permalink(); ?>

For Homepage Url

<?php bloginfo('url'); ?>

For Image Source Or File Path

<?php bloginfo('template_directory'); ?>/folder-name/

For Get Header Menu

<?php wp_nav_menu('Menu=headermenu' ); ?>

For Get Footer Menu

<?php wp_nav_menu( array('menu' => 'footermenu' )); ?>

Make The “Read More” Link To The Post
Place this in a theme’s functions.php to make the “read more” link to the post

function new_excerpt_more( $more ) {
	return ' <a href="'. get_permalink( get_the_ID() ) . '">Read More</a>';
}
add_filter( 'excerpt_more', 'new_excerpt_more' );

For More Information

View original post

Rate this:

Share this:

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

Like this:

Like Loading...

Common steps to write a WordPress Plugin

09 Wednesday Apr 2014

Posted by Laxman Prajapati in WordPress

≈ Leave a comment

PHP Technology Tutorials

  1. Create a php file which name same as plugin name.
  2.  Add Standard Plugin header information in top of the file. This header information help wordpress to active ,load plugin and run its functionality. Without header information your plugin will never run and work in WordPress.
  3.  Write plugin code logic in file. Add plugin code for action and filters.
  4. Add admin panel for your plugin. this step is not neccessory but useful when you have plugin setting and want to save and retrive plugin settings from database.
  5. Plugin is ready to use in WordPress.

View original post

Rate this:

Share this:

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

Like this:

Like Loading...

Get search form WordPress

09 Wednesday Apr 2014

Posted by Laxman Prajapati in WordPress

≈ 1 Comment

Tags

Get search form WordPress, wordpress search form

Usage

Display search form using searchform.php Theme file.

 get_search_form(); 

Examples

If you don’t have searchform.php in your Theme, WordPress will render its built-in search form:

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>

The above form is used on HTML4 websites. If your theme supports HTML5, which happens if it uses add_theme_support(‘html5’, array(‘search-form’)); it will output the following HTML form. This is the case since WordPress 3.6.

<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
	<label>
		<span class="screen-reader-text">Search for:</span>
		<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:" />
	</label>
	<input type="submit" class="search-submit" value="Search" />
</form>

Rate this:

Share this:

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

Like this:

Like Loading...
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,220 Views

Fish

Calendar

April 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  
« Mar   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
success
15_5_orig
success-1
succaess
tree_success
success-secrets-1
sucscess
success2

Create a free website or 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 Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
 

Loading Comments...
 

    %d bloggers like this: