Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to remove a link from the title?

–2 votes
106 views
asked Oct 2 in Q2A Core by Сергей Иванисов
edited Oct 3 by Сергей Иванисов

How to remove a link from the title?

this is bad for SEO 

commented Oct 2 by pupi1985
Please, ask in English, at least using an online translator service
commented Oct 3 by Сергей Иванисов
How to remove a link from the title?
commented Oct 3 by esqeudero
The link is not BAD for SEO, actually it is GOOD for SEO.
commented Oct 13 by Сергей Иванисов
This VERY BAD!

2 Answers

0 votes
answered Oct 3 by Сергей Иванисов

how to remove link from here?

+2 votes
answered Oct 3 by esqeudero

Try this.

Create a custom plugin with only layer.php file. Plugin will have these files:

- qa-plugin.php

- my-layer.php

The qa-plugin.php should look like this:

<?php

if(!defined('QA_VERSION'))

{

header('Location: ../../');

exit;

}

// layer 

qa_register_plugin_layer('my-layer.php', 'my layer');

The my-layer.php file should look like this:

<?php

class qa_html_theme_layer extends qa_html_theme_base

{

public function title()
{
$q_view = @$this->content['q_view'];
// link title where appropriate
$url = isset($q_view['url']) ? $q_view['url'] : false;
if (isset($this->content['title'])) {
 if($this->template == 'question' ) {
$this->output($this->content['title']);
} else {
$this->output(
$url ? '<a href="' . $url . '">' : '',
$this->content['title'],
$url ? '</a>' : ''
);
}
}
// add closed note in title
if (!empty($q_view['closed']['state']))
$this->output(' [' . $q_view['closed']['state'] . ']');
}

This will be a custom plugin that will do your plan.

Let me know if it works.

...