Topic: How to remove link from single-post headlines?

So Google News approved our Arras Theme site (rappnews.com) as a News site, and then sent a message saying their bot has trouble logging pages where the headline (on a single post) is a link -- a link that essentially links to itself -- and would we mind making those titles into simple text, without the link.

I assume I have to edit the postheader function, but I'm very far from being speaking fluent PHP. Does anyone have any suggestions for just making the title appear as an h1 (or h2) without the <a> wrapper?

Happy to do this on a child theme -- we've made other changes that we have to keep re-doing after updating -- but right now I'm just in need of the code that doesn't break postheader.

Thanks as usual for any suggestions.

Roger

Thumbs up

Re: How to remove link from single-post headlines?

I'll take it you have 1.4.3
Change (in filters.php)

        else $postheader = '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h1>';

into

       else $postheader = '<h1 class="entry-title">' . get_the_title() . '</h1>';
My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: How to remove link from single-post headlines?

Thanks, extatix, and we are actually using 1.4.4b1, which worked somehow better for us after extensive testing of 1.4.3 vs. the beta. I am now studying your very helpful Child Theme documentation so we can keep these and other changes through updates.

Thumbs up

Re: How to remove link from single-post headlines?

extatix wrote:

I'll take it you have 1.4.3
Change (in filters.php)

        else $postheader = '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h1>';

into

       else $postheader = '<h1 class="entry-title">' . get_the_title() . '</h1>';

Hi,

I tried this and ended up with the title of my post being displayed as "get_the_title()". I typed it and copy and pasted several times to make sure I hadn't made a mistake.

Any suggestions? Can I do it another way through user CSS?

Thanks,

Josh

Thumbs up