Skip to content

Instantly share code, notes, and snippets.

@AnnaCrumina
AnnaCrumina / gist:26c76fb0a1ca264dff30
Last active August 29, 2015 14:13
Shortcode in stunning header [Atlantis]
<?php
/* -------------------------------------------------------
You can add your custom functions below
-------------------------------------------------------- */
function custom_stunning_header() {
global $crum_theme_option;
$custom_st_header = get_post_meta(get_the_ID(),'single_post_st_header',true);
@AnnaCrumina
AnnaCrumina / gist:9ce29f59f73a2b1351c8
Created January 26, 2015 15:06
CSS to remove space in content area
#layout >.row {
max-width: 1200px;
margin-left:-10px;
}
function custom_url_logo(){
$logo = reactor_option( 'custom_logo_media', get_template_directory_uri() . '/library/img/logo.png' );
$logo2x = reactor_option( 'custom_logo_retina', get_template_directory_uri() . '/library/img/logo@2x.png' );
if ( $logo['url'] || $logo2x['url'] ) : ?>
<div class="logo large-2 medium-2 columns">
<a href="<?php echo esc_url('http:Your custom URL HERE'); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img data-interchange='[<?php echo $logo['url']; ?>, (default)], [<?php echo $logo2x['url']; ?>, (retina)]' alt="" class="hideie">
register_nav_menu('top-bar-l', __( 'Top Bar Left', 'reactor'));
register_nav_menu('top-bar-r', __( 'Top Bar Right', 'reactor'));
/**
* Top bar left menu
*
* @since 1.0.0
* @see wp_nav_menu
* @param array $locations Associative array of menu location identifiers (like a slug) and descriptive text.
@AnnaCrumina
AnnaCrumina / gist:7b22fbbaca5193502146
Created February 3, 2015 10:05
align logo and menu under it in center
.logo {
float: none;
width: auto;
text-align: center;
}
.main-menu-item {
float: none;
text-align: left;
display: inline-block;
<?php
/**
* The template for displaying posts by category
*
* @package Reactor
* @subpackge Templates
* @since 1.0.0
*/
?>
add_action('init','crum_remove_post_share');
function crum_remove_post_share(){
remove_action('reactor_post_footer', 'reactor_share_post', 6);
}
add_action('reactor_post_footer', 'crumina_custom_post_share', 6);
function crumina_custom_post_share(){
if ( is_single() ) {
function cr_custom_do_reactor_head()
{
global $one_touch_option; ?>
<meta charset="utf-8"/>
<title><?php wp_title(); ?></title>
<!-- google chrome frame for ie -->
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
<?php
function custom_before_header_bar()
{ ?>
<div style="background:gray; "> <!-- Full width row -->
<div class="row"><div class="large-12 small-12 columns">
<!-- Your Content Will be here -->
</div></div>
/**
* Pages without top menu
* in footer.php
*
* @since 1.0.0
*/
function reactor_remove_footer() {
if (is_page_template('page-blank.php')):