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 table_name set col_name = replace(col_name,'target_string','expected_string'); |
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
CREATE TABLE table_name ( | |
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT "Primary Key", | |
session_id VARCHAR(255) NOT NULL COMMENT "php session id", | |
ip_address VARCHAR(100) NOT NULL COMMENT "IP Address of user", | |
uid INT(10) UNSIGNED DEFAULT 0 NOT NULL COMMENT "User ID where id=0 is anonymous", | |
nid INT(10) UNSIGNED NOT NULL COMMENT "Articl/node ID", | |
emo ENUM('a','b','c','d','e') NOT NULL COMMENT "emotions: a=grin, b=smile, c=sad, d=straight-face, e=love", | |
created DATETIME DEFAULT CURRENT_TIMESTAMP, | |
updated DATETIME, | |
PRIMARY KEY (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
<div class="row next-pre"> | |
<div class="col-md-6 col-sm-6 col-xs-6"> | |
<div class="previous-post"> | |
<?php $prev_post = get_adjacent_post( false, '', true); ?> | |
<?php if ( is_a( $prev_post, 'WP_Post' ) ) { ?> | |
<a href="<?php echo get_permalink( $prev_post->ID ); ?>" class="btn btn-border"><i class="fa fa-long-arrow-left"></i> Previous</a> | |
<?php } ?> |
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 code snippets should be underneath of the loop | |
<div class="row"> | |
<div class="col-md-6"> | |
<div class="previous-post"> | |
<?php previous_post_link('%link', '<i class="fa fa-long-arrow-left"></i> Previous', TRUE); ?> | |
</div> | |
</div> | |
<div class="col-md-6"> | |
<div class="next-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
// this code should underneat of loop | |
<?php | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
$pages = paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
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
$pcount = 0; | |
$wrap_div = '<div class="tri-wrap-post">'; | |
/* Start the Loop */ | |
echo $wrap_div; | |
while ( have_posts() ) : the_post(); $pcount ++; | |
get_template_part( 'template-parts/content', get_post_format() ); | |
if ( $pcount % 3 == 0 ) { |
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
Open window for tab shift + f4 | |
Open window of structure panel ctrl + f12 | |
Import Class alt + Enter | |
Generate Docblock alt + insert | |
Open window refactor ctrl + shift + alt + T | |
File rename shift + f6 | |
File current file ctrl + f4 |