35,10,0,50,1
25,600,60,0,3000,5000,25,800
90,150,1,50,12,30,50,1,70,12,1,50,1,1,1,5000
0,2,1,0,2,40,15,5,2,1,0,20,0,1
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com...
welcome to wplecturer.com...
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com
welcome to wplecturer.com

Translate

Official Documentation  Coding Standards

 

From the Official Documentation :  I choose two options :

 

Zen Developer Zone

 

Sitepoint

 

PHP for WordPress -- Variables

PHP for WordPress - Variables

<?php
$varaiable1  = "Hello world";
echo $variable1;

 

Variables always start with $

PHP for WordPress -- Conditional

PHP for WordPress  --  Conditional

 

$mynumber = 15;
if ($mymber > 10) {
        echo 'number bigger than 10'
}

else

{
        echo 'number smaller than 10';
}

PHP for WordPress -- Loops

PHP for WordPress  --  Loops

 Official documentation WP Loop (Please Read)

<?php
if ( have_posts() ) :
    while ( have_posts() ) : the_post();
        the_title( '<h2>', '</h2>' );
        the_post_thumbnail();
        the_excerpt();
   endwhile;
else:
   _e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif;

This was an example of the famous WP loop.

 

Below are noted for the PHP loops

---with the break, we go out from the loop

 

PHP for WordPress -- Functions

PHP for WordPress  --  Functions

 

 

function add($var1, $var2) {
return $var1 + $var2;
}
$result1 = add(5, 3); //= 8
echo $result1;

 

Start with the word Function

Maybe accepts input (it can have defaults)

We invoke it from our site.