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="carousel-inner"> | |
<?php | |
$first = true; | |
while ( have_posts() ) : the_post(); | |
$content = get_the_content(); | |
?> | |
<div class="item <?php echo ( $first ? 'active' : 'inactive' ); ?>"> | |
<div class="container slide-element"> | |
<?php the_post_thumbnail(); ?> | |
<p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p> |
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 $wpdb; | |
$entries = $wpdb->get_results( $wpdb->prepare( " | |
SELECT | |
p.ID, | |
t.term_id | |
FROM | |
" . $wpdb->posts . " p | |
LEFT 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
# Fail2Ban configuration file | |
# | |
# Author: Marius | |
# | |
[INCLUDES] | |
before = common.conf | |
[Definition] |
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
[wordpress] | |
enabled = true | |
bantime = 900 | |
port = http,https | |
filter = wordpress | |
logpath = /var/log/apache2/other_vhost_access.log | |
findtime = 8 | |
maxretry = 5 |
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 | |
function login_redirection( $redirect_to, $request, $user ) { | |
global $user; | |
if ( isset( $user->roles ) && is_array( $user->roles ) ) { | |
if ( in_array( 'administrator', $user->roles ) || in_array( 'editor', $user->roles ) ) { | |
return $redirect_to; | |
} | |
else { | |
return home_url( '/dekk/' ); |
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
@media print { | |
.nav--block, | |
.hidden--portable, | |
#trip-details__actions { | |
display: none; | |
} | |
.page-container { | |
border: none; | |
} |
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 | |
// This is your functions.php | |
function exclude_first_five_posts_home( $query ) { | |
if ( $query->is_home() && $query->is_main_query() ) { | |
$query->set( 'offset', '5' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'exclude_first_five_posts_home' ); | |
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
SELECT | |
( | |
SELECT | |
COUNT(DISTINCT id) | |
FROM | |
messages | |
WHERE | |
nickname = '" . $_GET['nickname'] . "' | |
AND | |
is_question = 1 |
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
ASCII GS ( L pL pH m fn # # 1 1 | |
Decimal 29 40 76 6 0 48 69 35 35 49 49 |
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 | |
function set_page_for_post( $query ) { | |
/* | |
* Only run our query modifications if; | |
* This is the main query (not a custom WP_Query or similar) | |
* We are not on the admin screen | |
* It's a single post entry | |
* The post type is 'post' | |
*/ | |
if ( $query->is_main_query() & ! is_admin() && is_single() && 'post' == get_post_type() ) { |