PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon May 25, 2020 12:55 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun May 29, 2016 8:40 am 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
Hey guys i was just going thorugh the syntex for php used in wordpress and it looks like below:

Syntax: [ Download ] [ Hide ]
if (have_posts()) :
        while (have_posts()) : the_post(); ?>

          <article class="post">
            <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
            <?php the_content(); ?>
          </article>

      <?php  endwhile;

        else :
           echo "<p>No content found</p>";

    endif;
 


I saw the above code when i was just going through this tutorial vedio here .

is that some custom php syntax ? or something thats only done in wordpress ?

Thank you.


Top
 Profile  
 
PostPosted: Sun May 29, 2016 9:25 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
PHP doesn't have custom syntax. Everything you see is either regular (albeit ) PHP syntax or calls to WordPress functions.


Top
 Profile  
 
PostPosted: Mon May 30, 2016 5:05 pm 
Offline
Forum Contributor
User avatar

Joined: Wed May 14, 2014 12:18 pm
Posts: 331
Thank alot requinix :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group