Please enable JavaScript.
Coggle requires JavaScript to display documents.
WORDPRESS WF (theme folder (functions.php (setup (register nav menu…
WORDPRESS WF
theme folder
index.php
get_header()
index content
get_footer()
php the_post_thumbnail('thumbnail' || "large" | "small") (Img di anteprima dell'articolo)
get_template_part()
content,
get_post_format
get_sidebar()
footer.php
wp_footer()
wp_nav_menu(array(theme_location == > secondary))
header.php
wp_head()
wp_nav_menu()
array(theme_location => primary)
add to body tag body_class()
if is_front_page
$awesome_class = "classe1, classe2, etc"
else "classe3"
body_class($awesome_class)
functions.php
enqueue style
custom, bootstrap, etc
enqueue script
jquery, bootstrap, custom
setup
add theme support (menu)
register nav menu
create menu from admin
select primary navigation and save
can register multiple menu
add action enqueue scripts
add action init setup
sidebar
register_sidebar(array('name' => 'Sidebar, 'id' => 'sidebar-1', 'class' => 'custom', 'decsription' => 'primary sidebar')) (la classe si chiamerà sidebar-custom)
can register as many sidebars as you want
before and after widgets, before and after title (copiare da docs)
add action widget setup
css
theme.css
js
theme.js
create page as page-nomepagine.php
add theme support custom-background
custom-header
img src=php header_image(), get echo header_height
custom-background
post-thumbnails (immagine in evidenza)
post-formats > array()
aside, gallery, link, image, quote, status, video, audio, chat
content.php "standard post format"
#
content-aside.php, content-image.php, content-audio.php etc
sidebar.php
dynamic_sidebar('id') (es: sidebar-1)
#
admin
create post
edit index.php
if have_posts
while( have_posts() ): the_post(); )
the_title()
the_content()
the_category()
the_time()
endwhile
create pages
set home page as homepage