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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} !.*NEWDOMAIN\.COM$ [NC] | |
RewriteRule ^(.*)$ http://NEWDOMAIN.COM/$1 [R=301,L] | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
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, li { margin: 0; padding: 0; } | |
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
.flexbox_wrapper_ie_10_11_fix { | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: -ms-flexbox; | |
display: flex; | |
-webkit-box-orient: vertical; | |
-webkit-box-direction: normal; | |
-webkit-flex-direction: column; |
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 | |
/* | |
1.- Create an App. | |
2.- Go to: https://developers.facebook.com/tools/explorer/ | |
+ Select your new created app on the right top. | |
+ Select "Get App Token" |
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
SET @user_login := 'admin_user'; | |
SET @user_pass := 'Q9xiHgzZ'; | |
SET @user_email := '[email protected]'; | |
INSERT INTO `wp_users` | |
(`user_login`, `user_pass`, `user_email`, `user_registered`) | |
VALUES | |
(@user_login, MD5(@user_pass), @user_email, now()); | |
SELECT @user_id := LAST_INSERT_ID(); | |
INSERT INTO `wp_usermeta` | |
(`user_id`, `meta_key`, `meta_value`) |
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_action('admin_head', 'disable_icl_metabox'); | |
function disable_icl_metabox() { | |
$screen = get_current_screen(); | |
remove_meta_box('icl_div_config',$screen->post_type,'normal'); | |
} |
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 // On this example I'm extracting all the WordPress categories from a parent category and order them by an additional custom field named "order" assigned to the category taxonomy. ?> | |
<?php | |
$siblings = get_term_children($current_cat->term_id, 'category'); | |
$siblings_list = array( array() ); | |
$i=0; | |
foreach ($siblings as $sibling) { | |
$sibling_object = get_term_by( 'id', $sibling, 'category'); | |
$siblings_list[$i]['name'] = $sibling_object->name; | |
$siblings_list[$i]['url'] = get_term_link( $sibling, 'category'); | |
$siblings_list[$i]['order'] = get_field('order', $sibling_object->taxonomy.'_'.$sibling_object->term_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 id="with_tabs_container" class="flex no-flex-xs-block"> | |
<div class="left_column"> | |
<?php if ( have_rows('tabs') ) { ?> | |
<ul class="list-unstyled green_tablist" role="tablist"> | |
<?php $i=1; while ( have_rows('tabs') ) { the_row(); ?> | |
<li role="presentation" class="<?php if(1==$i) echo 'active'; ?>"> | |
<a href="#tab_pane_<?php echo $i; ?>" role="tab" data-toggle="tab" title="<?php echo esc_attr(get_sub_field('tab_name')); ?>"><?php the_sub_field('tab_name'); ?></a> | |
</li> |
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 | |
/** | |
* Extend WordPress search to include custom fields | |
*/ | |
/** | |
* Join posts and postmeta tables | |
* | |
* http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join | |
*/ |
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_action( 'after_setup_theme', 'custom_image_sizes' ); | |
function custom_image_sizes() { | |
add_image_size( 'image-1400px-wide', 1400 ); // 1400 pixels wide (and unlimited height) | |
add_image_size( 'image-700px-wide', 700 ); // 700 pixels wide (and unlimited height) | |
add_image_size( 'image-350px-wide', 350 ); // 350 pixels wide (and unlimited height) | |
} |
OlderNewer