Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1044628
    sininvierno
    Participant

    Hello, I’m getting my content ready for my portfolio section. However, i can’t find the equivalent to the Blog Posts page for my Portfolio Items anywhere. Should it be there somewhere or do I have to create it from scratch? How should I do that? Here’s what I mean: http://theme.co/x/demo/integrity/3/portfolio/

    #1044693
    Rupok
    Member

    Hi there,

    Thanks for writing in! You need to create a page and set the layout “Layout – Portfolio” to display all your portfolio items there. There is already a setup guide on the Knowledge base – https://community.theme.co/kb/portfolios/

    I’d suggest you to explore the Knowledge Base first if you get any question. You can also search on our forum as most of the issues already discussed. It will help you to get the answer quickly. If you still have any question, we’ll be always there for you.

    Cheers!

    #1046471
    sininvierno
    Participant

    Thanks, now I have setup the Portfolio Layout page, but I can’t add a short intro paragraph to it or edit it with Cornerstone. I’d like to add an introductory paragraph and to be able to change the “Sort Portfolio” text to something else… is this possible?

    Thank you!

    #1046548
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you have your child theme active and ready, please follow the following steps below:
    1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
    2] Insert the following code into that new file

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Includes the portfolio output.
    // =============================================================================
    
    $stack    = x_get_stack();
    $entry_id = get_the_ID();
    $paged    = ( is_front_page() ) ? get_query_var( 'page' ) : ( ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1 );
    $cols     = get_post_meta( $entry_id, '_x_portfolio_columns', true );
    $count    = get_post_meta( $entry_id, '_x_portfolio_posts_per_page', true );
    $filters  = get_post_meta( $entry_id, '_x_portfolio_category_filters', true );
    
    switch ( $cols ) {
      case 'One'   : $cols = 1; break;
      case 'Two'   : $cols = 2; break;
      case 'Three' : $cols = 3; break;
      case 'Four'  : $cols = 4; break;
    }
    
    ?>
    
    <?php while ( have_posts() ) : the_post(); ?>
      <?php x_get_view( 'integrity', 'content', 'page' ); ?>
      <?php x_get_view( 'global', '_comments-template' ); ?>
    <?php endwhile; ?>
    
    <?php wp_reset_query(); ?>
    
    <?php x_get_view( 'global', '_script', 'isotope-portfolio' ); ?>
    
    <div id="x-iso-container" class="x-iso-container x-iso-container-portfolio cols-<?php echo $cols; ?>">
    
      <?php
    
      if ( count( $filters ) == 1 && in_array( 'All Categories', $filters ) ) {
    
        $args = array(
          'post_type'      => 'x-portfolio',
          'posts_per_page' => $count,
          'paged'          => $paged
        );
    
      } else {
    
        $args = array(
          'post_type'      => 'x-portfolio',
          'posts_per_page' => $count,
          'paged'          => $paged,
          'tax_query'      => array(
            array(
              'taxonomy' => 'portfolio-category',
              'field'    => 'term_id',
              'terms'    => $filters
            )
          )
        );
    
      }
    
      $wp_query = new WP_Query( $args );
    
      ?>
    
      <?php if ( $wp_query->have_posts() ) : ?>
        <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
          <?php if ( $stack != 'ethos' ) : ?>
            <?php x_get_view( $stack, 'content', 'portfolio' ); ?>
          <?php else : ?>
            <?php x_ethos_entry_cover( 'main-content' ); ?>
          <?php endif; ?>
        <?php endwhile; ?>
      <?php endif; ?>
    
    </div>
    
    <?php pagenavi(); ?>
    <?php wp_reset_query(); ?>

    3] Save the file named as _portfolio.php
    4] Upload this file to your server in the child theme’s folder
    wp-content/themes/x-child/framework/views/global/

    Hope this helps.

    #1060525
    sininvierno
    Participant

    Hello Rue

    Thanks for the instructions!
    Unfortunately, the result doesn’t seem to be right. Portfolio index page now doesn’t show any content at all.
    I attach the .php I created with your code and here’s how the page looks now:
    http://sininvierno.com/835-2/

    Please let me know if I did something wrong or how to correct this, thanks!! 🙂

    #1060786
    Lely
    Moderator

    Hello There,

    Upon checking, there is a console error.
    You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time. If this doesn’t work, please also try removing any third party codes added on your site so we can check what stopping the masonry from loading.

    Hope this helps.

    #1061875
    sininvierno
    Participant

    Lely, ok… but it was working just fine before I changed the code. I’ll do the plugins thing and let you know

    Thanks

    #1062109
    Jade
    Moderator

    You’re welcome.

    Please feel free to let us know how it goes.

    #1077656
    sininvierno
    Participant

    Hello Jade

    The portfolio index test page is still not working although I have deactivated all plugins I can afford to deactivate.
    http://sininvierno.com/835-2/

    I also noticed something interesting. Now, when you go to the Category index for any of the Blog’s Categories, the page loads as the portfolio would. They didn’t use to load like that.
    Not that I mind, I like it… but the masonry is working just fine in that case: http://sininvierno.com/category/etimologias/

    Any ideas? If not, just tell me how to revert the change I made in the child theme so I can upload my content to the portfolio even though it will have the limitations it did before, I need to start getting this stuff online anyway…

    #1078714
    Rad
    Moderator

    Hi there,

    Your portfolio page is cut off (broken), and javascript aren’t loaded. It breaks of here

        <header class="x-header-landmark x-container max width">
                  <h1 class="h-landmark"><span>La Nube TrampolĂ­n</span></h1>
                    </header>
    
      
      <div class="x-container max width offset">
        <div class="x-main left" role="main">
    
          <script type='text/javascript' src='http://stats.wp.com/e-201627.js' async defer></script>
    <script type='text/javascript'>
    	_stq = window._stq || [];
    	_stq.push([ 'view', {v:'ext',j:'1:3.9.7',blog:'108561350',post:'835',tz:'0',srv:'sininvierno.com'} ]);
    	_stq.push([ 'clickTrackerInit', '108561350', '835' ]);
    </script>

    It’s either internal error, or empty template. Please provide your FTP login credentials for further investigation.

    Thanks!

    #1078850
    sininvierno
    Participant
    This reply has been marked as private.
    #1079023
    Christopher
    Moderator

    Hi there,

    Before we continue, please update X to v4.6.0 and CS to v1.3.0.

    Thanks.

    #1082536
    sininvierno
    Participant

    Updated. Let me know how we continue

    Thanks!

    #1082869
    Christopher
    Moderator

    Hi there,

    Please update cornerstone as well and provide us with login credentials.

    Thanks.

    #1084994
    sininvierno
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-1044628 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>