This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function pagination($pages = '', $range = 2) | |
| { | |
| $showitems = ($range * 2)+1; | |
| global $paged; | |
| if(empty($paged)) $paged = 1; | |
| if($pages == '') | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Numbered Pagination | |
| function wp_pagination() { | |
| global $wp_query; | |
| $big = 999999999; // need an unlikely integer | |
| echo paginate_links( array( | |
| 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
| 'format' => '?paged=%#%', | |
| 'current' => max( 1, get_query_var('paged') ), | |
| 'total' => $wp_query->max_num_pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php get_header(); ?> | |
| <main role="main" class="container"> | |
| <!-- section --> | |
| <div class="page-title-container"> | |
| <h1 class="page-title"><?php the_title(); ?></h1> | |
| </div> | |
| <div id="content-container"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' ); | |
| function keep_me_logged_in_for_1_year( $expirein ) { | |
| return 31556926; // 1 year in seconds | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Wordpress Auto-Enque Scripts</title> | |
| <link rel="stylesheet" href="_project_files_/highlight/styles/monokai.css"> | |
| <script src="_project_files_/highlight/highlight.pack.js"></script> | |
| <script>hljs.initHighlightingOnLoad();</script> | |
| <?php include('_project_files_/markdown/parsedown.php'); ?> | |
| <style> | |
| body{font-size: 1.3em; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This is necessary for STATIC homepage. | |
| if (get_query_var('paged')) { | |
| $paged = get_query_var('paged'); | |
| } elseif (get_query_var('page')) { | |
| $paged = get_query_var('page'); | |
| } else { | |
| $paged = 1; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .masthead { | |
| background: none; | |
| background: #FFF; | |
| border-bottom: 3px solid #EEE; | |
| -webkit-transition: all 0.3s ease; | |
| -moz-transition: all 0.3s ease; | |
| -ms-transition: all 0.3s ease; | |
| -o-transition: all 0.3s ease; | |
| transition: all 0.3s ease; | |
| overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('wpseo_pre_analysis_post_content', 'add_custom_to_yoast'); | |
| function add_custom_to_yoast( $content ) { | |
| global $post; | |
| $pid = $post->ID; | |
| $custom = get_post_custom($pid); //gets all custom fields in an arry of the current post/page | |
| unset($custom['_yoast_wpseo_focuskw']); // Don't count the keyword in the Yoast field! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export PS1='\e[1;32m\w\e[1;32m >' | |
| export PS1="[\[\033[32m\]\w]\[\033[0m\]\$(__git_ps1)\n\[\033[1;36m\]\u\[\033[32m\]$ \[\033[0m\]" | |
| ========================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| *------------------------------ | |
| * CREATING A CUSTOM ACTION HOOK | |
| *------------------------------ | |
| /* | |
| 1. Create a custom action hook to load functions into | |
| ----------------------------------------------------*/ | |
| function wp_after_html() { |