Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #158776
    DanielFenner
    Participant

    Just a simple question.

    I was wondering if it is possible to put some content above the Portfolio Masthead (Where it says “Sample page”) and below a slider? Can’t seem to figure out a way to do so.

    Also, is there a way to remove the “Sort Content” Button completely and just list the categories, saving a click?

    I’m using the integrity base theme, you can see where I’m up to here: http://danielfenner.com/

    #158884
    DanielFenner
    Participant

    Oops I forgot to take the under construction page off! It’s off now so hopefully someone can help me figure it out, last thing I need to finish the website and start putting content on 🙂

    #159055
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    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.

    Add this code at your child theme’s functions.php

    add_action('x_before_view_global__portfolio', 'the_content' );

    Then at your content at your page’s editor or by using visual composer.

    Cheers!

    #159197
    DanielFenner
    Participant

    Thanks for the reply but adding that to the functions.php doesn’t do anything.

    #159396
    Christopher
    Moderator

    Hi there,

    Please create template-layout-portfolio.php file inside YOUR CHILD THEME -> framework -> views -> integrity and add this code in there:

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/TEMPLATE-LAYOUT-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Portfolio page output for Integrity.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
    
      <div class="x-container-fluid max width offset cf">
        <div class="<?php x_main_content_class(); ?>" role="main">
        <?php echo do_shortcode ('[vc_row][vc_column][text_output]TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest[/text_output][/vc_column][/vc_row]'); ?>
    
          <?php x_get_view( 'global', '_portfolio' ); ?>
    
        </div>
    
        <?php get_sidebar(); ?>
    
      </div>
    
    <?php get_footer(); ?>

    Instead of [vc_row][vc_column][text_output]TestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTestTest[/text_output][/vc_column][/vc_row] put your shortcode.

    Hope it helps.

    #280187
    Meng
    Participant

    Thank you so much! But is there no way to simply refer to the page content to be inserted, rather than to define static content to be rendered there? That would make editing and changing the information a lot easier down the road, rather than altering the view template every time…

    Also, but using this method, the content is added below the “FILTER” button. I’d like to have my content above it, because it makes no sense to first see a filter button, then the introduction, and then the portfolio contents…

    #280363
    Rad
    Moderator

    Hi Meng,

    Instead of doing that, you can follow another workaround here https://theme.co/x/member/forums/topic/adding-static-content-to-portfolio-pages/#post-206209

    And instead of x_after_view_global__script-isotope-portfolio, it should be x_before_view_global__script-isotope-portfolio so your content will appear before the filter.

    Then add your portfolio page content through the editor or by visual composer.

    Thanks!

    #280706
    Meng
    Participant

    Hi there! Thanks for your advice. Unfortunately, following these instructions still results in the content displaying below the “FILTER” button.

    I removed the customized views and added the following code into functions.php of my child theme:

    add_action('x_before_view_global__script-isotope-portfolio', 'enable_content_p'); //portfolio
    
    	function enable_content_p () {
    		$page = get_page( get_the_ID());
    		echo '<div class="portfolio-page-content">'.apply_filters( 'the_content' , $page->post_content ).'</div>';
    	}
    
    #280870
    Rad
    Moderator

    Hi,

    In that case, let me check it too 🙂

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks!

    #280918
    Meng
    Participant
    This reply has been marked as private.
    #280968
    Lely
    Moderator

    Hello Meng,

    Before I can log in to wordpress admin it seems that authentication is required. Please do provide authentication Username and Password for that directory.

    Thank you.

    #280979
    Meng
    Participant
    This reply has been marked as private.
    #281014
    Rue Nel
    Moderator

    Hello There,

    Please discard all the suggested codes we gave in our previous replies. To be able to display a content above the filter button, you need to edit your landmark header file. To do this, please create a new file in your local computer. On the new file, please insert this code:

    <?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' ) == '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_get_view( 'global', '_content', 'the-content' ); ?>
    <?php x_portfolio_filters(); ?>
    </header>
    <?php endif; ?>
    <?php elseif ( x_is_shop() && x_get_option( 'x_integrity_shop_header_enable', '1' ) == '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; ?>

    Save this file as _landmark-header.php and upload this file to your server in your child theme’s folder wp-content/themes/x-child/framework/views/integrity/

    Please let us know if this works out for you.

    #281622
    Meng
    Participant

    Hey, thanks a lot! So it was the landmark header file after all, causing all that trouble. Do you think this file will change a lot over the coming updates? I hope I won’t have to keep manually adjusting it after future updates.

    Replacing it with your suggested file did not mend the situation. As a matter of fact, the content did not display at all, anymore. But I’ve found a cure!

    I replaced template-layout-portfolio.php with:

    <?php
    // =============================================================================
    // VIEWS/INTEGRITY/TEMPLATE-LAYOUT-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Portfolio page output for Integrity with content.
    // =============================================================================
    ?>
    <?php get_header(); ?>
    <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">
    <?php if ( $wp_query->have_posts() ) : ?>
    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    <?php x_get_view( 'global', '_content' ); ?>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php x_portfolio_filters(); ?>
    <?php x_get_view( 'global', '_portfolio' ); ?>
    </div>
    <?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>
    

    And I changed the following part of _landmark-header.php:

    <?php elseif ( x_is_portfolio() ) : ?>
    <?php if ( $disable_page_title != 'on' || $disable_filters != 'on' ) : ?>
    <?php if ( $disable_page_title != 'on' ) : ?>
    <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>
    </header>
    <?php endif; ?>
    <?php endif; ?>
    
    #281700
    Darshana
    Moderator

    Hi there,

    Glad you were able to find a solution. We cannot guarantee whether a certain template file or a module will be changed frequently or not. Time to time when you’re doing updates, you can use a software like KDiff to analyze the changes between the current version and the updated version.

    For detailed information, please go through the following post (https://community.theme.co//forums/topic/child-parent-theme-basics/#post-140278).

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-158776 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>