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

    Christopher
    Moderator

    Hi there,

    Please try this code :

    .single-post header.entry-header {
      top: 11%;
      position: absolute;
      z-index: 100;
    }

    Hope it helps.

    #270690

    Tristan A
    Participant

    Ok, thanks now it reappeared again.

    Only with the previous CSS I had a nice transparent band behind the header title. Also it would only appear on posts with a featured image. How come that code stopped working?

    .single .has-post-thumbnail .entry-featured {
    position: relative;
    }

    .single .has-post-thumbnail .entry-featured .entry-header {
    font-size: 14px;
    position: absolute;
    top: 45%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.35);
    padding: 20px;
    }

    #270724

    Christopher
    Moderator

    Hi there,

    Please try this one :

    .single-post header.entry-header {
      z-index: 100;
      font-size: 14px;
      position: absolute;
      top: 7%;
      width: 100%;
      margin: 0;
      background-color: rgba(255, 255, 255, 0.35);
      padding: 20px;
    }

    Hope it helps.

    #372627

    Can you provide the code for icon stack?

    #372859

    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup 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.

    Copy content.php from framework/views/icon and put it in the same path inside child theme, now replace existing code with the following:

    <?php
    
    // =============================================================================
    // VIEWS/ICON/CONTENT.PHP
    // -----------------------------------------------------------------------------
    // Standard post output for Icon.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-wrap">
        <?php x_icon_comment_number(); ?>
        <div class="x-container max width">
           <?php if ( !is_single() ): ?>
          <?php x_get_view( 'icon', '_content', 'post-header' ); ?>
        <?php endif; ?>
          <?php if ( has_post_thumbnail() ) : ?>
          <div class="entry-featured">
            <?php x_featured_image(); ?>
            <?php if (is_single() ): ?>
             <?php x_get_view( 'icon', '_content', 'post-header' ); ?>
           <?php endif; ?>
          </div>
          <?php endif; ?>
          <?php x_get_view( 'global', '_content' ); ?>
        </div>
      </div>
    </article>

    Please add the following code in Customize -> Custom -> CSS :

    .single .has-post-thumbnail .entry-featured {
    position: relative;
    }
    
    .single .has-post-thumbnail .entry-featured .entry-header {
    	font-size: 14px;
    	position: absolute;
    	top: 45%;
    	width: 100%;
    	background-color: rgba(255, 255, 255, 0.35);
    	padding: 20px;
    }

    Hope it helps.

    #885011

    kristianl
    Participant

    Hi there,

    Would this be possible to do with Pages too?

    Thanks

    #885720

    Christopher
    Moderator

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.