Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1144350
    Sulli1432
    Participant

    Hey guys

    Been a while, been tinkering with other things lol Hopefully a quick question??

    I have the portfolio pages all set up running with no issues and have changed the project link title to ‘go to website’ forinstance. What I would like to do is add another button underneath that saying ‘make a booking’ is this possible by custom code?? Be cool to be able to add several things in here.. want to show an off site example ie a link to a clients website and a link to the respective spheres on google maps. Doesn’t flashy, just exactly what it is at the moment.

    example is.. https://candieyestudio.co.uk/portfolio-item/business/

    Also is there anyway of re ordering the portfolio index.. seem to have ended up with Glamour next to Family which probably ain’t too good!! lol

    Many thanks

    J

    #1144699
    Paul R
    Moderator

    Hi,

    It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

    With regards to order, the portfolio items are displayed from newest to oldest. You may edit the publish date to re-order it.

    Thanks for understanding. Take care!

    #1147970
    Sulli1432
    Participant

    Many thanks.. sorted the order issue, was hoping the other would be an easy one.

    Regards

    James

    #1147993
    Rue Nel
    Moderator

    Hello James,

    Thanks for the updates! To be able to add the additional button, what you are trying to accomplish requires a template customization, we would like to suggest that you use 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.

    Once you have your child theme active and ready, 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/CONTENT-PORTFOLIO.PHP
    // -----------------------------------------------------------------------------
    // Portfolio post output for Integrity.
    // =============================================================================
    
    $archive_share = x_get_option( 'x_integrity_portfolio_archive_post_sharing_enable' );
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
        <?php x_portfolio_item_featured_content(); ?>
      </div>
      <div class="entry-wrap cf">
    
        <?php if ( x_is_portfolio_item() ) : ?>
    
          <div class="entry-info">
            <header class="entry-header">
              <h1 class="entry-title entry-title-portfolio"><?php the_title(); ?></h1>
              <?php x_integrity_entry_meta(); ?>
            </header>
            <?php x_get_view( 'global', '_content', 'the-content' ); ?>
          </div>
          <div class="entry-extra">
            <?php x_portfolio_item_tags(); ?>
            <?php x_portfolio_item_project_link(); ?>
    
            
            <?php // Add your custom button here ?>
            <a href="#your-booking-link-here" title="Make a booking" class="x-btn x-btn-block" target="_blank">Make a booking</a>
    
            <?php x_portfolio_item_social(); ?>
          </div>
    
        <?php else : ?>
    
          <header class="entry-header">
            <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>
            <?php if ( $archive_share == '1' ) : ?>
              <?php x_portfolio_item_social(); ?>
            <?php endif; ?>
          </header>
    
        <?php endif; ?>
    
      </div>
    </article>

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

    Please let us know if this works out for you.

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