To achieve this you should override that class from your own module.
Create a Magento 2 module (lear here: https://devdocs.magento.com/videos/fundamentals/create-a-new-module/) and then add this in your etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magefan\Blog\Model\Post" type="NameSpace\YourModule\Model\Magefan\Post" />
</config>
Now your class NameSpace\YourModule\Model\Magefan\Post.php
<?php
namespace NameSpace\YourModule\Model\Magefan;
class Post extends \Magefan\Blog\Model\Post {
public function yourNewFunction()
{
return true;
}
}
Now, if you call this function from your theme, then it should work.