This file contains 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
vc_hidden-lg vc_hidden-md vc_hidden-sm vc_hidden-xs |
This file contains 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
@charset "utf-8"; | |
/* CSS Document */ | |
/*----*****---- << Responsive >> ----*****----*/ | |
This file contains 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
cd / | |
for version of linux | |
lsb_release -a | |
back command | |
cd .. | |
to edit a document | |
nano test.txt |
This file contains 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
# I book marked some sites with useful Linux commands i found. | |
# then i noticed they were down, so i loaded them via google cache, and copied here. | |
# source: http://blog.urfix.com/ | |
# source: http://www.pixelbeat.org/cmdline.html | |
# Enjoy! | |
# How to run process as background and never die | |
# | |
# nohup means: Do not terminate this process even when the stty is cut off. | |
# > /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output). |
This file contains 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
wordpress ownership | |
chown -R www-data:www-data /var/www | |
sudo systemctl restart apache2 | |
In terminal type: | |
sudo gedit /etc/apache2/apache2.conf | |
Find: |
This file contains 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
https://github.com/MWDelaney/bootstrap-3-shortcodes |
This file contains 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
// recent post shortcode | |
function my_recent_posts_shortcode($atts){ | |
$q = new WP_Query( | |
array( 'orderby' => 'date', 'posts_per_page' => '-1') | |
); | |
$list = '<div class="latest-news p-t-70 p-b-50"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> |
This file contains 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 $post_counter = 0; // start a counter before the loop ?> | |
<?php if ( have_posts() ) : ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php $post_counter++; // increment the counter for each post ?> | |
<article <?php post_class(); ?> id="layout-<?php echo $post_counter; ?>"> | |
<?php if ( $post_counter <= 3 ) : ?> | |
// display something only for the third post in the loop | |
<?php endif; ?> |
This file contains 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
//Gallery shortcode | |
function gallerys_shortcode($atts, $content){ | |
extract( shortcode_atts (array( // a few default values | |
) | |
, $atts)); | |
$q = new WP_Query( | |
array('posts_per_page' => 3, 'post_type' => 'gallery-items', 'order' => 'ASC', ) | |
); |
NewerOlder