%postname% permalink not working in my custom theme

I am in a huge problem where my blog is being redirected to 404 error page when I use %postname% permalink but %plain% permalink works fine.

Let me tell you, I have made a custom theme for my WordPress blog and I am unable to make %postname% permalink work. I tried many tutorials and edited my .htaccess file but nothing worked.

I have lost my hope to use “Pretty Permalinks” on my blog. Please, will you help me?

My .htaccess file is as follows;

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Will you please edit my .htaccess file to work with %postname% permalinks on my custom theme???

I will be highly obliged. Moreover, if any other tips and suggestions are needed, please also mention.

Tried the permalinks option in Wp-admin?

I did not understand what you are talking about, what wp-admin in FTP or WordPress Dashboard. If it is about dashboard, yes I did.

Nothing happened, though!

Can you delete the .htaccess via File Manager, then from dashboard choose a permalink option?

Hi @RishabhJha send your wordpress and 000webhost account credentials to me so if you don’t mind.