The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| { | |
| "repositories": [ | |
| { | |
| "type": "package", | |
| "package": { | |
| "name": "advanced-custom-fields/advanced-custom-fields-pro", | |
| "version": "5.0", | |
| "type": "wordpress-plugin", | |
| "dist": { | |
| "type": "zip", |
| ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub |
| <?php | |
| function foundation_pagination($before = '', $after = '') { | |
| global $wpdb, $wp_query; | |
| $request = $wp_query->request; | |
| $posts_per_page = intval(get_query_var('posts_per_page')); | |
| $paged = intval(get_query_var('paged')); | |
| $numposts = $wp_query->found_posts; | |
| $max_page = $wp_query->max_num_pages; | |
| if ( $numposts <= $posts_per_page ) { return; } | |
| if(empty($paged) || $paged == 0) { |
| /* | |
| * Profile Builder Edit Profile Link in single-userlisting visible only for users with the edit_users permission | |
| * Usage: [pb-edit-profile-link link="http://www.example.com/edit-profile" title="User Profile"] | |
| */ | |
| add_shortcode('pb-edit-profile-link', 'func_pb_edit_profile_link'); | |
| function func_pb_edit_profile_link( $atts ){ | |
| if ( !isset( $atts['link'] ) || !isset( $atts['title'])){ | |
| return ''; | |
| } |
| <?php | |
| // This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
| // somewhere in your theme. | |
| ?> | |
| <header class="banner navbar navbar-default navbar-static-top" role="banner"> | |
| <div class="container"> | |
| <div class="navbar-header"> | |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
| <span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span> |
| <?php if ( in_category('CategoryName') ) { ?> | |
| Content goes here | |
| <?php } else { ?> | |
| Other content goes here (or nothing) | |
| <?php } ?> |
| <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<ul class="breadcrumbs">'.'<li>','</li>'.'</ul>'); } ?> |
| <?php query_posts( 'category_name=NAME&posts_per_page=-1' ); ?> | |
| <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
| <a href="<?php echo get_permalink( $id ); ?>"> | |
| <?php the_title(); ?> | |
| </a> | |
| <?php the_excerpt(); ?> | |
| <?php endwhile; else : ?> | |
| <?php esc_html_e( 'CUSTOM ERROR MESSAGE HERE.' ); ?> | |
| <?php endif; ?> |