Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "For instance, using the <p>
tags is not necessary in the text editor, as they will be stripped by default."
A block of code is set as follows:
// ** MySQL settings ** // define('DB_NAME', 'wptestblog'); define('DB_USER', 'localdbuser'); define('DB_PASSWORD', '62dcx%^_0hnm'); define('DB_HOST', 'localhost');
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<div class="post post-item"> <div class="post-title"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> </div> <?php if(has_post_thumbnail()) : ?> <div class="post-image alignleft"> <?php echo '<a href="'.esc_url(get_permalink()).'" >'.get_the_post_thumbnail($post->ID, 'thumbnail').'</a>'; ?> </div> <?php endif; ?> <div class="entry clearfix"> <p><em>by <?php echo get_post_meta($post->ID, 'book_author', true); ?></em></p> <?php the_excerpt(); ?> </div> </div><!-- /.post-item -->
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "To add a new page, go to your WP Admin and navigate to Pages | Add New".
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.