Title: List of WordPress PHP code
Last modified: August 19, 2016

---

# List of WordPress PHP code

 *  Resolved [ambitdesigns](https://wordpress.org/support/users/ambitdesigns/)
 * (@ambitdesigns)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/list-of-wordpress-php-code/)
 * Hello, I am relatively new to WordPress and want to design my own themes. I know
   HTML and CSS but I am quit “nooby” when it comes to PHP. I noticed while designing
   a theme for WordPress that it is as simple as creating a static page (using HTML
   and CSS) then using lines of PHP to replace the content of your page.
 * For example if I created a website in static HTML and CSS and replaced the text
   of the body of the page with the line:
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
       	<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
       	<div class="storycontent">
       		<?php the_content(__('(more...)')); ?>
       	</div>
       	<div class="feedback">
       		<?php wp_link_pages(); ?>
       		<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
       	</div>
       </div>
       <?php comments_template(); // Get wp-comments.php template ?>
       <?php endwhile; else: ?>
       <?php _e('Sorry, no posts matched your criteria.'); ?>
   
       <?php endif; ?>
       ```
   
 * Then the content of my static web page would be filled with the blog posts that
   I created within the WordPress Administration panel.
 * My question is:
 * > What other lines of PHP can I use, can some one give me a complete list of 
   > PHP code that is avaliable? Does WordPress have a document that contains all
   > of these PHP lines and their use?
 * Here are some more examples of what I am talking about and what I THINK they 
   are their use:
 * `<?php wp_register(); ?>`
 * > -> Shows link to register page
 * `<?php wp_loginout(); ?>`
 * > -> Shows link to Log In and Log Out
 * `<?php wp_list_pages('title_li=' . __('')); ?>`
 * > -> Lists all pages (I don’t know what `'title_li=' . __('')` does)
 * `<?php get_footer(); ?>`
 * > -> Gets code from footer.php
 * `<?php get_header(); ?>`
 * > -> Gets code from header
 * `<?php bloginfo('html_type'); ?>`
 * > -> Gets the type of HTML file (I don’t know what types there are)
 * `<?php bloginfo('charset'); ?>`
 * > -> Gets the character set (I don’t think this is necessary but just extra info,
   > am I right?)
 * `<?php wp_title('-', true, 'right'); ?> <?php bloginfo('name'); ?>`
 * > -> Gets the title of your blog (I don’t know what `'-', true, 'right'` means
   > or what `'name'` does)
 * `<?php bloginfo('stylesheet_url'); ?>`
 * > -> Gets the path to your stylesheet and inserts it into the head

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/list-of-wordpress-php-code/#post-1055160)
 * [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
   
   [http://codex.wordpress.org/Tag_Templates](http://codex.wordpress.org/Tag_Templates)
   [http://codex.wordpress.org/Include_Tags](http://codex.wordpress.org/Include_Tags)
 *  Thread Starter [ambitdesigns](https://wordpress.org/support/users/ambitdesigns/)
 * (@ambitdesigns)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/list-of-wordpress-php-code/#post-1055163)
 * >  [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
   > 
   > [http://codex.wordpress.org/Tag_Templates](http://codex.wordpress.org/Tag_Templates)
   > [http://codex.wordpress.org/Include_Tags](http://codex.wordpress.org/Include_Tags)
 * THANKS I think this is exactly what I was looking for.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘List of WordPress PHP code’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [list](https://wordpress.org/support/topic-tag/list/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php code](https://wordpress.org/support/topic-tag/php-code/)

 * 2 replies
 * 2 participants
 * Last reply from: [ambitdesigns](https://wordpress.org/support/users/ambitdesigns/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/list-of-wordpress-php-code/#post-1055163)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
