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
function my_post_list($title = 'Read More:', $args = array()){ | |
global $post; | |
$project_category = wp_get_post_categories($post->ID); | |
$defaults = array( // Set some defaults for querying the Posts | |
'ignore_sticky_posts' => true, | |
'posts_per_page' => 1, | |
'post_status' => 'publish', | |
'category__in' => $project_category, | |
'orderby' => 'rand' | |
); |
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 | |
/** | |
* Template Name: Airport Diagram | |
* | |
* @package tipton | |
*/ | |
get_header('diagram'); | |
get_sidebar(); | |
?> |
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
add_filter( 'the_content', 'wti_remove_autop_for_testimonial', 0 ); | |
function wti_remove_autop_for_testimonial( $content ) | |
{ | |
global $post; | |
if ( $post->post_type == 'post' ){ | |
remove_filter('the_content', 'wpautop'); | |
$content = “ . $content. ”; | |
} | |
return $content; | |
} |
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
function wp_remove() { | |
remove_meta_box( 'dashboard_primary', get_current_screen(), 'side' ); | |
} | |
add_action( 'wp_network_dashboard_setup', 'wp_remove', 20 ); | |
add_action( 'wp_user_dashboard_setup', 'wp_remove', 20 ); | |
add_action( 'wp_dashboard_setup', 'wp_remove', 20 ); |
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
add_filter( 'woocommerce_checkout_fields' , 'custom_rename_wc_checkout_fields', 10 ); | |
function custom_rename_wc_checkout_fields( $fields ) { | |
$fields['billing']['billing_first_name']['placeholder'] = 'Indtast dit fornavn'; | |
$fields['billing']['billing_first_name']['label'] = 'Fornavn'; | |
$fields['billing']['billing_last_name']['placeholder'] = 'Indtast dit efternavn'; | |
$fields['billing']['billing_last_name']['label'] = 'Efternavn'; | |
$fields['billing']['billing_company']['placeholder'] = 'Firmanavn'; | |
$fields['billing']['billing_company']['label'] = 'Firmanavn'; |
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
function woocommerce_rename_coupon_message_on_checkout() { | |
return 'Har du en kupon?' . ' <a href="#" class="showcoupon">' . __( 'Klik her for at indtaste din kode', 'woocommerce' ) . '</a>'; | |
} | |
add_filter( 'woocommerce_checkout_coupon_message', 'woocommerce_rename_coupon_message_on_checkout' ); |
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
function my_text_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Billing details' : | |
$translated_text = __( 'Faktureringsdetaljer', 'woocommerce' ); | |
break; | |
case 'Your order' : | |
$translated_text = __( 'Din bestilling', 'woocommerce' ); | |
break; | |
case 'View cart' : | |
$translated_text = __( 'Se indkøbsvogn', 'woocommerce' ); |
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
function my_login_logo() { ?> | |
<style type="text/css"> | |
#login h1 a, .login h1 a { | |
background-image: url('https://xxx.com/wp-content/uploads/2017/11/logo-3.png'); | |
width: auto; | |
height: 76px; | |
background-size: contain; | |
background-position: center center; | |
} | |
#login h1 a:focus, |
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
[type="radio"]:checked, | |
[type="radio"]:not(:checked) { | |
position: absolute; | |
left: -9999px; | |
} | |
[type="radio"]:checked + label, | |
[type="radio"]:not(:checked) + label | |
{ | |
position: relative; | |
padding-left: 28px; |
OlderNewer