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
var table = ''; // Variable in global scope to store the data table instance | |
if ( $.fn.dataTable.isDataTable( '#data-table' ) ) { | |
table.destroy(); // Destroy old instance | |
} | |
$scope.json = data.data; // Get json data with angular $http service | |
var target = $('#data-table thead'); // Data table thead | |
var target2 = $('#data-table tbody'); // Data table tbody |
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 | |
/* | |
Add these code to your functions.php | |
This will only change the stylesheet/stylesheet dir uri | |
But will not add theme info from the new location | |
To fix you must place another style.css with theme information in theme root directory (i.e: wp-content/themes/twintysixteen/) | |
*/ | |
add_filter('stylesheet_uri','wpi_stylesheet_uri',10,2); |
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 | |
/* | |
Using php.ini file: | |
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED | |
Warning! : This may cause 500 internal error on some server, contact provider | |
*/ | |
/* | |
Using php | |
*/ |
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
Check your code you might have wrote a comment <!--#some comment--> then add space, | |
<!--[add space ] #some comment [add space] --> Like this <!-- #some comment --> | |
Also check Folder permission must be 644 or 744 or 755. | |
You can also use 'chown' |
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
angular.element(document.getElementById('yourElementId')).scope(); |
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 | |
// Way 1 | |
$a = $b + $a - ($b = $a); | |
// Way 2 | |
list($b, $a) = array($a, $b); | |
// Way 3 | |
function swap(&$a, &$b) { | |
$tmp = $a; |
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 | |
add_filter( 'wp_title', 'wpdocs_hack_wp_title_for_home' ); | |
function wpdocs_hack_wp_title_for_home( $title ) | |
{ | |
if ( empty( $title ) && ( is_home() || is_front_page() ) ) { | |
$title = __( 'Home', 'themeaxe' ) . ' | ' . get_bloginfo( 'description' ); | |
} | |
return $title; | |
} |
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
/* | |
The typeface, regardless of how it is being served (Typekit, Google, @font-face) is loaded and then computed at a sub pixel level. | |
The smoothing happens in a space we can't see easily. Because of this, some browsers (looking at you Chrome & Firefox) | |
take beautiful, slender fonts and bloat them, making the edges appear jagged, losing the quality of beautiful, | |
crisp shapes designers crave in web type. | |
This only works in Chrome on Mac OS X | |
*/ | |
/* First, remove sub pixel antialiasing by using the antialiased property. */ | |
html { |
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 | |
/* | |
previous_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ); | |
*/ | |
previous_post_link('%link', 'Previous in category', TRUE, '12'); | |
previous_post_link( '%link', 'Previous post in category', TRUE, ' ', 'post_format' ); | |
// Using font-awesome icon in link custom buttom | |
previous_post_link( '%link', '<i class="sprite sprite-left-arrow"></i>', TRUE, ' ', 'status' ); |
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 | |
/* | |
Even though it's tied to the custom post, | |
it still assumes you want to query normal post so I added this to my template and it works: | |
*/ | |
global $wp_query; | |
$args = array_merge( $wp_query->query, array( 'post_type' => 'portfolio' ) ); | |
$post = query_posts( $args ); // All posts in query |
OlderNewer