How to remove the URL field in the comments field?

But how can I add project description? Does the given custom fields also don’t work?
Also, how to make the “See it live” fields link nofollow?

Hi.

  1. You can 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 x_portfolio_item_project_link(); ?>
        <?php x_portfolio_item_social(); ?>
      </div>

    <?php endif; ?>

  </div>
</article>

You can then add your Custom field to that code

echo get_post_meta($post->ID, 'Description', true);
  1. To add no follow to see it live link.

Go to wp-content\themes\x\framework\functions\global, then open portfolio.php and edit this line of code.

Line no 237

  <a href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block" target="_blank"><?php echo $launch_button; ?></a>

to

  <a rel="nofollow" href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block" target="_blank"><?php echo $launch_button; ?></a>

Hope that helps.

To add no follow to see it live link.
Go to wp-content\themes\x\framework\functions\global, then open portfolio.php and edit this line of code.

Will this not be overriden in theme updates?

Hi There,

Yes you’re correct, that will be a temporary solution and the update will be override that file. You can copy the complete function into your child theme’s functions.php file and then you can make your change.

function x_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 rel="nofollow" href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block" target="_blank"><?php echo $launch_button; ?></a>

  <?php

  endif;

}

Hope that helps.

So the only thing I need to do now is add this snippet I’m functions.php? Or I have to follow previous step as well? Thanks so much for the awesome support. I will give a rating on Themeforest.

Hi @faizan, I’m sorry about any confusion here. Try the solution Paul mentioned above, but remember to use a child theme. This is how to properly modify templates without the changes being overwritten when the theme updates.

Take a look at this article to learn more about child themes: https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

I am already using a child theme with a many code snippets. I copied the file into child theme and made changes as Paul said. But it didn’t work. The link was still dofollow after clearing cache as well. Now what? Should I add the functions.php snippet you provided?. Also, I do not get email notifications for replies. I need to manually check for new replies.

This has been added after copying the same file into my child theme directory. It does not make the link “nofollow”.

After adding this into my functions.php. my site stops working.


Also, on the homepage, I cannot make the image stick the the bottom. I tried the class mbn, mvn in the image element. It does not work. I want to make the logo stick at the bottom row without any space at the bottom on all devices. (I have disabled this column on mobile,)
width=“690” height=“255”>

Hi there,

Would you mind providing your admin and FTP login credentials. I don’t see that code being implemented at least on your page’s source code.

About that image, let’s do these

  1. Please use proper close elements, example, in your custom headlines you use <strong> twice instead of closing it. Example,

<strong>Smart solutions for<br />smarter business<strong>

And it should be like this

<strong>Smart solutions for<br />smarter business</strong>

This creates extra elements when the browser tries to fix the rendering.

  1. Please add mbn to your image’s class. I don’t see any mbn added to that area when I viewed your page’s source code.

  2. Please inspect your column’s where your image is, the same way you inspect the sections and rows. If you have issues inspecting the columns, then just click the section(don’t inspect, just click it), then click the column that you wish to inspect. Once you’re there, add this to your column’s Style input vertical-align: bottom;.

That should do it :slight_smile:

Thanks.

Okay! This fixed the issue. Thanks.

  1. Now, the portfolio link issue is pending. I am attaching my credentials in the secure note.
  2. I have seen a new issue. On some featured images, I see a red/orange line at the bottom of the image. Please see attached.
  3. Is there a way to show excerpts on the post element in the cornerstone builder? I am currently using Cornerstone Addons but that slows the site by 30-40%. I want a fast website and also, the excerpts will help my homepage be keyword rich for SEO.
    Thanks. I have reviewed the theme. https://themeforest.net/ratings/2688698.

Hi there,

The issue is that the portfolio functions aren’t possible to overload. So let’s do it this way,

1 Add this code to your child theme’s functions.php

function x_portfolio_item_project_link_v2() {

$project_link = get_post_meta( get_the_ID(), 'xportfolio_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 rel="nofollow" href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block" target="blank"><?php echo $launchbutton; ?></a>

<?php

endif;

}

2 Then from @paul.r’s first instruction about content-portfolio.php, change this line

<?php x_portfolio_item_project_link(); ?>

to this

<?php x_portfolio_item_project_link_v2(); ?>

About the orange line, please add this CSS to your global custom CSS with your preferred color

.entry-thumb {
background-color: #000000;
}

About the excerpt, it’s not possible. But you may use Essential Grid and its skin builder to create your own layout with the excerpt.

Thanks!

This is done. But then the button on the portfolio page disappears.

Hi,

You need to change that line of code in wp-content/themes/x-child/framework/views/renew/content-portfolio.php

I would like to check but the FTP login no longer works.

Do you mind activating it again.

Thanks

I had not changed the FTP details. I tried logging and I couldn’t too. I have installed a plugin for managing files. Can you please make changes using that? Also, I had made changes to the exact file “wp-content/themes/x-child/framework/views/renew/content-portfolio.php”. I have some of of my own customizations as well in the file, so please be careful while editing it. Thanks.

Hi @faizan,

I get “authentication failed” when trying to connect over FTP. We will need FTP details to do anything file based. File manager plugins aren’t safe because if a PHP error is introduced it could prevent the site from loading. Because FTP is direct access, we don’t have to worry about that happening.

Please check secure notes for new FTP details.

Hi,

There is a typo in the code.

I was able to fix it by changing the code in your functions.php file with this.

function x_portfolio_item_project_link_v2() {

 $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 rel="nofollow" href="<?php echo $project_link; ?>" title="<?php echo $launch_button; ?>" class="x-btn x-btn-block" target="_blank"><?php echo $launch_button; ?></a>

  <?php

  endif;

}

Kindly check in your end.

Thanks!
I would like to is there anything to take care of before updating the theme?

Hi there,

There is no need for further changes since it’s already added in your child theme. Updates will not overwrite it, but, if the future updates contain code changes where the above code is derived, then you’ll have to update the above code as well (manually editing the code).

Custom will and may only work as provided, there is no guarantee that it will forever work in the future.

Thanks.

Okay.
Can you please tell how can I make the CTA in menu full width for hamburger menu? Thanks.

Also, I need to remove the black line on hover for the CTA specifically. And also the container on mobile devices.


Also The sub menu of “services” does not seem to work at times. The drop down button/hover i mean.
Thanks