Suppress site title use in Pro

Pro/ X appear to insert the Site title (/Settings/general settings) as the page title. Since we are using a separate SEO plugin for this (Yoast), the page titles end up malformed, concatenating both the Yoast titles and the Site title. I need a method to disable Pro from managing the page , allowing us to manage this via SEO plugin only.

Hello @dhockenberry_as,

Thanks for asking. :slight_smile:

You can disable the page title under Page Settings > Meta Settings > Disable Page Title. https://cl.ly/0p0i1C2a1X09

Thanks.

Thanks for the quick response! I should have clarified – we are using VC not Cornerstone, and I believe your solution is Cornerstone specific.

Also, I really need to disable Pro from doing this across the site, rather than page by page, which would allow us to manage via Yoast as a single configuration point.

Hello @dhockenberry_as,

Thanks for updating the thread. :slight_smile:

Please add following CSS under Pro > Theme Options > CSS:

 .entry-title {
    display: none;
}

Thanks.

Just to clarify, does this suppress the titles displayed on each page, or suppress the value within ?

I can test on our staging site, but wanted to check first.

Sorry, posted the last with the raw HTML tag, which the post tried to render. The question was actually:

ust to clarify, does this suppress the titles displayed on each page, or suppress the value within <title> ?

I tested the .entry-title CSS, and SiteTitle is still being appended to the <title> tag under <head>.

(yes, cache cleared, tried again in Incognito window, as well as in separate, previously unused browser on separate system – same issue)

Actually, I believe I addressed this as follows:

  1. Copied meta.php from /wp-content/themes/pro//framework/functions/global/ into the child theme hierarchy (/wp-content/themes/pro-child//framework/functions/global/meta.php)

  2. Edit meta.php in the child theme to remove:
    if ( ! function_exists( 'x_wp_title' ) ) :
    function x_wp_title( $title ) {

    if ( is_front_page() ) {
    return get_bloginfo( ‘name’ ) . ’ | ’ . get_bloginfo( ‘description’ );
    } elseif ( is_feed() ) {
    return ’ | RSS Feed’;
    } else {
    return trim( $title ) . ’ | ’ . get_bloginfo( ‘name’ );
    }
    }
    add_filter( 'wp_title', 'x_wp_title' );'

This disables Pro’s mods to the title tag. Please let me know if there are any other known repercussions to this mod, or a simpler way to achieve this.

Thanks!

Hello There,

Thanks updating in!

The contents of _meta.php should be:

<?php

// =============================================================================
// VIEWS/GLOBAL/_META.PHP
// -----------------------------------------------------------------------------
// Outputs meta data into the <head> of the site.
// =============================================================================

?>

<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php wp_title( '' ); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

And the code below should only be added in your child theme’s functions.php file:

if ( ! function_exists( 'x_wp_title' ) ) :
  function x_wp_title( $title ) {
    if ( is_front_page() ) {
      return get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' );
    } elseif ( is_feed() ) {
      return ' | RSS Feed';
    } else {
      return trim( $title ) . ' | ' . get_bloginfo( 'name' );
    }
  }
add_filter( 'wp_title', 'x_wp_title' );

Hope this helps.

Sorry – did not get a change to test until now (the solution I provided above has been working), but the code from your solution breaks the function.php and the site.

Could you review, revise and test to provide a working version of this?

Thanks!

Hello @dhockenberry_as,

Thanks for updating the thread.

Please replace code that’s supposed to go in child theme function.php file with following:

if ( ! function_exists( 'x_wp_title' ) ) :
  function x_wp_title( $title ) {
    if ( is_front_page() ) {
      return get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' );
    } elseif ( is_feed() ) {
      return ' | RSS Feed';
    } else {
      return trim( $title ) . ' | ' . get_bloginfo( 'name' );
    }
  }	  
endif;  add_filter( 'wp_title', 'x_wp_title' );

Thanks.

Thanks! This corrects the site failure (closing the if statement is always good :slight_smile: ), but still does not address the original request – Pro is still appending the sitename to the tag (yes, have cleared cache, used different browser, different machine), which we do not want.

Are there issue with the solution I posted – modifying a child theme copy of /wp-content/themes/pro-child//framework/functions/global/meta.php? This is working as desired, just want to know any other issues with this approach.

Hey @dhockenberry_as,

You don’t have to override the template file. You can remove the title filter like this (code to be inserted in functions.php)

add_action('after_setup_theme', 'remove_x_title', 10);

function remove_x_title() {
	remove_filter( 'wp_title', 'x_wp_title' );
}

I tested that in my dummy site and it works.

Hope that helps.

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