Pages layout request

Hi guys!
I have a little request, if it is possible and easy to do.
I would like to have some pages with this layout sidebar right content left.
however when I do that the title of the page appears on the page and I don’t want it. Is it possible to remove it?
You can see what I mean in the example below. The “about” needs to go away.

thanks a lot
regards

Hello There,

Thanks for writing in! What you have in mind is possible with a little modification to the page template. Since 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-PAGE.PHP
// -----------------------------------------------------------------------------
// Standard page output for Integrity.
// =============================================================================

$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) : ?>
  <div class="entry-featured">
    <?php x_featured_image(); ?>
  </div>
<?php endif; ?>
  <div class="entry-wrap">
    <?php if ( is_singular() ) : ?>
      <?php if ( $disable_page_title != 'on' || !is_page_template('template-layout-content-sidebar.php') ) : ?>
      <header class="entry-header">
        <h1 class="entry-title"><?php the_title(); ?></h1>
      </header>
      <?php endif; ?>
    <?php else : ?>
    <header class="entry-header">
      <h2 class="entry-title">
        <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>
    </header>
    <?php endif; ?>
    <?php x_get_view( 'global', '_content' ); ?>
  </div>
</article>

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

You need to create the folder since it does not exist yet in your child theme.

hi @RueNel thank you so much.
I followed the steps but I found that in the text editor I couldn’t save it as php the only option was rtf or php.rtf. I chose the second.
then I uploaded it in the server. I created a folder but probably it was not necessary.
here is the screen shot.

what did I do wrong?
it doesn’t work.

thank you ever so much
cheers
Isabella

Hello There,

Please use Notepad or Sublime text in creating the file. With these two text editors, you won’t have any problem saving the filename as filename.php. If you are using a different text editor, it might now allow you to use .php in the filename which may have been the issue in your case.

Have you tried renaming the file from *.php.rtf into just only *.php?

Hope this helps.

Hey @RueNel
I did it but now it gives me this error

Hi,

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

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

All the best!

ok will do

Hi There,

I’ve changed the code to this:

<?php

// =============================================================================
// VIEWS/INTEGRITY/CONTENT-PAGE.PHP
// -----------------------------------------------------------------------------
// Standard page output for Integrity.
// =============================================================================

$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) : ?>
  <div class="entry-featured">
    <?php x_featured_image(); ?>
  </div>
<?php endif; ?>
  <div class="entry-wrap">
    <?php if ( is_singular() ) : ?>
      <?php if ( $disable_page_title != 'on' && !is_page_template('template-layout-content-sidebar.php') ) : ?>
      <header class="entry-header">
        <h1 class="entry-title"><?php the_title(); ?></h1>
      </header>
      <?php endif; ?>
    <?php else : ?>
    <header class="entry-header">
      <h2 class="entry-title">
        <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>
    </header>
    <?php endif; ?>
    <?php x_get_view( 'global', '_content' ); ?>
  </div>
</article>

Then the title is disappeared.

Regards!

Hello there
thanks lot It disappeared indeed but it’s still on in the contact me page


could you please have a look?
thanks a lot :slight_smile:

Hello Isabella,

Your Contact Me page is using the default page template. Pleas edit it and change it to Layout - Content Left, Sidebar Right so that your changes in the template file which you did in the previous responses will work out. Please keep in mind that all the changes above is made possible and will only take effect if you will use the Layout - Content Left, Sidebar Right page template. It will not happen in the default templates or any other templates.

Hope this helps.

@thai

In 2.1.1, I have the option to turn off header regardless of template used if you just scroll down below the editor in Wordpress. Why would additional code be needed or is that something that X Pro does not include and one of my other plugins is causing it?

oh you are right!
thank you so much ! :slight_smile:
cheers

Hey Isabella,

You’re always welcome. We’re glad we can be of help.

@wbhudran3:
I would like to request that you kindly create a new thread with your issue to avoid getting off topic. Please keep in mind that each of the user’s issue or request were responded according to his/her site settings and it does not mean that one solution may apply to other sites.

Thanks.

@RueNel

I apologize, I was just trying to help @isa1978 avoid all the coding if she had the ability to just check a box.

I will leave answers to the experts from now on.

Good evening.

Bill… … .

Hi @wbhudran3,

Didn’t meant to offend you. Actually, we appreciate also your help. Sometimes, you may getting off to the topic however there are some that has the same fix as you are.

No worries. Feel free to share opinion. I believe that doing something is good than doing nothing :slight_smile:

Thank you for understanding.

1 Like

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