Position Logo & Navbar

Community Forums Forums Design Tips and Tricks Position Logo & Navbar

This topic is: not resolved

Tagged: 

This topic contains 18 replies, has 4 voices, and was last updated by  Tony @ AlphaBlossom 3 months ago.

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #114465

    Tony @ AlphaBlossom
    Participant
    Post count: 543
    #114455

    sookie
    Participant
    Post count: 26

    Hi Tony,

    Here is what my function.php looks like:

    <?php
    /**
    * Custom amendments for the theme.
    *
    * @category Foodie
    * @subpackage Genesis
    * @copyright Copyright (c) 2013, Shay Bocks
    * @license GPL-2.0+
    * @link http://www.shaybocks.com/foodie/
    * @since 1.0.9
    *
    */

    add_action( ‘genesis_setup’, ‘foodie_theme_setup’, 15 );
    /**
    * Theme Setup
    *
    * This setup function attaches all of the site-wide functions
    * to the correct hooks and filters. All the functions themselves
    * are defined below this setup function.
    *
    * @since 1.0.1
    */
    function foodie_theme_setup() {

    //* Child theme (do not remove)
    define( ‘CHILD_THEME_NAME’, __( ‘Foodie Theme’, ‘foodie’ ) );
    define( ‘CHILD_THEME_VERSION’, ’1.0.9′ );
    define( ‘CHILD_THEME_URL’, ‘http://www.shaybocks.com/foodie/’ );
    define( ‘CHILD_THEME_DEVELOPER’, __( ‘Shay Bocks’, ‘foodie’ ) );

    //* Add viewport meta tag for mobile browsers.
    add_theme_support( ‘genesis-responsive-viewport’ );

    //* Add HTML5 markup structure.
    add_theme_support( ‘html5′ );

    //* Set content width.
    $content_width = apply_filters( ‘content_width’, 610, 610, 980 );

    //* Add new featured image sizes.
    add_image_size( ‘horizontal-thumbnail’, 680, 453, TRUE );
    add_image_size( ‘square-thumbnail’, 450, 450, TRUE );

    //* Add support for custom background.
    add_theme_support( ‘custom-background’ );

    //* Unregister header right sidebar.
    unregister_sidebar( ‘header-right’ );

    //* Create color style options.
    add_theme_support( ‘genesis-style-selector’, array(
    ‘theme-citrus’ => __( ‘Citrus’, ‘foodie’ ),
    ‘theme-earthy’ => __( ‘Earthy’, ‘foodie’ ),
    )
    );

    //* Add support for custom header.
    add_theme_support( ‘genesis-custom-header’, array(
    ‘width’ => 400,
    ‘height’ => 170
    )
    );

    //* Add support for 3-column footer widgets.
    add_theme_support( ‘genesis-footer-widgets’, 3 );

    //* Enqueue child theme styles.
    add_action( ‘wp_enqueue_scripts’, ‘foodie_enqueue_syles’ );

    //* Enqueue child theme JavaScript.
    add_action( ‘wp_enqueue_scripts’, ‘foodie_enqueue_js’ );

    //* Add child theme body class.
    add_filter( ‘body_class’, ‘foodie_add_body_class’ );

    //* Add post navigation.
    add_action( ‘genesis_after_entry_content’, ‘genesis_prev_next_post_nav’, 5 );

    //* Modify the WordPress read more link.
    add_filter( ‘the_content_more_link’, ‘foodie_read_more_link’ );

    //* Add excerpt read more link.
    add_filter( ‘excerpt_more’, ‘get_read_more_link’ );
    add_filter( ‘the_content_more_link’, ‘get_read_more_link’ );

    //* Modify the speak your mind text.
    add_filter( ‘genesis_comment_form_args’, ‘foodie_comment_form_args’ );

    //* Customize the credits.
    add_filter( ‘genesis_footer_creds_text’, ‘foodie_footer_creds_text’ );

    //* Load an ad section before .site-inner.
    add_action( ‘genesis_before’, ‘foodie_top_ad’ );

    //* Load theme sidebars.
    foodie_register_sidebars();

    //* Disable the editor for the recipe page template.
    add_action( ‘admin_init’, ‘foodie_remove_widgeted_editor’ );

    }

    /**
    * Load Genesis
    *
    * This is technically not needed.
    * However, to make functions.php snippets work, it is necessary.
    */
    require_once( get_template_directory() . ‘/lib/init.php’ );

    /**
    * Load all additional stylesheets for the Foodie theme.
    *
    * @since 1.0.0
    */
    function foodie_enqueue_syles() {
    wp_enqueue_style( ‘foodie-google-fonts’, ‘//fonts.googleapis.com/css?family=Pontano+Sans|Open+Sans:300,400′, array(), CHILD_THEME_VERSION );
    }

    /**
    * Load all required JavaScript for the Foodie theme.
    *
    * @since 1.0.1
    */
    function foodie_enqueue_js() {
    $js_uri = get_stylesheet_directory_uri() . ‘/lib/js/’;
    // Add general purpose scripts.
    wp_enqueue_script( ‘foodie-general’, $js_uri . ‘general.js’, array( ‘jquery’ ), ’1.0.0′, true );
    }

    /**
    * Add the theme name class to the body element.
    *
    * @param string $classes
    * @return string Modified body classes.
    *
    * @since 1.0.0
    */
    function foodie_add_body_class( $classes ) {
    $classes[] = ‘foodie’;
    return $classes;
    }

    /**
    * Modify the Genesis read more link.
    *
    * @param string $more
    * @return string Modified read more text.
    *
    * @since 1.0.0
    */
    function foodie_read_more_link() {
    return ‘<p></p>‘ . __( ‘Read More’, ‘foodie’ ) . ‘ »‘;
    }

    /**
    * Add excerpt read more link.
    *
    * @param string $more
    * @return string Modified read more text.
    *
    * @since 1.0.0
    */
    function get_read_more_link() {
    return ‘… <p></p>‘ . __( ‘Read More’, ‘foodie’ ) . ‘ »‘;
    }

    /**
    * Modify the speak your mind text.
    *
    * @since 1.0.0
    */
    function foodie_comment_form_args( $args ) {
    $args['title_reply'] = __( ‘Comments’, ‘foodie’ );
    return $args;
    }

    /**
    * Customize the footer text
    *
    * @param string $creds Default credits.
    * @return string Modified Shay Bocks credits.
    *
    * @since 1.0.0
    */
    function foodie_footer_creds_text( $creds ) {
    return sprintf(
    ‘[footer_copyright before="%s "] · [footer_childtheme_link before=""] %s %s · %s [footer_genesis_link url="http://www.studiopress.com/" before=""] · [footer_wordpress_link before=" %s"]‘,
    __( ‘Copyright’, ‘foodie’ ),
    __( ‘by’, ‘foodie’ ),
    CHILD_THEME_DEVELOPER,
    __( ‘Built on the ‘, ‘foodie’ ),
    __( ‘Powered by ‘, ‘foodie’ )
    );
    }

    /**
    * Load an ad section before .site-inner.
    *
    * @since 1.0.7
    */
    add_action( ‘genesis_before’, ‘foodie_top_ad’ );
    function foodie_top_ad() {
    //* Return early if we have no ad.
    if ( ! is_active_sidebar( ‘top-ad’ ) ) {
    return;
    }

    echo ‘<div class=”top-ad”>’;
    dynamic_sidebar( ‘top-ad’ );
    echo ‘</div>’;
    }

    /**
    * Register sidebars for Foodie theme.
    *
    * @since 1.0.0
    */
    function foodie_register_sidebars() {
    genesis_register_sidebar( array(
    ‘id’ => ‘top-ad’,
    ‘name’ => __( ‘Top Ad’, ‘foodie’ ),
    ‘description’ => __( ‘This is the top ad section.’, ‘foodie’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home Top’, ‘foodie’ ),
    ‘description’ => __( ‘This is the home top section.’, ‘foodie’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-middle’,
    ‘name’ => __( ‘Home Middle’, ‘foodie’ ),
    ‘description’ => __( ‘This is the home middle section.’, ‘foodie’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-bottom’,
    ‘name’ => __( ‘Home Bottom’, ‘foodie’ ),
    ‘description’ => __( ‘This is the home bottom section.’, ‘foodie’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘recipes-top’,
    ‘name’ => __( ‘Recipes Top’, ‘foodie’ ),
    ‘description’ => __( ‘This is the recipes top section.’, ‘foodie’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘recipes-bottom’,
    ‘name’ => __( ‘Recipes Bottom’, ‘foodie’ ),
    ‘description’ => __( ‘This is the recipes bottom section.’, ‘foodie’ ),
    ) );
    }

    /**
    * Perform a check to see whether or not a widgeted page template is being used.
    *
    * @since 1.0.0
    * @return bool
    */
    function foodie_using_widgeted_template( $templates = ” ) {
    // Return false if we have post data.
    if ( ! isset( $_REQUEST['post'] ) ) {
    return false;
    }

    // If no widgeted templates are passed in, check only the default recipes.php.
    if ( empty( $templates ) ) {
    $templates = array( ‘recipes.php’ );
    }

    foreach ( $templates as $template ) {
    // Return true for all widgeted templates
    if ( get_page_template_slug( $_REQUEST['post'] ) === $template ) {
    return true;
    }
    }

    // Return false for other templates.
    return false;
    }

    /**
    * Check to make sure a widgeted page template is is selected and then disable
    * the default WordPress editor.
    *
    * @since 1.0.0
    */
    function foodie_remove_widgeted_editor() {
    // Return early if a widgeted template isn’t selected.
    if ( ! foodie_using_widgeted_template() ) {
    return;
    }

    // Disable the standard WordPress editor.
    remove_post_type_support( ‘page’, ‘editor’ );

    //* Add an admin notice for the recipe page template.
    add_action( ‘admin_notices’, ‘foodie_widgeted_admin_notice’ );
    }

    /**
    * Check to make sure a widgeted page template is is selected and then show a
    * notice about the editor being disabled.
    *
    * @since 1.0.0
    */
    function foodie_widgeted_admin_notice() {
    // Display a notice to users about the widgeted template.
    echo ‘<div class=”updated”><p>’;
    printf (
    __( ‘The normal editor is disabled because you\’re using a widgeted page template. You need to use widgets to edit this page.’, ‘foodie’ ),
    ‘widgets.php’
    );
    echo ‘</p></div>’;
    }

    #114528

    genwrock
    Member
    Post count: 663

    I checked the code. Header Right sidebar is removed by this code

    //* Unregister header right sidebar.
    unregister_sidebar( ‘header-right’ );

    If you want then you can enable it this way

    //* Unregister header right sidebar.
    // unregister_sidebar( ‘header-right’ );

    See My PRO Genesis Child Themes | Customizing & Creating Genesis Website | Follow Me on Twitter

    #114566

    Tony @ AlphaBlossom
    Participant
    Post count: 543

    Agreed, that would be the easiest way…restoring your header right widget so you can add your nav.


Viewing 4 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic.