Last active
April 5, 2018 11:11
-
-
Save infn8/43f8f94437637453f6a5 to your computer and use it in GitHub Desktop.
Revisions
-
infn8 revised this gist
Mar 4, 2015 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # Instructions Add the code above to your theme's ```functions.php``` file. Alter the size of ```$containerLG``` if you have changed the BS 3 grid. you can then call the images in you themes like so: ``` <?php the_post_thumbnail( 'col-lg-3'); ?> ``` That will call an image that's maxed at a width of 1/4 of the full container width. -
infn8 created this gist
Mar 4, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ function add_theme_features() { // Add Image Sizes $containerLG = 1170; // Change this if you have updated the largest bootstrap container width. for ($i=1; $i <= 12; $i++) { add_image_size( 'col-lg-'.$i, ceil($containerLG / 12 * $i), ceil($containerLG / 12 * $i) * 10, false ); } } // Hook into the 'after_setup_theme' action add_action( 'after_setup_theme', 'add_theme_features' );