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
| $query = new WP_Query(array( | |
| 'post_type' => 'post', | |
| )); | |
| $posts_per_row = 2; | |
| $post_counter = 0; | |
| if( have_posts() ) : | |
| while( $query->have_posts() ) : | |
| $query->the_post(); | |
| if( ( ++$post_counter % $posts_per_row ) == 1 || $posts_per_row == 1 ) : | |
| if( $post_counter > 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
| <?php | |
| // Add in your functions.php file | |
| function alm_remove_image_sizes() { | |
| global $alm_layouts; | |
| remove_filter( 'after_setup_theme', array( $alm_layouts, 'alm_layouts_image_sizes' ) ); | |
| } | |
| add_action( 'after_setup_theme', 'alm_remove_image_sizes', 1 ); // Set higher priority |
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
| $get_content = get_the_content(); | |
| $get_content = strip_tags($get_content); | |
| $content_mini = substr($get_content, 0, 160); | |
| echo $content_mini; | |
| if (strlen($get_content) > 160) { | |
| echo "..."; | |
| } |
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
| <meta name="title" content="<?php echo get_the_title(); ?>"> | |
| <meta name="description" content="<?php echo get_the_excerpt(); ?>"> | |
| <meta property='og:locale' content='en_US'/> | |
| <meta property='og:type' content='article'/> | |
| <meta property="og:title" content="<?php echo get_the_title(); ?>"/> | |
| <meta property="og:url" content="<?php echo get_permalink(); ?>"/> | |
| <meta property="og:site_name" content="<?php echo get_bloginfo('name'); ?>"/> | |
| <meta property="og:image" content="<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id()); echo $image[0]; ?>"/> | |
| <meta property="og:description" content="<?php if(is_single()){echo get_the_excerpt();} else{echo get_bloginfo ( 'description' );} ?>"/> | |
| <meta name="twitter:card" content="summary"> |
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
| # This configuration file is provided on an "as is" basis, | |
| # with no warranties or representations, and any use of it | |
| # is at the user's own risk. | |
| # | |
| # You will need to edit domain name information, IP addresses for | |
| # redirection (at the bottom), SSL certificate and key paths, and | |
| # the "Public-Key-Pins" header. Search for any instance of "TODO". | |
| user www-data; | |
| worker_processes 4; |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
| #!/bin/bash | |
| # from | |
| # http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html | |
| convert source-WxW.png -resize 256x256 -transparent white favicon-256.png | |
| convert favicon-256.png -resize 16x16 favicon-16.png | |
| convert favicon-256.png -resize 32x32 favicon-32.png | |
| convert favicon-256.png -resize 64x64 favicon-64.png | |
| convert favicon-256.png -resize 128x128 favicon-128.png |
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 add_post_format_to_title_rss( $title ) | |
| { | |
| $post_format = get_post_format(); | |
| if( false === $post_format ) | |
| return $title; | |
| else { | |
| $format_name = get_post_format_string($post_format); | |
| return "{$format_name}: {$title}"; | |
| } | |
| } |