Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1211327
    VanderWalMedia
    Participant

    Hello,

    I want to make the project link internal. Right now its an external features with target _blank. I want to use the button as a CTA to another page on the same website.

    Check here:
    http://www.liva-meubelen.nl/liva-collectie/living-model-rose/?jhg

    cheers

    #1211411
    Paul R
    Moderator

    Hi,

    To modify the project, you can add this in your child theme’s function.php.

    
    function my_portfolio_item_project_link() {
    
      $project_link  = get_post_meta( get_the_ID(), '_x_portfolio_project_link', true );
      $launch_title  = x_get_option( 'x_portfolio_launch_project_title' );
      $launch_button = x_get_option( 'x_portfolio_launch_project_button_text' );
    
      if ( $project_link ) :
    
      ?>
    
      <h2 class="h-extra launch"><?php echo $launch_title; ?></h2>
      <a href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block"><?php echo $launch_button; ?></a>
    
      <?php
    
      endif;
    
    }
    

    Then create file content-portfolio.php in wp-content/themes/x-child/framework/views/renew
    and copy the code below into that file.

    
    <?php
    
    // =============================================================================
    // VIEWS/RENEW/CONTENT-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Portfolio post output for Renew.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
      <?php if ( ! x_is_portfolio_item() ) : ?>
    
        <div class="entry-featured">
          <?php x_portfolio_item_featured_content(); ?>
          <div class="entry-cover">
            <div class="entry-cover-content">
              <span><?php echo get_post_meta( get_the_ID(), '_x_portfolio_media', true ); ?></span>
              <h2 class="entry-title entry-title-portfolio">
                <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
              </h2>
              <span><?php echo get_the_date( 'm.d.y' ); ?></span>
            </div>
          </div>
        </div>
    
      <?php endif; ?>
    
      <div class="entry-wrap cf">
    
        <?php if ( is_singular() ) : ?>
    
          <div class="entry-info">
            <div class="entry-featured">
              <?php x_featured_portfolio( 'cropped' ); ?>
            </div>
            <header class="entry-header">
              <h1 class="entry-title entry-title-portfolio"><?php the_title(); ?></h1>
              <?php x_renew_entry_meta(); ?>
            </header>
            <?php x_get_view( 'global', '_content', 'the-content' ); ?>
          </div>
          <div class="entry-extra">
            <?php x_portfolio_item_tags(); ?>
            <?php my_portfolio_item_project_link(); ?>
            <?php x_portfolio_item_social(); ?>
          </div>
    
        <?php endif; ?>
    
      </div>
    </article>
    

    Hope that helps.

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