Remove a href link from h1 title tag on tdhome

Posted in: Newspaper
Post count: 17

Hi,

I’ve created a child theme since I wanted to tweak just a couple of elements.

However, I am scratching my head because I can not understand how to remove the link created in the H1 Title of the “Homepage Post” element used on a PAGE

This element is very similar to the Style 8 Template used on POSTS where the H1 title is not a link.

Thanks!

Post count: 22421

Hi,
Unfortunately this will not be an easy task because the homepage post uses the same method to grab the title link that is common for all other posts: http://screencast.com/t/wcFwqoMCZx
The get_title function is used for every post on the site: http://screencast.com/t/n7ePd0C4R00i
You can try to replace the calling of this function and copy over the function itself and then remove the link, but for this you will require coding skills.
Thank you!

Post count: 17

Hi!

Thanks…ok so I changed the code in td_module_single_base.php to now read;

/**
* Gets the article title on single pages and on modules that use this class as a base (module15 on Newsmag for example).
* @param string $cut_at - not used, it's added to maintain strict standards
* @return string
*/
function get_title($cut_at = '') {
$buffy = '';
if (!empty($this->title)) {
$buffy .= '<h1 class="entry-title">';
$buffy .= $this->title;
$buffy .= '</h1>';
}

return $buffy;
}

This appears to work fine for me although can you elaborate on “this is used for every post on the site”?

Are you saying that the titles appearing in Modules would no longer have links? (I am not getting that result)

Thanks!

🙂

Post count: 22421

Hi,
The modules will not break as they use the function from a different file, but there is for example one module that uses the function from here: module 15. This is not used within a block but rather the templates: blog, search…etc. If you use this module after your customization, it will have no post titles an no link to the posts themselves.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.