Status
Not open for further replies.

xTreme

Active Member
1,402
2010
113
0
Hello

Can any tell me how to prevent duplicate title tags and duplicate meta description ?

I can see around 6k+ Duplicate Title tags and Description in Google Webmaster- HTML suggestion.

I thought of adding topic[id] to <meta name="og:title"> but its not working :(
 
5 comments
In the template Global Templates > globalTemplate

find:
PHP:
<title>{$header_items['title']}
Change to:
PHP:
<title>{$header_items['title']} {$this->request['showtopic']}

find:
PHP:
<meta property="og:title" content="{IPSText::htmlspecialchars( str_replace( ' - ' . $this->settings['board_name'], '', $header_items['title'] ) )}"/>
Change to:
PHP:
<meta property="og:title" content="{IPSText::htmlspecialchars( str_replace( ' - ' . $this->settings['board_name'], '', $header_items['title'].' '.$this->request['showtopic']  ) )}"/>

Adds a space then topic id after title and meta tag title but it will only show up in topics as that is the only time that variable exists.
 
for changing description in template Global Templates > includeMeta

find:
PHP:
<if test="metatags:|:is_array( $metaTags ) AND count( $metaTags )">
	<foreach loop="metaTags:$metaTags as $tag => $content">
	<meta name="$tag" content="$content</if> />
	</foreach>
</if>

change to:
PHP:
<if test="metatags:|:is_array( $metaTags ) AND count( $metaTags )">
	<foreach loop="metaTags:$metaTags as $tag => $content">
	<meta name="$tag" content="$content<if test="$tag=='description'"> {$this->request['showtopic']}</if> />
	</foreach>
</if>
 
dle 9.7

In the template Global Templates > globalTemplate

find:
PHP:
<title>{$header_items['title']}
Change to:
PHP:
<title>{$header_items['title']} {$this->request['showtopic']}
find:
PHP:
<meta property="og:title" content="{IPSText::htmlspecialchars( str_replace( ' - ' . $this->settings['board_name'], '', $header_items['title'] ) )}"/>
Change to:
PHP:
<meta property="og:title" content="{IPSText::htmlspecialchars( str_replace( ' - ' . $this->settings['board_name'], '', $header_items['title'].' '.$this->request['showtopic']  ) )}"/>
Adds a space then topic id after title and meta tag title but it will only show up in topics as that is the only time that variable exists.

Hi LockDown,

can`t seem to find the line code you specified. Could you tell me again what file i need to open to find the "
PHP:
<title>{$header_items['title']}
" on a dle 9.7?

thank you
 
Status
Not open for further replies.
Back
Top