-
Notifications
You must be signed in to change notification settings - Fork 31
/
Add_PHP_Snippets.php
48 lines (34 loc) · 1.11 KB
/
Add_PHP_Snippets.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!--
Go through the index file you copied into your theme.
Find the static content that matches each item listed below, then replace it with the provided snippet.
For example, find where it says "Blog Title" then replace it with <?php wp_title(''); ?>
Or, if it says "Instruction", follow the instruction provided instead
-->
Blog Title
<?php wp_title(''); ?>
HOME_URL
<?php echo home_url(); ?>
Site Title
<?php bloginfo('name'); ?>
Tagline
<?php bloginfo('description'); ?>
<!-- Start post loop -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
POST_PERMALINK
<?php the_permalink() ?>
Post Title
<?php the_title(); ?>
DATETIME
<?php the_time('Y-m-d'); ?>
June 25, 2015
<?php the_time(__('F j, Y')); ?>
Instruction: Replace all post content - 3 paragraphs
<?php the_content('Read More »'); ?>
<!-- End post loop -->
<?php endwhile; endif; ?>
Instruction: Replace all content inside "nav_links" class div
<?php posts_nav_link(); ?>
Instruction: Replace the two link elements that load stylesheets in the head section
<?php wp_head(); ?>
Instruction: Place before closing body tag
<?php wp_footer(); ?>