Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1311821

    werbar77
    Participant

    Hi X-Men,

    Thanks for all the great support.

    I was wondering how would I go about to insert an intro paragraph between the portfolio header and sort portfolio box?

    Your help as always is much appreciated.

    Thanks,
    Werner

    #1312106

    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    First, would you mind sharing us your link of your portfolio page and a screenshot that you want to add the intro paragraph.

    Lastly, You could check the link below for sample on how to customize portfolio pages.

    Customise Portfolio pages

    Customize portfolio Page

    hope it helps.

    Let us know how it goes.

    Thanks.

    #1312144

    werbar77
    Participant

    Hi,

    Thanks for the reply.

    Attached are two pics.

    One is my current portfolio page.

    The other is my welcome page.

    I want to insert a paragraph on my portfolio page below the header similar to the welcome page.

    Your help is appreciated.
    Werner

    #1312214

    Rue Nel
    Moderator

    Hello There,

    Thank you for the clarifications. To resolve this issue, since you have your child theme active and ready already, 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/INTEGRITY/_LANDMARK-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Handles content output of large headers for key pages such as the blog or
    // search results.
    // =============================================================================
    
    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    $disable_filters    = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true );
    
    ?>
    
    <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable' ) == '1' ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p>
      </header>
    
    <?php elseif ( is_search() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>&ldquo;'; the_search_query(); echo '&rdquo;</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_category() || x_is_portfolio_category() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
      </header>
    
    <?php elseif ( x_is_product_category() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
      </header>
    
    <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p>
      </header>
    
    <?php elseif ( x_is_product_tag() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p>
      </header>
    
    <?php elseif ( is_404() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p>
      </header>
    
    <?php elseif ( is_year() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_month() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_day() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( x_is_portfolio() ) : ?>
      <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?>
    
        <header class="x-header-landmark x-container max width">
          <?php if ( $disable_page_title != 'on' ) : ?>
            <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
          <?php endif; ?>
          <?php x_portfolio_filters(); ?>
        </header>
    
        <!-- Custom portfolio text starts here -->
        <div class="custom-portfolio-text">
        	<p>Add your custom paragraph here</p>
        	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer scelerisque eros eu pulvinar dictum. Nunc egestas massa at elit bibendum, cursus fringilla nunc faucibus. Proin dignissim efficitur nunc a cursus. In luctus mi in nisi condimentum, sed ornare enim tempor. Praesent semper ultricies tellus, rutrum fermentum leo viverra at. Sed a venenatis ante, non aliquam tortor. Aliquam erat volutpat. Curabitur felis elit, rhoncus et molestie in, auctor euismod lorem. Etiam viverra hendrerit metus, vitae ullamcorper metus ultricies ut. Ut eu ex id ligula viverra auctor at quis urna.</p>
        </div>
        <!-- Custom portfolio text ends here -->
    
      <?php endif; ?>
    <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable' ) == '1' ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p>
      </header>
    
    <?php elseif ( x_is_buddypress() ) : ?>
      <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>
    
        <header class="x-header-landmark x-container max width">
          <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>
          <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p>
        </header>
    
      <?php endif; ?>
    <?php endif; ?>

    Feel free to change the custom text.

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

    We would loved to know if this has work for you. Thank you.

    #1312242

    werbar77
    Participant

    Hi Rue,

    Thanks it has worked, but there are two modifications I would like to have. Please see pic as reference.

    1. I want the paragraph to be between the header and the “sort properties” tab.

    2. I want the paragraph to have some padding on left and right to be in line with the post photos beneath it.

    Thanks you are a super star!

    #1312249

    Christopher
    Moderator

    Hi there,

    Please update your code to :

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP
    // -----------------------------------------------------------------------------
    // Handles content output of large headers for key pages such as the blog or
    // search results.
    // =============================================================================
    
    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    $disable_filters    = get_post_meta( get_the_ID(), '_x_portfolio_disable_filtering', true );
    
    ?>
    
    <?php if ( is_home() && x_get_option( 'x_integrity_blog_header_enable' ) == '1' ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_blog_title' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_blog_subtitle' ); ?></span></p>
      </header>
    
    <?php elseif ( is_search() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll see everything we could locate for your search of ", '__x__' ); echo '<strong>&ldquo;'; the_search_query(); echo '&rdquo;</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_category() || x_is_portfolio_category() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
      </header>
    
    <?php elseif ( x_is_product_category() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
      </header>
    
    <?php elseif ( is_tag() || x_is_portfolio_tag() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all posts that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p>
      </header>
    
    <?php elseif ( x_is_product_tag() ) : ?>
    
      <?php
    
      $meta     = x_get_taxonomy_meta();
      $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Tag Archive', '__x__' );
      $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been tagged as ", '__x__' ) . '<strong>&ldquo;' . single_tag_title( '', false ) . '&rdquo;</strong>';
    
      ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo $subtitle; ?></span></p>
      </header>
    
    <?php elseif ( is_404() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "You blew up the Internet. ", '__x__' ); ?></span></p>
      </header>
    
    <?php elseif ( is_year() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_month() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F, Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( is_day() ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php _e( "Below you'll find a list of all posts from ", '__x__' ); echo '<strong>'; echo get_the_date( 'F j, Y' ); echo '</strong>'; ?></span></p>
      </header>
    
    <?php elseif ( x_is_portfolio() ) : ?>
      <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?>
    
        <header class="x-header-landmark x-container max width">
          <?php if ( $disable_page_title != 'on' ) : ?>
            <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
          <?php endif; ?>
       
    
        <!-- Custom portfolio text starts here -->
        <div class="custom-portfolio-text">
        	<p>Add your custom paragraph here</p>
        	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer scelerisque eros eu pulvinar dictum. Nunc egestas massa at elit bibendum, cursus fringilla nunc faucibus. Proin dignissim efficitur nunc a cursus. In luctus mi in nisi condimentum, sed ornare enim tempor. Praesent semper ultricies tellus, rutrum fermentum leo viverra at. Sed a venenatis ante, non aliquam tortor. Aliquam erat volutpat. Curabitur felis elit, rhoncus et molestie in, auctor euismod lorem. Etiam viverra hendrerit metus, vitae ullamcorper metus ultricies ut. Ut eu ex id ligula viverra auctor at quis urna.</p>
        </div>
        <!-- Custom portfolio text ends here --> 
          <?php x_portfolio_filters(); ?>
        </header>
    
      <?php endif; ?>
    <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable' ) == '1' ) : ?>
    
      <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1>
        <p class="p-landmark-sub"><span><?php echo x_get_option( 'x_integrity_shop_subtitle' ); ?></span></p>
      </header>
    
    <?php elseif ( x_is_buddypress() ) : ?>
      <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>
    
        <header class="x-header-landmark x-container max width">
          <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>
          <p class="p-landmark-sub"><span><?php echo x_buddypress_get_the_subtitle(); ?></span></p>
        </header>
    
      <?php endif; ?>
    <?php endif; ?>
    

    Hope it helps.

    #1312260

    werbar77
    Participant

    Thanks it worked, you guys are awesome!

    How would I go about to make the text in the paragraph a little bit bigger and the space between the lines a bit narrower?

    #1312263

    Christopher
    Moderator

    Hi there,

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

    .custom-portfolio-text p {
        margin-bottom: 0;
        font-size: 18px;
    }

    Hope that helps.

    #1312273

    werbar77
    Participant

    Fabulous! Thanks!

    #1312279

    Christopher
    Moderator

    You’re welcome.