Portfolio Page Widget addition for Integrity

Hi!

I’d like to take tags and share out and replace with other widgets. How can I do this? I do not want to reduce the full width and use sidebars. I simply want swap out tags and share with my own widgets. possible?

Thanks so much!
Christina

Hey Christina,

Thank you for reaching out to us. First setup a child theme (see https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57) then create a new file content-portfolio.php and paste the following code in there:

<?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 echo '<h2>Your Title</h2>'; ?>
        <?php echo do_shortcode('YOUR SHORTCODE HERE'); ?>
      </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>

On line # 29 & 30 find these lines:

<?php echo '<h2>Your Title</h2>'; ?>
<?php echo do_shortcode('YOUR SHORTCODE HERE'); ?>

And replace them with your widget’s shortcode or your own custom code. You can then upload the file to /x-child/framework/views/integrity directory in your child theme via FTP. If you don’t find any folder in your child theme then create one to have the same path

Hope this helps!

Thank you very much - I will give it a try,

Not working?

from the plugin says this: Add via php API:
global $wpb;
echo $wpb->bookmark();

how do I add to this code? I am not fluent in php

<?php echo '

Save to Your Collection

'; ?> <?php echo do_shortcode ( $wpb->bookmark(); ?>

Hi Christina,

No, it is not. You will have to use a shortcode inside the do_shortcode function.

Most widgets should have shortcodes but it also depends what kind of widgets you want to place in that area. If you can let us know what widgets you’re looking at, we will be able to provide a more accurate suggestion.

Thank you.

This worked - thanks!

<?php echo '

Your Title

'; ?> <?php echo do_shortcode('[bookmark]'); ?>

Glad to hear that :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.