Blog Carousel Missing Again after Latest Update and Cornerstone not Right

Hi Guys!

So, we really want to be able to trust these updates, but every time we update we have to redo our entire site and haven’t been able to figure out why it keeps getting messed up. The site is http://zenwoman.com

  1. The footer content and top bar font should be white on violet - top bar “statement” and social icons - but when we update the theme, it keeps changing the colors to a lighter violet on violet, making it barely visible. We can’t find where this exists to change it back to white…though we remember going through this before.

  2. We had set up an entire method of having the Ethos post carousel be clickable to specific blog posts based on category and now the entire carousel is gone, but also before the update the clickable photos to the various blog posts didn’t work anymore since the last update. We gave up on trying to fix it, but now given the problem is worse, it needs to be addressed for sure. The entire carousel is just not showing up…at least on a Mac using Google Chrome.

  3. The Blog page is not editable with Cornerstone anymore either. Not sure why this is the case.

It’s a real problem as we go forward for launch…luckily we’re still essentially in beta…but we need to find out, given we use a Child Theme, why this keeps happening. We would appreciate someone going in and investigating to see why it’s happening because we can’t keep taking days to fix every time.

Thank you

Hi there,

Thanks for writing in.

We strongly recommend testing updates in a staging site (clone of the live site). It’s a bad practice to always apply the updates and maintenance directly to the live site as anything could go wrong. There is a case that it’s just due to internal cache and it ruins the entire site but re-saving the existing setting (theme options) fixed it.

  1. Question, how did you change your footer color before? That’s because there is nothing in your CSS that changes the footer text color.

The top bar color is white so it’s working. Except for social icons and footer text, you don’t have CSS for that. Are you sure it was white before? But if you wish to make them white then this CSS is what you need

.x-social-global a, .x-colophon.bottom .x-colophon-content, .x-colophon.bottom .x-nav li a {
color: #fff;
}
  1. In that case, please restore your live site to its previous state where it still works. Then clone it to staging where you can update the theme and its plugin. I can’t provide any answer on this as I’m not sure how it was customized. I need some comparison to see what’s changed after the update.

  2. Blog page and any archive page are not really editable ever since. Perhaps you have a customization? We can’t provide support to any custom code, and any customization has a potential not to work in the future especially it’s not intended to function like that.

We’ll see more once your site is restored and the staging is available.

Thanks!

Hi Rad,

I appreciate the response and suggestion of cloning the site to a stage area. Meanwhile, evidently, it was simply that the Child Theme was no longer activated and somehow the update activated the Main theme instead. Everything is resolved in terms of the custom CSS, but thanks for the code and we have it as a back-up. Two things are still not functional, and given they were customized by your dev team, we’d like to find out why they stopped working. We don’t have the bandwidth to figure it out unfortunately given the complexity of the way the carousel and blog functions.

  1. On the Blog Page there is a filter that defaults to one of our categories, instead of “All”. I’m not sure if there’s a way to change that default setting for the filter and not sure where we change that for that page. You can see it here: http://zenwoman.com/blog-2/ Right now it’s set to “Abundance” instead of “All”.

  2. The blog carousel was at one point working where you’d click on a photo such as “Be Abundant” and it would go to a page with all the posts under that category. Essentially it was serving as a dynamic menu. Couldn’t tell you which of the theme updates made it stop because we didn’t notice when it stopped working. It’s been a while. The original code that we were given was by your dev team to create this in the first place. Is it possible to find out what would give it that functionality so that we can just paste it in to make it work. We have all the posts categorized and it should be a relatively easy fix. Just not sure why it stopped placing the posts into each individual page we created as before per your team’s suggestion. :slight_smile:

Thanks for all your help!

One thing I just realized in trying to update one of the pages in the site is that Cornerstone isn’t working properly. It says there’s a conflict on the front end of the site. Not sure what could be causing that either.

Hi There,

1.) The categories are alphabetically sorted that is why Abundance is the first.
Ethos filterable index uses get_categories() http://codex.wordpress.org/Function_Reference/get_categories

The only available sorting are

id
name – default
slug
count
term_group

The file responsible for that display is this: wp-content\themes\x\framework\views\ethos_index.php

Feel free to copy that file on your child theme and customize accordingly.

2.)The blog carousel is working. It is the blog slider that is blank when I check. We need to see your setup.
That will happen if you have chosen Featured on Blog Slider Settings

With that settings, make sure that on a post settings of specific blog you want to display on the slider, you have enabled checkbox for Post Slider Display – Blog

If there’s not post with that settings check, yes, slider will have no content and thus appear white.

I tried to login to check the issue, unfortunately, the credentials is wrong. Please double check.

Hi There,

I updated the password on the attached secure note to this thread, so it should work now. Having checked the suggested settings, I realized the Blog Slider was activated unnecessarily. That isn’t the issue. The issue is that on each of the Pages that the Categories are attached to there is introductory content/text explaining the category before you get to the list of posts that should fall under that category. No matter the page, you can also no longer edit that content with Cornerstone without getting the same conflict message (see image within this thread).

So, for example: http://zenwoman.com/be-balanced/, you don’t see anything written there. Nothing is visible on that page other than the title. When you try to edit the Be Balanced page it then goes to: http://zenwoman.com/x/#/content/172/layout and tries to open Cornerstone, but can’t, saying there is a conflict. I haven’t made any changes to these types of pages that categorize the blog posts for over 2 years. So, I don’t know why now there is an issue. If someone can go in the back end and fix this, that would be great. Essentially, it’s pretty simple: The Blog Carousel has categories, when you click on the photo it should take you to the appropriate page, so again, Be Balanced should go to the Be Balanced Page and you should see a couple blog posts under that category after a brief introductory paragraph with an icon on top. You can see the actual content if you go to view text probably. It’s the same across the board for all pages within this structure, so my feeling is something else is causing this to suddenly not work anymore since the latest theme updates.

Please see what you can do to figure out what may be causing this, since it’s definitely part of the reason we got this theme in the first place.

Thank you!!

Hello There,

Thank you for the clarifications. I have investigated your page http://zenwoman.com/be-balanced/ and I found out that the content is not displaying. There is an on going fatal error on the page. Could you please enable the debug mode so that we can figure out what is this error all about? You can do this by opening wp-config.php and adding define( 'WP_DEBUG' , true ); just above /* That's all, stop editing! Happy blogging. */.

https://codex.wordpress.org/Editing_wp-config.php

When you revisit the page, you should have some error output describing the issue in more detail. Please share the error or even provide the ftp access in your next reply so that we can resolve the issue immediately.

Please let us know how it goes.

Okay, so this was the error message after I set debug to true.

Fatal error: Call to undefined function csl18n() in /home/zencierg/zenwoman.com/wp-content/themes/x-child/functions.php on line 119

Let me know if that’s something I can resolve first before determining ftp access. Thanks.

Hi There,

Your error is related to some custom code that you have added to your child theme. You need to check the code or contact your developer to resolve this issue.

Thanks!

The only code within my child theme was given to me by someone in your department, perhaps a couple years ago now. I haven’t had any other developer on this project thus far. It’s all been provided by your group, because for the most part the theme has been working and hasn’t needed an outside developer other than myself up until now. However, since the last couple of updates, it seems to have damaged the functionality of this particular set-up that was given to me by your team. I wouldn’t know how to recognize the code error if I looked for it, so any other suggestions? I’d rather not put it on some outside party who didn’t build it in the first place. Thanks!

Hi There,

Sorry for the inconvenience caused. Could you please copy the code in your functions.php file into a code sharing site like (https://pastebin.com/) and share the link here using a secure note, so that we can look into your issue.

Thanks!

Hi There,

Got your secure note. Could you please try updating your child theme’s functions.php file with the following code.

<?php
// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );


// Additional Functions
// =============================================================================

// Entry Cover
// =============================================================================

if ( ! function_exists( 'x_ethos_entry_cover' ) ) :
function x_ethos_entry_cover( $location ) {

if ( $location == 'main-content' ) { ?>

  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
      <h2 class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2>
    </a>
  </article>

<?php } elseif ( $location == 'post-carousel' ) { ?>

  <?php GLOBAL $post_carousel_entry_id; ?>

  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
      <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2>
      <div class="x-post-carousel-meta">
        <span class="entry-cover-categories">Click Here</span>
      </div>
    </a>
  </article>

<?php }
  }
endif;

// Custom Recent Posts
// =============================================================================


function x_shortcode_recent_posts_with_excerpts( $atts ) {
  extract( shortcode_atts( array(
    'id'           => '',
    'class'        => '',
    'style'        => '',
    'type'         => 'post',
    'count'        => '',
    'category'     => '',
    'offset'       => '',
    'orientation'  => '',
    // 'show_excerpt' => 'true',
    'no_sticky'    => '',
    'no_image'     => '',
    'fade'         => ''
  ), $atts, 'x_recent_posts' ) );

  $allowed_post_types = apply_filters( 'cs_recent_posts_post_types', array( 'post' => 'post' ) );
  $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : 'post';

  $id            = ( $id           != ''     ) ? 'id="' . esc_attr( $id ) . '"' : '';
  $class         = ( $class        != ''     ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf';
  $style         = ( $style        != ''     ) ? 'style="' . $style . '"' : '';
  $count         = ( $count        != ''     ) ? $count : 3;
  $category      = ( $category     != ''     ) ? $category : '';
  $category_type = ( $type         == 'post' ) ? 'category_name' : 'portfolio-category';
  $offset        = ( $offset       != ''     ) ? $offset : 0;
  $orientation   = ( $orientation  != ''     ) ? ' ' . $orientation : ' horizontal';
  // $show_excerpt  = ( $show_excerpt == 'true' );
  $no_sticky     = ( $no_sticky    == 'true' );
  $no_image      = ( $no_image     == 'true' ) ? $no_image : '';
  $fade          = ( $fade         == 'true' ) ? $fade : 'false';

  $js_params = array(
    'fade' => ( $fade == 'true' )
  );

  $data = cs_generate_data_attributes( 'recent_posts', $js_params );

  $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} {$data} data-fade=\"{$fade}\" >";

    $q = new WP_Query( array(
      'orderby'             => 'date',
      'post_type'           => "{$type}",
      'posts_per_page'      => "{$count}",
      'offset'              => "{$offset}",
      "{$category_type}"    => "{$category}",
      'ignore_sticky_posts' => $no_sticky
    ) );

    if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post();

      if ( $no_image == 'true' ) {
        $image_output       = '';
        $image_output_class = 'no-image';
      } else {
        $image              = wp_get_attachment_image_src( get_post_thumbnail_id(), 'entry-cropped' );
        $bg_image           = ( $image[0] != '' ) ? ' style="background-image: url(' . $image[0] . ');"' : '';
        $image_output       = '<div class="x-recent-posts-img"' . $bg_image . '></div>';
        $image_output_class = 'with-image';
      }

      // $excerpt = ( $show_excerpt ) ? '<div class="x-recent-posts-excerpt"><p>' . preg_replace('/<a.*?more-link.*?<\/a>/', '', cs_get_excerpt_for_social() ) . '</p></div>' : '';

      $output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( csi18n('shortcodes.recent-posts-permalink'), the_title_attribute( 'echo=0' ) ) ) . '">'
                 . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">'
                   . '<div class="entry-wrap">'
                     . $image_output
                     . '<div class="x-recent-posts-content">'
                       . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>'
                       . '<span class="x-recent-posts-date">' . get_the_date() . '</span>'
                       . '<span class="x-recent-posts-excerpt">' .  strip_tags(limited_excerpt(2000))  . '</span>'
                     . '</div>'
                   . '</div>'
                 . '</article>'
               . '</a>';

    endwhile; endif; wp_reset_postdata();

  $output .= '</div>';

  return $output;
}

function limited_excerpt($limit) {
   $excerpt = explode(' ', get_the_excerpt(), $limit);
   if (count($excerpt)>=$limit) {
      array_pop($excerpt);
      $excerpt = implode(" ",$excerpt).'.';
   } else {
      $excerpt = implode(" ",$excerpt);
   }
   //$excerpt = preg_replace('<code>[[^]]*]</code>','',$excerpt);
   return $excerpt;
}

add_action('wp', 'change_recent_posts_with_except');
function change_recent_posts_with_except() {
    remove_shortcode( 'x_recent_posts' );
    add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_with_excerpts' );
}

Hope that helps.

March 2021 Update: The above code example has been adjusted to account for a change to a function name.

It worked!! Yay!! Thank you so much for all your patience and help with this. :slight_smile:

Hi there, glad that we could be of a help :slight_smile:

It is strongly recommended that for additional questions customers open up separate threads. That will help both us and other customers that might have the same issue find the proper information sooner.

Thank you.