- Instale o Ruby >
$ sudo apt-get install ruby-full - Instale o SASS >
$ sudo su -c "gem install sass" - Instale o Compass ->
$ sudo gem install compass
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
| <div class="cycle-slideshow" data-cycle-fx="scrollVert" data-cycle-slides=".slides" data-cycle-swipe="true" data-cycle-timeout="8000" data-cycle-pager=".navSlides"> | |
| <div class="slides"> | |
| <!-- Adicione div. images, textos e etc. --> | |
| </div> | |
| <!-- Navegação --> | |
| <div class="navSlides"></div> | |
| </div> | |
| <a href="http://jquery.malsup.com/cycle2/" target="_blank">Cycle2</a> |
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
| # Require any additional compass plugins here. | |
| # Set this to the root of your project when deployed: | |
| http_path = "/" | |
| css_dir = "css" | |
| sass_dir = "sass" | |
| images_dir = "images" | |
| javascripts_dir = "javascripts" | |
| # You can select your preferred output style here (can be overridden via the command line): |
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 | |
| // Habilita todas mensagens de erros que possa acontecer | |
| ini_set('display_errors', 1); | |
| error_reporting(E_ALL); | |
| // Declaração de variáveis | |
| $encontrouDiv = false; | |
| // Pega o conteúdo do site (retornado como string) e coloca dentro de uma variável | |
| $urlContent = file_get_contents('http://www.url.com.br/'); |
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 | |
| // Edit in "wp-admin\includes\file.php" | |
| // of: if | |
| if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file) ) { | |
| // for: |
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 if( have_posts() ) : while( have_posts() ) : the_post(); | |
| $posts = get_posts(array( | |
| "showposts" => -1, | |
| "what_to_show" => "posts", | |
| "post_status" => "inherit", | |
| "post_type" => "attachment", | |
| "orderby" => "menu_order", | |
| "order" => "ASC", | |
| "posts_per_page" => 1, | |
| "post_mime_type" => "image/jpeg,image/gif,image/jpg,image/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
| UPDATE wp_options SET option_value = replace(option_value, 'http://url-antiga.com.br', 'http://url-nova.com.br') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://url-antiga.com.br','http://url-nova.com.br'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://url-antiga.com.br', 'http://url-nova.com.br'); |
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 global $current_user; if ( isset($current_user) ) { echo "Seja bem-vindo, "; echo $current_user->user_login; } ?> | |
| <?php global $user_ID; | |
| if($user_ID) { | |
| echo '<class="login"><a href="' . site_url('minha-conta/logout/', 'login') . '">' . __('(Sair)', 'atahualpa') . '</a>'; | |
| } else { | |
| echo '<class="login"><a href="' . site_url('minha-conta/', 'login') . '">' . __('Faça seu Login', 'atahualpa') . '</a>'; } ?> | |
| <?php global $current_user; if ( isset($current_user) ) { echo "ou "; } ?> | |
| <?php global $user_ID; | |
| if($user_ID) { |
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
| <ul class="products"> | |
| <?php | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'posts_per_page' => 12 | |
| ); | |
| $loop = new WP_Query( $args ); | |
| if ( $loop->have_posts() ) { | |
| while ( $loop->have_posts() ) : $loop->the_post(); | |
| woocommerce_get_template_part( 'content', 'product' ); |
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 | |
| // Display 12 products per page. | |
| add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 12;' ), 20 ); |