Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #14643

    Charlie C
    Participant

    Hi, I asked this question as a reply to the main previous thread on multiple portfolios. I’m not bumping this, just wasn’t sure whether I’d posted in the right place.

    I’ve followed the directions on that thread and managed to get the admin end working but nothing’s doing at the front. I just wondered if it would be possible to either post what I’ve done or provide the back end details for you to give my files a scan and give me a steer on where I’ve gone wrong.

    I’m sorry – not asking you to do the work for me (well, maybe a bit…!)

    Many thanks

    #14694

    Kory
    Keymaster

    Hey Charlie,

    Thanks for writing in! We’d be happy to look at things for you to provide a little guidance, but first I’d like to ask if you’ve taken the time to go through the entire thread that outlines this process? I ask this only because there are certain places in that thread where things had to be updated a few times to work, so if you do not have it in place exactly like it is at the end of the thread it will not work. If you haven’t done so yet, definitely take time to read through every post in that thread to ensure that you have everything setup correctly as everything worked as expected at the end of that thread.

    Thanks!

    #14746

    Charlie C
    Participant

    I will do that. I’m just a bit worried that maybe I’ve altered more things than I should have at the outset.I’ve removed every instance of x-portfolio and I’m wondering whether that has caused problems. I’ll keep studying the thread.

    #14754

    Christian
    Moderator

    No problem Charlie. We’re here to help if your stuck. 🙂

    #14881

    Charlie C
    Participant

    Right, I’m stuck. Here’s my functions file

    
    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    function shopping_init() {
    
      $slug = sanitize_title( get_theme_mod( 'x_custom_portfolio_slug' ) );
    
      //
      // Enable the custom post type.
      //
    
     $labels = array(
        'name'               => __( 'Shopping', '__x__' ),
        'singular_name'      => __( 'Shopping Item', '__x__' ),
        'add_new'            => __( 'Add New Item', '__x__' ),
        'add_new_item'       => __( 'Add New Shopping Item', '__x__' ),
        'edit_item'          => __( 'Edit Shopping Item', '__x__' ),
        'new_item'           => __( 'Add New Shopping Item', '__x__' ),
        'view_item'          => __( 'View Item', '__x__' ),
        'search_items'       => __( 'Search Shopping', '__x__' ),
        'not_found'          => __( 'No shopping items found', '__x__' ),
        'not_found_in_trash' => __( 'No shopping items found in trash', '__x__' )
      );
    
      $args = array(
        'labels'          => $labels,
        'public'          => true,
        'show_ui'         => true,
        'supports'        => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'author', 'custom-fields', 'revisions' ),
        'capability_type' => 'post',
        'hierarchical'    => false,
        'rewrite' => array( 'slug' => 'my-posts', 'with_front' => false ),
        'menu_position'   => 5,
        'has_archive'     => true
      );
    
      $args = apply_filters( 'portfolioposttype_args', $args );
    
      register_post_type( 'shopping', $args );
    
      //
      // Register a taxonomy for shopping tags.
      //
    
      $taxonomy_shopping_tag_labels = array(
        'name'                       => __( 'Shopping Tags', '__x__' ),
        'singular_name'              => __( 'Shopping Tag', '__x__' ),
        'search_items'               => __( 'Search Shopping Tags', '__x__' ),
        'popular_items'              => __( 'Popular Shopping Tags', '__x__' ),
        'all_items'                  => __( 'All Shopping Tags', '__x__' ),
        'parent_item'                => __( 'Parent Shopping Tag', '__x__' ),
        'parent_item_colon'          => __( 'Parent Shopping Tag:', '__x__' ),
        'edit_item'                  => __( 'Edit Shopping Tag', '__x__' ),
        'update_item'                => __( 'Update Shopping Tag', '__x__' ),
        'add_new_item'               => __( 'Add New Shopping Tag', '__x__' ),
        'new_item_name'              => __( 'New Shopping Tag Name', '__x__' ),
        'separate_items_with_commas' => __( 'Separate shopping tags with commas', '__x__' ),
        'add_or_remove_items'        => __( 'Add or remove shopping tags', '__x__' ),
        'choose_from_most_used'      => __( 'Choose from the most used shopping tags', '__x__' ),
        'menu_name'                  => __( 'Shopping Tags', '__x__' )
      );
    
      $taxonomy_shopping_tag_args = array(
        'labels'            => $taxonomy_shopping_tag_labels,
        'public'            => true,
        'show_in_nav_menus' => true,
        'show_ui'           => true,
        'show_tagcloud'     => true,
        'hierarchical'      => false,
        'rewrite'           => array( 'slug' => $slug . '-tag', 'with_front' => false ),
        'show_admin_column' => true,
        'query_var'         => true
      );
    
      register_taxonomy( 'shopping-tag', array( 'shopping' ), $taxonomy_shopping_tag_args );
    
      //
      // Register a taxonomy for shopping categories.
      //
    
      $taxonomy_shopping_category_labels = array(
        'name'                       => __( 'Shopping Categories', '__x__' ),
        'singular_name'              => __( 'Shopping Category', '__x__' ),
        'search_items'               => __( 'Search Shopping Categories', '__x__' ),
        'popular_items'              => __( 'Popular Shopping Categories', '__x__' ),
        'all_items'                  => __( 'All Shopping Categories', '__x__' ),
        'parent_item'                => __( 'Parent Shopping Category', '__x__' ),
        'parent_item_colon'          => __( 'Parent Shopping Category:', '__x__' ),
        'edit_item'                  => __( 'Edit Shopping Category', '__x__' ),
        'update_item'                => __( 'Update Shopping Category', '__x__' ),
        'add_new_item'               => __( 'Add New Shopping Category', '__x__' ),
        'new_item_name'              => __( 'New Shopping Category Name', '__x__' ),
        'separate_items_with_commas' => __( 'Separate shopping categories with commas', '__x__' ),
        'add_or_remove_items'        => __( 'Add or remove shopping categories', '__x__' ),
        'choose_from_most_used'      => __( 'Choose from the most used shopping categories', '__x__' ),
        'menu_name'                  => __( 'Shopping Categories', '__x__' ),
      );
    
      $taxonomy_shopping_category_args = array(
        'labels'            => $taxonomy_shopping_category_labels,
        'public'            => true,
        'show_in_nav_menus' => true,
        'show_ui'           => true,
        'show_admin_column' => true,
        'show_tagcloud'     => true,
        'hierarchical'      => true,
        'rewrite'           => array( 'slug' => $slug . '-category', 'with_front' => false ),
        'query_var'         => true
      );
    
      register_taxonomy( 'shopping-category', array( 'shopping' ), $taxonomy_shopping_category_args );
    
    }
    
    add_action( 'init', 'shopping_init' );
    
    function enqueue_shopping_scripts() {
    
      wp_register_script( 'shopping-isotope', get_template_directory_uri() . '/framework/js/vendor/isotope-1.5.25.min.js', array( 'jquery' ), NULL, true );
    
      if ( ! is_admin() ) {
        if ( is_post_type_archive( 'shopping' ) ) {
          wp_enqueue_script( 'shopping-isotope' );
        }
      }
    
    }
    
    if ( ! function_exists( 'x_breadcrumbs' ) ) :
      function x_breadcrumbs() {
    
        if ( get_theme_mod( 'x_breadcrumb_display' ) ) {
    
          //
          // 1. Delimiter between crumbs.
          // 2. Output text for the "Home" link.
          // 3. Link to the home page.
          // 4. 1 = show / 0 = don't show.
          // 5. Tag before the current crumb.
          // 6. Tag after the current crumb.
          // 7. Get page title.
          // 8. Get blog title.
          // 9. Get shop title.
          //
    
          GLOBAL $post;
    
          $stack           = x_get_stack();
          $delimiter       = '<span class="delimiter"><i class="x-icon-angle-right"></i></span>';                   // 1
          $home            = '<span class="home"><i class="x-icon-home"></i> ' . __( 'Home', '__x__' ) . '</span>'; // 2
          $home_link       = home_url();                                                                            // 3
          $show_current    = 1;                                                                                     // 4
          $before          = '<span class="current">';                                                              // 5
          $after           = '</span>';                                                                             // 6
          $page_title      = get_the_title();                                                                       // 7
          $blog_title      = get_the_title( get_option( 'page_for_posts', true ) );                                 // 8
          $shop_page_title = get_theme_mod( 'x_' . $stack . '_shop_title' );                                        // 9
          if ( function_exists( 'woocommerce_get_page_id' ) ) {
            $shop_page_url  = get_permalink( woocommerce_get_page_id( 'shop' ) );
            $shop_page_link = '<a href="'. $shop_page_url .'">' . $shop_page_title . '</a> ';
          }
         
          if ( is_front_page() ) {
            echo '<div class="x-breadcrumbs">' . $before . $home . $after . '</div>';
          } elseif ( is_home() ) {
            echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home . '</a> ' . $delimiter . ' ' . $before . $blog_title . $after . '</div>';
          } else {
            echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home . '</a> ' . $delimiter . ' ';
            if ( is_category() ) {
              $the_cat = get_category( get_query_var( 'cat' ), false );
              if ($the_cat->parent != 0) echo get_category_parents( $the_cat->parent, TRUE, ' ' . $delimiter . ' ' );
              echo $before . single_cat_title( '', false ) . $after;
            } elseif ( function_exists( 'is_product_category' ) && is_product_category() ) {
              echo $shop_page_link . $delimiter . ' ' . $before . single_cat_title( '', false ) . $after;
            } elseif ( function_exists( 'is_product_tag' ) && is_product_tag() ) {
              echo $shop_page_link . $delimiter . ' ' . $before . single_tag_title( '', false ) . $after;
            } elseif ( is_search() ) {
              echo $before . __( 'Search Results for ', '__x__' ) . '“' . get_search_query() . '”' . $after;
            } elseif ( is_singular( 'post' ) ) {
              if ( get_option( 'page_for_posts' ) == is_front_page() ) {
                echo ' ' . $before . $page_title . $after;
              } else {
                echo '<a href="' . get_permalink( get_option( 'page_for_posts' ) ) . '" title="' . esc_attr( __( 'See All Posts', '__x__' ) ) . '">' . $blog_title . '</a> ' . $delimiter . ' ' . $before . $page_title . $after;
              }
            } elseif ( is_singular( 'x-portfolio' ) ) {
              echo '<a href="' . get_post_type_archive_link( 'x-portfolio' ) . '" title="' . esc_attr( __( 'See All Posts', '__x__' ) ) . '">' . get_theme_mod( 'x_portfolio_title' ) . '</a> ' . $delimiter . ' ' . $before . $page_title . $after;
            } elseif ( function_exists( 'is_product' ) && is_product() ) {
              echo $shop_page_link . $delimiter . ' ' . $before . $page_title . $after;
            } elseif ( is_page() && ! $post->post_parent ) {
              if ( $show_current == 1 ) echo $before . $page_title . $after;
            } elseif ( is_page() && $post->post_parent ) {
              $parent_id   = $post->post_parent;
              $breadcrumbs = array();
              while ( $parent_id ) {
                $page          = get_page( $parent_id );
                $breadcrumbs[] = '<a href="' . get_permalink( $page->ID ) . '">' . get_the_title( $page->ID ) . '</a>';
                $parent_id     = $page->post_parent;
              }
              $breadcrumbs = array_reverse( $breadcrumbs );
              for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
                echo $breadcrumbs[$i];
                if ( $i != count( $breadcrumbs ) -1 ) echo ' ' . $delimiter . ' ';
              }
              if ( $show_current == 1 ) echo ' ' . $delimiter . ' ' . $before . $page_title . $after;
            } elseif ( is_tag() ) {
              echo $before . single_tag_title( '', false ) . $after;
            } elseif ( is_author() ) {
              GLOBAL $author;
              $userdata = get_userdata( $author );
              echo $before . __( 'Posts by ', '__x__' ) . '“' . $userdata->display_name . $after . '”';
            } elseif ( is_404() ) {
              echo $before . __( '404 (Page Not Found)', '__x__' ) . $after;
            } elseif ( is_archive() ) {
    		} elseif ( is_post_type_archive( 'shopping' ) ) {
                echo $before . get_theme_mod( 'shopping_title' ) . $after;
              } elseif ( function_exists( 'is_shop' ) && is_shop() ) {
                echo $before . $shop_page_title . $after;
              } else {
                echo $before . __( 'Archives ', '__x__' ) . $after;
              }
            }
            if ( get_query_var( 'paged' ) ) {
              if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
              echo '<span class="current" style="white-space: nowrap;">(' . __( 'Page', '__x__' ) . ' ' . get_query_var( 'paged' ) . ')</span>';
              if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
            }
            echo '</div>';
          }
    
        }
    
     
    endif;
    
    add_action( 'wp_enqueue_scripts', 'enqueue_shopping_scripts' );
    
    function add_shopping_metaboxes() {
    
      $meta_box = array(
        'id'          => 'x-meta-box-shopping',
        'title'       => __( 'Shopping Settings', '__x__' ),
        'description' => __( 'Select the appropriate options for your portfolio output.', '__x__' ),
        'page'        => 'shopping',
        'context'     => 'normal',
        'priority'    => 'high',
        'fields'      => array(
          array(
            'name' => __( 'Body CSS Class(es)', '__x__' ),
            'desc' => __( 'Add a custom CSS class to the <body> element. Separate multiple class names with a space.', '__x__' ),
            'id'   => '_x_entry_body_css_class',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name'    => __( 'Media Type', '__x__' ),
            'desc'    => __( 'Select which kind of media you want to display for your portfolio. If selecting a "Gallery," simply upload your images to this post and organize them in the order you want them to display.', '__x__' ),
            'id'      => 'shopping_media',
            'type'    => 'radio',
            'std'     => 'Image',
            'options' => array( 'Image', 'Gallery', 'Video' )
          ),
          array(
            'name'    => __( 'Featured Content', '__x__' ),
            'desc'    => __( 'Select "Media" if you would like to show your video or gallery on the index page in place of the featured image.', '__x__' ),
            'id'      => 'shopping_index_media',
            'type'    => 'radio',
            'std'     => 'Thumbnail',
            'options' => array( 'Thumbnail', 'Media' )
          ),
          array(
            'name'    => __( 'Video Aspect Ratio', '__x__' ),
            'desc'    => __( 'If selecting "Video," choose the aspect ratio you would like for your video.', '__x__' ),
            'id'      => 'shopping_aspect_ratio',
            'type'    => 'select',
            'std'     => '16:9',
            'options' => array( '16:9', '5:3', '5:4', '4:3', '3:2' )
          ),
          array(
            'name' => __( 'M4V File URL', '__x__' ),
            'desc' => __( 'If selecting "Video," place the URL to your .m4v video file here.', '__x__' ),
            'id'   => 'shopping_m4v',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'OGV File URL', '__x__' ),
            'desc' => __( 'If selecting "Video," place the URL to your .ogv video file here.', '__x__' ),
            'id'   => 'shopping_ogv',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'Embedded Video Code', '__x__' ),
            'desc' => __( 'If you are using something other than self hosted video such as YouTube, Vimeo, or Wistia, paste the embed code here. This field will override the above.', '__x__' ),
            'id'   => 'shopping_embed',
            'type' => 'textarea',
            'std'  => ''
          ),
          array(
            'name' => __( 'Project Link', '__x__' ),
            'desc' => __( 'Provide an external link to the project you worked on if one is available.', '__x__' ),
            'id'   => 'shopping_project_link',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'Background Image(s)', '__x__' ),
            'desc' => __( 'Click the button to upload your background image(s), or enter them in manually using the text field above. Loading multiple background images will create a slideshow effect on the background of your page. To clear, delete the image URLs from the text field and save your page.', '__x__' ),
            'id'   => '_x_entry_bg_image_full',
            'type' => 'uploader',
            'std'  => ''
          ),
          array(
            'name' => __( 'Background Image(s) Fade', '__x__' ),
            'desc' => __( 'Set a time in milliseconds for your image(s) to fade in. To disable this feature, set the value to "0."', '__x__' ),
            'id'   => '_x_entry_bg_image_full_fade',
            'type' => 'text',
            'std'  => '750'
          ),
          array(
            'name' => __( 'Background Images Duration', '__x__' ),
            'desc' => __( 'Only applicable if multiple images are selected, creating a background image slider. Set a time in milliseconds for your images to remain on screen.', '__x__' ),
            'id'   => '_x_entry_bg_image_full_duration',
            'type' => 'text',
            'std'  => '7500'
          )
        )
      );
    
      x_add_meta_box( $meta_box );
    
    }
    
    add_action( 'add_meta_boxes', 'add_shopping_metaboxes' );
    
    function eat_init() {
    
      $slug = sanitize_title( get_theme_mod( 'x_custom_portfolio_slug' ) );
    
      //
      // Enable the custom post type.
      //
    
      $labels = array(
        'name'               => __( 'Eat', '__x__' ),
        'singular_name'      => __( 'Eat Item', '__x__' ),
        'add_new'            => __( 'Add New Item', '__x__' ),
        'add_new_item'       => __( 'Add New Eat Item', '__x__' ),
        'edit_item'          => __( 'Edit Eat Item', '__x__' ),
        'new_item'           => __( 'Add New Eat Item', '__x__' ),
        'view_item'          => __( 'View Item', '__x__' ),
        'search_items'       => __( 'Search Eat', '__x__' ),
        'not_found'          => __( 'No eat items found', '__x__' ),
        'not_found_in_trash' => __( 'No eat items found in trash', '__x__' )
      );
    
      $args = array(
        'labels'          => $labels,
        'public'          => true,
        'show_ui'         => true,
        'supports'        => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'author', 'custom-fields', 'revisions' ),
        'capability_type' => 'post',
        'hierarchical'    => false,
        'rewrite' => array( 'slug' => 'my-posts', 'with_front' => false ),
        'menu_position'   => 5,
        'has_archive'     => true
      );
    
      $args = apply_filters( 'portfolioposttype_args', $args );
    
      register_post_type( 'eat', $args );
    
      //
      // Register a taxonomy for eat tags.
      //
    
      $taxonomy_eat_tag_labels = array(
        'name'                       => __( 'Eat Tags', '__x__' ),
        'singular_name'              => __( 'Eato Tag', '__x__' ),
        'search_items'               => __( 'Search Eat Tags', '__x__' ),
        'popular_items'              => __( 'Popular Eat Tags', '__x__' ),
        'all_items'                  => __( 'All Eat Tags', '__x__' ),
        'parent_item'                => __( 'Parent Eat Tag', '__x__' ),
        'parent_item_colon'          => __( 'Parent Eat Tag:', '__x__' ),
        'edit_item'                  => __( 'Edit Eat Tag', '__x__' ),
        'update_item'                => __( 'Update Eat Tag', '__x__' ),
        'add_new_item'               => __( 'Add New Eat Tag', '__x__' ),
        'new_item_name'              => __( 'New Eat Tag Name', '__x__' ),
        'separate_items_with_commas' => __( 'Separate eat tags with commas', '__x__' ),
        'add_or_remove_items'        => __( 'Add or remove eat tags', '__x__' ),
        'choose_from_most_used'      => __( 'Choose from the most used eat tags', '__x__' ),
        'menu_name'                  => __( 'Eat Tags', '__x__' )
      );
    
      $taxonomy_eat_tag_args = array(
        'labels'            => $taxonomy_eat_tag_labels,
        'public'            => true,
        'show_in_nav_menus' => true,
        'show_ui'           => true,
        'show_tagcloud'     => true,
        'hierarchical'      => false,
        'rewrite' => array( 'slug' => 'my-posts', 'with_front' => false ),
        'show_admin_column' => true,
        'query_var'         => true
      );
    
      register_taxonomy( 'eat-tag', array( 'eat' ), $taxonomy_eat_tag_args );
    
      //
      // Register a taxonomy for eat categories.
      //
    
      $taxonomy_eat_category_labels = array(
        'name'                       => __( 'Eat Categories', '__x__' ),
        'singular_name'              => __( 'Eat Category', '__x__' ),
        'search_items'               => __( 'Search Eat Categories', '__x__' ),
        'popular_items'              => __( 'Popular Eat Categories', '__x__' ),
        'all_items'                  => __( 'All Eat Categories', '__x__' ),
        'parent_item'                => __( 'Parent Eat Category', '__x__' ),
        'parent_item_colon'          => __( 'Parent Eat Category:', '__x__' ),
        'edit_item'                  => __( 'Edit Eat Category', '__x__' ),
        'update_item'                => __( 'Update Eat Category', '__x__' ),
        'add_new_item'               => __( 'Add New Eat Category', '__x__' ),
        'new_item_name'              => __( 'New Eat Category Name', '__x__' ),
        'separate_items_with_commas' => __( 'Separate eat categories with commas', '__x__' ),
        'add_or_remove_items'        => __( 'Add or remove eat categories', '__x__' ),
        'choose_from_most_used'      => __( 'Choose from the most used eat categories', '__x__' ),
        'menu_name'                  => __( 'Eat Categories', '__x__' ),
      );
    
      $taxonomy_eat_category_args = array(
        'labels'            => $taxonomy_eat_category_labels,
        'public'            => true,
        'show_in_nav_menus' => true,
        'show_ui'           => true,
        'show_admin_column' => true,
        'show_tagcloud'     => true,
        'hierarchical'      => true,
        'rewrite'           => array( 'slug' => $slug . '-category', 'with_front' => false ),
        'query_var'         => true
      );
    
      register_taxonomy( 'eat-category', array( 'eat' ), $taxonomy_eat_category_args );
    
    }
    
    add_action( 'init', 'eat_init' );
    
    function enqueue_my_post_type_scripts() {
    
      wp_register_script( 'eat-isotope', get_template_directory_uri() . '/framework/js/vendor/isotope-1.5.25.min.js', array( 'jquery' ), NULL, true );
    
      if ( ! is_admin() ) {
        if ( is_post_type_archive( 'eat' ) ) {
          wp_enqueue_script( 'eat-isotope' );
        }
      }
    
    }
    
    add_action( 'wp_enqueue_scripts', 'enqueue_eat_scripts' );
    
    function add_my_post_type_metaboxes() {
    
      $meta_box = array(
        'id'          => 'x-meta-box-eat',
        'title'       => __( 'Eat Settings', '__x__' ),
        'description' => __( 'Select the appropriate options for your portfolio output.', '__x__' ),
        'page'        => 'eat',
        'context'     => 'normal',
        'priority'    => 'high',
        'fields'      => array(
          array(
            'name' => __( 'Body CSS Class(es)', '__x__' ),
            'desc' => __( 'Add a custom CSS class to the <body> element. Separate multiple class names with a space.', '__x__' ),
            'id'   => '_x_entry_body_css_class',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name'    => __( 'Media Type', '__x__' ),
            'desc'    => __( 'Select which kind of media you want to display for your portfolio. If selecting a "Gallery," simply upload your images to this post and organize them in the order you want them to display.', '__x__' ),
            'id'      => '_eat_media',
            'type'    => 'radio',
            'std'     => 'Image',
            'options' => array( 'Image', 'Gallery', 'Video' )
          ),
          array(
            'name'    => __( 'Featured Content', '__x__' ),
            'desc'    => __( 'Select "Media" if you would like to show your video or gallery on the index page in place of the featured image.', '__x__' ),
            'id'      => '_eat_index_media',
            'type'    => 'radio',
            'std'     => 'Thumbnail',
            'options' => array( 'Thumbnail', 'Media' )
          ),
          array(
            'name'    => __( 'Video Aspect Ratio', '__x__' ),
            'desc'    => __( 'If selecting "Video," choose the aspect ratio you would like for your video.', '__x__' ),
            'id'      => '_eat_aspect_ratio',
            'type'    => 'select',
            'std'     => '16:9',
            'options' => array( '16:9', '5:3', '5:4', '4:3', '3:2' )
          ),
          array(
            'name' => __( 'M4V File URL', '__x__' ),
            'desc' => __( 'If selecting "Video," place the URL to your .m4v video file here.', '__x__' ),
            'id'   => '_eato_m4v',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'OGV File URL', '__x__' ),
            'desc' => __( 'If selecting "Video," place the URL to your .ogv video file here.', '__x__' ),
            'id'   => '_eat_ogv',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'Embedded Video Code', '__x__' ),
            'desc' => __( 'If you are using something other than self hosted video such as YouTube, Vimeo, or Wistia, paste the embed code here. This field will override the above.', '__x__' ),
            'id'   => '_eat_embed',
            'type' => 'textarea',
            'std'  => ''
          ),
          array(
            'name' => __( 'Project Link', '__x__' ),
            'desc' => __( 'Provide an external link to the project you worked on if one is available.', '__x__' ),
            'id'   => '_eat_project_link',
            'type' => 'text',
            'std'  => ''
          ),
          array(
            'name' => __( 'Background Image(s)', '__x__' ),
            'desc' => __( 'Click the button to upload your background image(s), or enter them in manually using the text field above. Loading multiple background images will create a slideshow effect on the background of your page. To clear, delete the image URLs from the text field and save your page.', '__x__' ),
            'id'   => '_x_entry_bg_image_full',
            'type' => 'uploader',
            'std'  => ''
          ),
          array(
            'name' => __( 'Background Image(s) Fade', '__x__' ),
            'desc' => __( 'Set a time in milliseconds for your image(s) to fade in. To disable this feature, set the value to "0."', '__x__' ),
            'id'   => '_x_entry_bg_image_full_fade',
            'type' => 'text',
            'std'  => '750'
          ),
          array(
            'name' => __( 'Background Images Duration', '__x__' ),
            'desc' => __( 'Only applicable if multiple images are selected, creating a background image slider. Set a time in milliseconds for your images to remain on screen.', '__x__' ),
            'id'   => '_x_entry_bg_image_full_duration',
            'type' => 'text',
            'std'  => '7500'
          )
        )
      );
    
      x_add_meta_box( $meta_box );
    
    }
    
    

    Here’s my new custom post file:

    
    <?php
    
    /*
    Template Name: Shopping
    */
    
    ?>
    
    <?php $cols  = get_theme_mod( 'x_portfolio_columns' ); ?>
    <?php $count = get_theme_mod( 'x_portfolio_count' ); ?>
    
    <script>
    
      jQuery(document).ready(function($){
    
        var $container   = $('#x-iso-container');
        var $optionSets  = $('.option-set');
        var $optionLinks = $optionSets.find('a');
    
        $container.before('<span id="x-isotope-loading"><span>');
    
        $(window).load(function(){
          $container.isotope({
            itemSelector   : '.shopping',
            resizable      : true,
            filter         : '*',
            containerStyle : {
              overflow : 'visible',
              position : 'relative'
            },
            masonry : {
              columnWidth : $container.width() / <?php echo $cols; ?>
            }
          });
          $('#x-isotope-loading').stop(true,true).fadeOut(300);
          $('#x-iso-container .hentry').each(function(i){
            $(this).delay(i*150).animate({'opacity':1},300);
          });
        });
    
        $(window).smartresize(function(){
          $container.isotope({
            masonry : {
              columnWidth: $container.width() / <?php echo $cols; ?>
            }
          });
        });
    
        $optionLinks.click(function(){
          var $this = $(this);
          if ( $this.hasClass('selected') ) {
            return false;
          }
          var $optionSet = $this.parents('.option-set');
          $optionSet.find('.selected').removeClass('selected');
          $this.addClass('selected');
          var options = {},
              key   = $optionSet.attr('data-option-key'),
              value = $this.attr('data-option-value');
          value = value === 'false' ? false : value;
          options[ key ] = value;
          if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
            changeLayoutMode( $this, options );
          } else {
            $container.isotope( options );
          }
          return false;
        });
    
        $('.shopping-filters').click(function () {
          $(this).parent().find('ul').slideToggle(600, 'easeOutExpo');
        });
    
      });
    
    </script>
    
    <div id="x-iso-container" class="x-iso-container cols-<?php echo $cols; ?>">
    
      <?php
    
      $paged    = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
      $args     = array( 'post_type' => 'shopping', 'posts_per_page' => $count, 'paged' => $paged );
      $wp_query = new WP_Query( $args );
    
      ?>
    
      <?php if ( $wp_query->have_posts() ) : ?>
        <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
          <?php x_get_view( x_get_stack(), 'content', 'shopping' ); ?>
        <?php endwhile; ?>
      <?php endif; ?>
    
    </div>
    
    <?php pagenavi(); ?>
    <?php wp_reset_postdata(); ?>
    
    

    And then I have the single post file:

    
    
    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-SINGLE-X-shopping.PHP
    // -----------------------------------------------------------------------------
    // Single portfolio post output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-container-fluid max width offset cf">
        <div class="x-main full" role="main">
    
          <?php if ( have_posts() ) : ?>
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'integrity', 'content', 'portfolio' ); ?>
            <?php endwhile; ?>
            <?php if ( comments_open() ) : ?>
              <?php comments_template( '', true ); ?>
            <?php endif; ?>
          <?php endif; ?>
    
        </div> <!-- end .x-main.full -->
      </div> <!-- end .x-container-fluid.max.width.offset.cf -->
    
    <?php get_footer(); ?>
    
    

    Archive file

    
    <?php
    
    // =============================================================================
    // ARCHIVE-X-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Handles output the portfolio index page.
    //
    // Content is output based on which Stack has been selected in the Customizer.
    // To view and/or edit the markup of your Stack's index, first go to "views"
    // inside the "framework" subdirectory. Once inside, find your Stack's folder
    // and look for a file called "wp-archive-x-portfolio.php," where you'll be
    // able to find the appropriate output.
    // =============================================================================
    
    ?>
    
    <?php x_get_view( x_get_stack(), 'wp', 'archive-shopping' ); ?>
    
    

    I’m sorry to bother you – I’m sure I’m missing something really obvious but hopefully you’ll easily spot the problem and I can work things out for myself from there.

    Thanks so much

    #14958

    Kory
    Keymaster

    Hey Charlie,

    If you wouldn’t mind, please email us a link to a .zip file of your entire child theme that you’re using contact form as these snippets alone don’t provide us with enough information to know what the problem could be. Also, please provide a URL to this thread so we can reference it. Any other information you can send such as your WordPress login credentials and FTP credentials (in case we need them) would be greatly appreciated.

    Thanks!

    #15031

    Charlie C
    Participant
    This reply has been marked as private.
    #15063

    Christian
    Moderator

    Hey Charlie,

    We’ll look in to this and will get back as soon as we have a solution.

    Thanks.

    #15067

    Charlie C
    Participant

    Hey, do you not need me to email the zip? Thanks

    #15072

    Christian
    Moderator

    Yes, please use our contact form. . Also, please provide a URL to this thread so we can reference it.

    Thanks.

    #15825

    Charlie C
    Participant

    Hi, I’ve sent the stuff you need all over the place and just wanted to make sure it all got there!

    I sent some details on the contact form and the zipped child theme to the ‘info’ email address. Was that the right thing to do?

    Thanks

    #15851

    Rubin
    Keymaster

    Yep, we will look into this thanks!

    #16263

    Charlie C
    Participant

    Hi, I just wondered if a solution is looking unlikely for this problem because I’m going to have to come up with an alternative one asap otherwise. I’m looking at other isotope options and how to work them into my directory categories. Sorry to hassle but it’s been 48 hours now and I’m getting hassled!

    #16301

    Christian
    Moderator

    Hey Charlie,

    We will have a solution for this but we can’t guarantee it to be immediately as the extent of your request (advance theme customization) is not included in our support.

    We have listed this now as feature request and may include this feature in a future release.

    Please bear with us for a moment.

    Thank you.

    #16310

    Charlie C
    Participant

    Thanks so much! I do realise this is a huge request. I think this will be a very useful feature. C