/* block / multi-line comment */
// single-line comment
# single-line comment
/*
common Wordpress theme files:
page.php a single page
single.php a single blog post
home.php
front-page.php for showing a static page or blog posts as a homepage
wphierarchy.com
Wordpress functions:
get_template_part(); include a PHP file
Template Tags:
the_title(); display the title
the_content(); display the content
the_author();
the_time(); takes PHP date formatting parameters
bloginfo('name'); the name of the website
bloginfo('description'); the tagline
bloginfo('url');
WordPress conditional statements:
( Check conditional tags page on WordPress Codex )
is_front_page()
is_page('about');
is_single(); if the content is a single blog post
is_category();
is_tag();
is_author(); if the content is by a certain author
wp_is_mobile();
is_main_query(); if it's in the main loop
run any of the above with a !
Wordpress Hooks:
look up filter and actions reference on the codex
do anything, anywhere, anytime by calling a function
2 types: "filters" modify or change "anything"
and "actions" do something "anywhere, anytime"
add_filter( 'named_function', 'named_function2' );
add_action( 'action'(trigger), 'named_function');
actions:
save_post
init
admin_menu
*/