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
| #!/usr/bin/env bash | |
| # ----------------------------------------------------------------------------- | |
| # Bash Strict Mode Starter Template | |
| # ----------------------------------------------------------------------------- | |
| # -e : Exit immediately if a command exits with a non-zero status | |
| # -u : Treat unset variables as an error | |
| # -o pipefail : Fail a pipeline if any command fails | |
| # -E : ERR traps are inherited by shell functions | |
| # ----------------------------------------------------------------------------- |
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
| function get_post_page_content( $atts ) { | |
| extract( shortcode_atts( array( | |
| 'id' => null, | |
| 'title' => false, | |
| ), $atts ) ); | |
| $the_query = new WP_Query( 'page_id='.$id ); | |
| while ( $the_query->have_posts() ) { | |
| $the_query->the_post(); |
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
| echo '<div class="panel panel-default"><div class="panel-heading">Last Five Posts</div><div class="panel-body"><p>Here are the latest posts:</p></div><ul class="list-group nav">'; | |
| $args = array( 'numberposts' => '5' ); | |
| $recent_posts = wp_get_recent_posts( $args ); | |
| foreach( $recent_posts as $recent ){ | |
| echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="'.esc_attr($recent["post_title"]).'" >' . $recent["post_title"].'</a> </li> '; | |
| } | |
| echo '</ul></div>'; |
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
| body.login { | |
| background: #000; | |
| } | |
| body.login div#login { | |
| color: #ae8400; | |
| } | |
| body.login div#login a { | |
| color: #fff; | |
| } | |
| body.login div#login a:hover { |
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
| body.login { | |
| background: #428bca; | |
| } | |
| body.login div#login { | |
| color: #fff; | |
| } | |
| body.login div#login a { | |
| color: #fff; | |
| } | |
| body.login div#login a:hover { |
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
| define( 'DISABLE_WP_CRON', true ); |
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
| # Rewrite example.com → www.example.com | |
| # Use with caution, as this may cause subdomains to forward as well. | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{HTTPS} !=on | |
| RewriteCond %{HTTP_HOST} !^www\..+$ [NC] | |
| RewriteCond %{HTTP_HOST} !=localhost [NC] | |
| RewriteCond %{HTTP_HOST} !=127.0.0.1 | |
| RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
| </IfModule> |
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
| # Rewrite www.example.com → example.com | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{HTTPS} !=on | |
| RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
| RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] | |
| </IfModule> |
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
| define( 'AUTOSAVE_INTERVAL', 300 ); |
NewerOlder