Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2016 WordCamp Ann Arbor - More Core Functions Y...
Search
Nicole
October 20, 2016
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2016 WordCamp Ann Arbor - More Core Functions You (Maybe) Don't Know Exist
WordCamp Ann Arbor 2016
Nicole
October 20, 2016
More Decks by Nicole
See All by Nicole
2014 WordCamp Ann Arbor - Core Functions You (Maybe) Don't Know Exist
nicolea
0
190
2014 WordCamp Grand Rapids - Core Functions You (Maybe) Don't Know Exist
nicolea
0
1.9k
2014 WordCamp Phoenix - 30 Days in the WordPress Codex
nicolea
1
110
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
0
290
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1k
Webフレームワークの ベンチマークについて
yusukebe
0
140
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
230
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.1k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
Lessons from Spec-Driven Development
simas
PRO
0
140
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
210
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Cost Of JavaScript in 2023
addyosmani
55
10k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Accessibility Awareness
sabderemane
1
130
BBQ
matthewcrist
89
10k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Bash Introduction
62gerente
615
210k
How to Talk to Developers About Accessibility
jct
2
220
The Mindset for Success: Future Career Progression
greggifford
PRO
0
350
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Claude Code のすすめ
schroneko
67
230k
Transcript
Core Functions You (Maybe) Don’t Know Exist @nlarnold1 #WPCoreFunctions www.alleyinteractive.com
@alleydev Presented by Nicole Arnold
the_posts_pagination $args (array) Default pagination arguments. Parameters (string) Displays a
paginated navigation to next/previous set of posts, when applicable. Returns
the_posts_pagination // Previous/next page navigation. twentyfourteen_paging_nav(); Twentyfourteen
the_posts_pagination function twentyfourteen_paging_nav() { global $wp_query, $wp_rewrite; // Don't print
empty markup if there's only one page. if ( $wp_query->max_num_pages < 2 ) { return; } $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; $pagenum_link = html_entity_decode( get_pagenum_link() ); $query_args = array(); $url_parts = explode( '?', $pagenum_link ); if ( isset( $url_parts[1] ) ) { wp_parse_str( $url_parts[1], $query_args ); } $pagenum_link = remove_query_arg( array_keys( $query_args ), $pagenum_link ); $pagenum_link = trailingslashit( $pagenum_link ) . '%_%'; $format = $wp_rewrite->using_index_permalinks() && ! strpos( $pagenum_link, 'index.php' ) ? 'index.php/' : ''; $format .= $wp_rewrite->using_permalinks() ? user_trailingslashit( $wp_rewrite->pagination_base . '/%#%', 'paged' ) : '?paged=%#%'; // Set up paginated links. $links = paginate_links( array( 'base' => $pagenum_link, 'format' => $format, 'total' => $wp_query->max_num_pages, 'current' => $paged, 'mid_size' => 1, 'add_args' => array_map( 'urlencode', $query_args ), 'prev_text' => __( '← Previous', 'twentyfourteen' ), 'next_text' => __( 'Next →', 'twentyfourteen' ), ) ); if ( $links ) : ?> <nav class="navigation paging-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentyfourteen' ); ?></h1> <div class="pagination loop-pagination"> <?php echo $links; ?> </div><!-- .pagination --> </nav><!-- .navigation --> <?php endif; } Twentyfourteen
the_posts_pagination Twentyfourteen
the_posts_pagination // Previous/next page navigation. the_posts_pagination( array( 'prev_text' => __(
'Previous page', 'twentyfifteen' ), 'next_text' => __( 'Next page', 'twentyfifteen' ), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>', ) ); Twentyfifteen
the_posts_pagination Twentyfourteen using new function
the_post_navigation $args (array) Default post navigation arguments. Parameters (string) Displays
the navigation to next/previous post, when applicable. Returns
the_post_navigation // Previous/next page navigation. twentyfourteen_post_nav(); Twentyfourteen
the_post_navigation function twentyfourteen_post_nav() { // Don't print empty markup if
there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> <nav class="navigation post-navigation" role="navigation"> <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1> <div class="nav-links"> <?php if ( is_attachment() ) : previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) ); else : previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) ); next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) ); endif; ?> </div><!-- .nav-links --> </nav><!-- .navigation --> <?php } Twentyfourteen
the_post_navigation Twentyfourteen
the_post_navigation // Previous/next page navigation. the_post_navigation( array( 'next_text' => '<span
class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' . '<span class="post-title">%title</span>', ) ); Twentyfifteen
the_post_navigation Twentyfourteen using new function
the_archive_title $before (string) (Optional) Content to prepend to the title.
$after (string) (Optional) Content to append to the title. Parameters (string) Display the archive title based on the queried object. Returns
the_archive_title <h1 class="page-title"> <?php if ( is_day() ) : printf(
__( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() ); elseif ( is_month() ) : printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) ); elseif ( is_year() ) : printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyfourteen' ) ) ); else : _e( 'Archives', 'twentyfourteen' ); endif; ?> </h1> Twentyfourteen
the_archive_title Twentyfourteen
the_archive_title the_archive_title( '<h1 class="page-title">', '</h1>' ); Twentyfifteen
the_archive_title Twentyfourteen using new function
Core Functions You (Maybe) Don’t Know Exist @nlarnold1 #WPCoreFunctions www.alleyinteractive.com
@alleydev Presented by Nicole Arnold