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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
650
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
780
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
330
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
290
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
470
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
110
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.4k
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
120
Go 1.27 における memory allocation の高速化
andpad
0
170
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
400
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Claude Code のすすめ
schroneko
67
230k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
700
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
460
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
410
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
280
Raft: Consensus for Rubyists
vanstee
141
7.6k
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