I am working a Magento2 project and I have installed a third party module magefan/module-blog which is used for manage Blog/post.This module is installed in Magento Vendor folder.
path is magento/vendor/magefun/module-blog .
I have a custom requirement and some changes/updated in block files.Since module is exist in Magento vendor folder so we can't directly changed in this module.Hence we require to override file
/var/www/html/magento2/vendor/magefan/module-blog/Block/Category/view.php
in
/var/www/html/magento2/app/code
folder.I don't have idea how to override particular that file.
if anyone know about it.Please help me.
Best Answer
Following step need to follow
create app/code/Vendor/ModuleName/registration.php
create app/code/Vendor/ModuleName/etc/module.xml
create app/code/Vendor/ModuleName/etc/di.xml
create app/code/Vendor/ModuleName/Block/File.php
Run Following Command: