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 ross_menu_link__menu_block__menu_social(array $variables) { | |
$element = $variables['element']; | |
$sub_menu = ''; | |
if ($element['#below']) { | |
$sub_menu = drupal_render($element['#below']); | |
} | |
$element['#localized_options']['html'] = TRUE; |
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 to theme functions.php | |
function redirect_gift_registry() { | |
if (is_user_logged_in() && is_page(2042)) { | |
wp_redirect( home_url("/shop") ); exit; | |
} | |
} | |
add_action('template_redirect', 'redirect_gift_registry'); | |
?> |
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 | |
// Registering my custom post type | |
// ... | |
register_post_type( 'news-event', | |
array( | |
'labels' => array( | |
'name' => __( 'News & Events' ), | |
'singular_name' => __( 'News & Events' ) | |
), |