pfefferle / autonomie

"Autonomie" is a highly semantic, responsive, accessible and search engine optimized WordPress Theme. It provides HTML5 templates refined with microformats, microformats v2 and microdata (Schema.org). "Autonomie" supports a lot of OpenWeb plugins and is fully IndieWeb compatible.
https://notiz.blog/projects/autonomie/
MIT License
96 stars 21 forks source link

Recent posts without titles show as "untitled" #54

Closed Cambridgeport90 closed 2 years ago

Cambridgeport90 commented 3 years ago

Using the latest update of the theme, and I'm not sure whether this is something that I have to go into the PHP files and fix myself, which I can, but if I'm missing something, let me know. Recent posts that do not have titles; notes, theck ins, reads, and so on do not have titles, so Wordpress displays "untitled" on the recents, and probably on the RSS, too, though I haven't looked. If there is a way of fixing this, how? I want just the first few characters of the note itself to show.

ScootRay commented 3 years ago

An easy way is to edit the functions.php file in Wordpress (or use a snippets plugin like Woody snippets) and pop this in below. What you'd do is add the post formats you want the titles removed from.

/// Remove titles from asides/images/links from RSS feeds
//
function remove_status_title_rss ($title) {
  $post_format=get_post_format();
  if ($post_format == "aside" || $post_format == "image" || $post_format == "link") {
    $title="";
  }
  return $title;
}

add_filter( 'the_title_rss', 'remove_status_title_rss');

As for other than RSS feed, there's several plugins you can install that give you the option to hide the title like https://wordpress.org/plugins/hide-page-and-post-title/

Ray

Cambridgeport90 commented 3 years ago

That's what I couldn't seemingly come up with in my head. Not sure why. Thanks, though!

From: ScootRay @.> Sent: Sunday, May 2, 2021 15:45 To: pfefferle/autonomie @.> Cc: Katherine Moss @.>; Author @.> Subject: Re: [pfefferle/autonomie] Recent posts without titles show as "untitled" (#54)

An easy way is to edit the functions.php file in Wordpress (or use a snippets plugin like Woody snippets) and pop this in below. What you'd do is add the post formats you want the titles removed from.

/// Remove titles from asides/images/links from RSS feeds

//

function remove_status_title_rss ($title) {

$post_format=get_post_format();

if ($post_format == "aside" || $post_format == "image" || $post_format == "link") {

$title="";

}

return $title;

}

add_filter( 'the_title_rss', 'remove_status_title_rss');

As for other than RSS feed, there's several plugins you can install that give you the option to hide the title like https://wordpress.org/plugins/hide-page-and-post-title/https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fhide-page-and-post-title%2F&data=04%7C01%7C%7C022042f209c94d1ca4ed08d90da2c64b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637555815019044473%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=KjJOBmtR2JcZGBNPuTkHTpLlY%2FEML8DGWM%2BOsfIv4AI%3D&reserved=0

Ray

- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpfefferle%2Fautonomie%2Fissues%2F54%23issuecomment-830861284&data=04%7C01%7C%7C022042f209c94d1ca4ed08d90da2c64b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637555815019054467%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uqTRP%2F3h3%2FrteIZDa08Ne8rpWfEs0IRed1iX80cz5kc%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADS4MAC7TH56TJ2FRYHJDBDTLWTTZANCNFSM43DICDWQ&data=04%7C01%7C%7C022042f209c94d1ca4ed08d90da2c64b%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637555815019054467%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tzMhP83TbYRWvw1ZQPZIHPatY7BuWmNgm%2BHIhBI04uA%3D&reserved=0.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.