HELP! I broke something!

Homepage Community Forums inSync Theme Support HELP! I broke something!

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15568
    rchapple
    Customer

      I broke something while trying to upload a small snippet. Here’s the current code. Can anyone help? Thanks very much!

      <?php
      //* Start the engine
      require_once( get_template_directory() . ‘/lib/init.php’ );

      //* Child theme (do not remove)
      define( ‘CHILD_THEME_NAME’, ‘inSync Theme’, ‘insync’ );
      define( ‘CHILD_THEME_URL’, ‘https://appfinite.com/themes/insync&#8217; );

      //* Enqueue Scripts/Styles
      add_action( ‘wp_enqueue_scripts’, ‘insync_enqueue_scripts_styles’ );
      function insync_enqueue_scripts_styles() {

      wp_enqueue_script( ‘insync-responsive-menu’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/responsive-menu.js’, array( ‘jquery’ ), ‘1.0.0’ );
      wp_enqueue_style( ‘dashicons’ );
      wp_enqueue_style( ‘google-font’, ‘//fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,500,600’, array(), PARENT_THEME_VERSION );
      wp_enqueue_style( ‘prefix-font-awesome’, ‘//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css’, array(), ‘4.0.3’ );

      }

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

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

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

      // Create additional color style options
      add_theme_support( ‘genesis-style-selector’, array(
      ‘insync-black’ => __( ‘Black’, ‘insync’ ),
      ‘insync-blue’ => __( ‘Blue’, ‘insync’ ),
      ‘insync-green’ => __( ‘Green’, ‘insync’ ),
      ‘insync-pink’ => __( ‘Pink’, ‘insync’ ),
      ‘insync-purple’ => __( ‘Purple’, ‘insync’ ),
      ‘insync-red’ => __( ‘Red’, ‘insync’ ),
      ) );

      //* Add support for custom header
      add_theme_support( ‘custom-header’, array(
      ‘width’ => 360,
      ‘height’ => 70,
      ‘header-selector’ => ‘.site-title a’,
      ‘header-text’ => false,
      ) );

      // Add new image sizes
      add_image_size( ‘featured-img’, 730, 420, TRUE );
      add_image_size( ‘featured-page’, 341, 173, TRUE );
      add_image_size( ‘portfolio-thumbnail’, 348, 240, TRUE );

      // Add support for structural wraps
      add_theme_support( ‘genesis-structural-wraps’, array( ‘header’, ‘nav’, ‘subnav’, ‘inner’, ‘footer-widgets’, ‘footer’ ) );

      // Reposition the Secondary Navigation
      remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ ) ;
      add_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );

      // Before Header Wrap
      add_action( ‘genesis_before_header’, ‘before_header_wrap’ );
      function before_header_wrap()
      echo ‘<div class=”head-wrap”>’;
      }

      // After Header Wrap
      add_action( ‘genesis_after_header’, ‘after_header_wrap’, 1 );
      function after_header_wrap() {
      echo ‘</div>’;
      }

      // Reposition the Primary Navigation
      remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ ) ;
      add_action( ‘genesis_after_header’, ‘genesis_do_nav’, 2 );

      }

      // Customize search form input box text
      add_filter( ‘genesis_search_text’, ‘custom_search_text’ );
      function custom_search_text($text) {
      return esc_attr( ” );
      }

      //* Hooks after-entry widget area to single posts
      add_action( ‘genesis_entry_footer’, ‘my_after_entry_widget’ );
      function my_after_entry_widget() {

      if ( ! is_singular( ‘post’ ) )
      return;

      genesis_widget_area( ‘after-entry’, array(
      ‘before’ => ‘<div class=”after-entry widget-area”><div class=”wrap”>’,
      ‘after’ => ‘</div></div>’,
      ) );

      }

      add_action( ‘admin_menu’, ‘insync_theme_settings_init’, 15 );
      /**
      * This is a necessary go-between to get our scripts and boxes loaded
      * on the theme settings page only, and not the rest of the admin
      */
      function insync_theme_settings_init() {
      global $_genesis_admin_settings;

      add_action( ‘load-‘ . $_genesis_admin_settings->pagehook, ‘insync_add_portfolio_settings_box’, 20 );
      }

      // Add Portfolio Settings box to Genesis Theme Settings
      function insync_add_portfolio_settings_box() {
      global $_genesis_admin_settings;

      add_meta_box( ‘genesis-theme-settings-insync-portfolio’, __( ‘Portfolio Page Settings’, ‘insync’ ), ‘insync_theme_settings_portfolio’, $_genesis_admin_settings->pagehook, ‘main’ );
      }

      /**
      * Adds Portfolio Options to Genesis Theme Settings Page
      */
      function insync_theme_settings_portfolio() { ?>

      <p><?php _e(“Display which category:”, ‘genesis’); ?>
      <?php wp_dropdown_categories(array(‘selected’ => genesis_get_option(‘insync_portfolio_cat’), ‘name’ => GENESIS_SETTINGS_FIELD.'[insync_portfolio_cat]’, ‘orderby’ => ‘Name’ , ‘hierarchical’ => 1, ‘show_option_all’ => __(“All Categories”, ‘genesis’), ‘hide_empty’ => ‘0’ )); ?></p>

      <p><?php _e(“Exclude the following Category IDs:”, ‘genesis’); ?><br />
      <input type=”text” name=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_cat_exclude]” value=”<?php echo esc_attr( genesis_get_option(‘insync_portfolio_cat_exclude’) ); ?>” size=”40″ /><br />
      <small><?php _e(“Comma separated – 1,2,3 for example”, ‘genesis’); ?></small></p>

      <p><?php _e(‘Number of Posts to Show’, ‘genesis’); ?>:
      <input type=”text” name=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_cat_num]” value=”<?php echo esc_attr( genesis_option(‘insync_portfolio_cat_num’) ); ?>” size=”2″ /></p>

      <p><span class=”description”><?php _e(‘<b>NOTE:</b> The Portfolio Page displays the “Portfolio Page” image size plus the excerpt or full content as selected below.’, ‘insync’); ?></span></p>

      <p><?php _e(“Select one of the following:”, ‘genesis’); ?>
      <select name=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_content]”>
      <option style=”padding-right:10px;” value=”full” <?php selected(‘full’, genesis_get_option(‘insync_portfolio_content’)); ?>><?php _e(“Display post content”, ‘genesis’); ?></option>
      <option style=”padding-right:10px;” value=”excerpts” <?php selected(‘excerpts’, genesis_get_option(‘insync_portfolio_content’)); ?>><?php _e(“Display post excerpts”, ‘genesis’); ?></option>
      </select></p>

      <p><label for=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_content_archive_limit]”><?php _e(‘Limit content to’, ‘genesis’); ?></label> <input type=”text” name=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_content_archive_limit]” id=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_content_archive_limit]” value=”<?php echo esc_attr( genesis_option(‘insync_portfolio_content_archive_limit’) ); ?>” size=”3″ /> <label for=”<?php echo GENESIS_SETTINGS_FIELD; ?>[insync_portfolio_content_archive_limit]”><?php _e(‘characters’, ‘genesis’); ?></label></p>

      <p><span class=”description”><?php _e(‘<b>NOTE:</b> Using this option will limit the text and strip all formatting from the text displayed. To use this option, choose “Display post content” in the select box above.’, ‘genesis’); ?></span></p>
      <?php
      }

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

      /** Register widget areas */
      genesis_register_sidebar( array(
      ‘id’ => ‘slider-wide’,
      ‘name’ => __( ‘Slider Wide (full width)’, ‘insync’ ),
      ‘description’ => __( ‘This is the Full Width Slider section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘slider’,
      ‘name’ => __( ‘Slider’, ‘insync’ ),
      ‘description’ => __( ‘This is the slider section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-1’,
      ‘name’ => __( ‘Home Feature #1’, ‘insync’ ),
      ‘description’ => __( ‘This is the first column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-2’,
      ‘name’ => __( ‘Home Feature #2’, ‘insync’ ),
      ‘description’ => __( ‘This is the second column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-3’,
      ‘name’ => __( ‘Home Feature #3’, ‘insync’ ),
      ‘description’ => __( ‘This is the 3rd column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-4’,
      ‘name’ => __( ‘Home Feature #4 (Full Width)’, ‘insync’ ),
      ‘description’ => __( ‘This is the 4th column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-5’,
      ‘name’ => __( ‘Home Feature #5 (Left Content)’, ‘insync’ ),
      ‘description’ => __( ‘This is the 5th column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-6’,
      ‘name’ => __( ‘Home Feature #6 (Sidebar)’, ‘insync’ ),
      ‘description’ => __( ‘This is the 6th column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘home-feature-7’,
      ‘name’ => __( ‘Home Feature #7 (Full Width)’, ‘insync’ ),
      ‘description’ => __( ‘This is the 7th column of the feature section of the homepage.’, ‘insync’ ),
      ) );
      genesis_register_sidebar( array(
      ‘id’ => ‘after-entry’,
      ‘name’ => __( ‘After Entry’, ‘insync’ ),
      ‘description’ => __( ‘This widget will show up at the very end of each post.’, ‘insync’ ),
      ) );

      #15581
      scooby
      Customer

        Can you post the code snippet you were trying to add (by itself)? It would take too long to go through all of the code on your functions file, but if you paste the snippet then I can try and take a look.

        #15585
        rchapple
        Customer

          Hi all, I repaired by uploading the original functions.php
          Alas, operator error. I was uploading to the wrong file.

          Thanks!

          Ron

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘HELP! I broke something!’ is closed to new replies.