Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #866145

    venya
    Participant

    Hello,
    I need some help getting a portfolio single sidebar to appear.

    Using the polylang plugin, I have the site in 2 languages. I believe I have sidebar settings setup correctly, but my portfolio single pages in second language have no sidebar.

    On English site portfolio single pages correctly use “Multimedia Portfolio sidebar”.
    I would like to use “Multimedia Sidebar – Russian” sidebar for the Russian portfolio single pages.

    Thank you.

    #866153

    venya
    Participant
    This reply has been marked as private.
    #866957

    Christian
    Moderator

    Hey there,

    Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

    Also, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Thank you for your understanding.

    #867039

    venya
    Participant

    Thanks. I had a the same problem with no sidebars on english langauge pages and Themeco support told me to create a wp-single-x-portfolio.php file with the following code.

    I had hopes a solution just involved a minor edit…

    <?php

    // =============================================================================
    // VIEWS/INTEGRITY/WP-SINGLE-X-PORTFOLIO.PHP
    // —————————————————————————–
    // Single portfolio post output for Integrity.
    // =============================================================================

    ?>

    <?php get_header(); ?>

    <div class=”x-container max width offset cf”>
    <div class=”x-main right” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>
    <?php x_get_view( ‘integrity’, ‘content’, ‘portfolio’ ); ?>
    <?php x_get_view( ‘global’, ‘_comments-template’ ); ?>
    <?php endwhile; ?>

    </div>
    <aside class=”<?php x_sidebar_class(); ?>” role=”complementary”>
    <?php dynamic_sidebar( ‘ups-sidebar-multimedia-portfolio’ ); ?>
    </aside>
    </div>

    <?php get_footer(); ?>

    Thank you.

    #867524

    Paul R
    Moderator

    Hi,

    You can try adding this in your child theme’s functions.php file.

    
    add_filter( 'ups_sidebar', 'russian_sidebar', 9999 );
    
    function russian_sidebar ( $default_sidebar ) {
    if (get_locale() == "ru_RU" && is_singular('x-portfolio')) {
        return 'ups-sidebar-multimedia-sidebar-russian';
      }
    
    return $default_sidebar;
    }
    

    Hope that helps.

    #867903

    venya
    Participant

    Hello Paul,
    Thanks for your suggestion. Unfortunately adding the code to function.php did not make the sidebar appear. Do you have any other suggestions? 🙂

    Also, I have another small question. I’m trying to remove the category meta tag from blog posts.

    Currently it displays DATE / CATEGORY

    I used the code below to remove category and am left with DATE / How can I remove the “/” after the date?

    .p-meta span:nth-child(3) {
    display: none;
    }

    Thank you!

    #868752

    Paul R
    Moderator

    Hi,

    1. I was able to fix the sidebar by changing the code in wp-single-x-portfolio.php to this

    
    
    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/WP-SINGLE-X-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Single portfolio post output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
      
      <div class="x-container max width offset cf">
        <div class="x-main right" role="main">
    
          <?php while ( have_posts() ) : the_post(); ?>
            <?php x_get_view( 'integrity', 'content', 'portfolio' ); ?>
            <?php x_get_view( 'global', '_comments-template' ); ?>
          <?php endwhile; ?>
    
        </div>
        <aside class="<?php x_sidebar_class(); ?>" role="complementary">
        <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?>
          <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'ups-sidebar-multimedia-portfolio' ) ); ?>
        <?php else : ?>
          <?php dynamic_sidebar( 'ups-sidebar-multimedia-portfolio' ); ?>
        <?php endif; ?>    
        </aside>
      </div>
    
    <?php get_footer(); ?>
    
    

    2. To remove the slash, you can add this under Custom > CSS in the Customizer.

    
    .p-meta>span:after {
        display:none;
    }
    

    Hope that helps.