Enforce user login

Posted in: Newsmag
Post count: 3

I want to enable blog posts ( specifically, the post contents) to be displayed only if user has logged in, otherwise, I want to so a “Login to see this ” kind of a message, could be a simple image or a popup.

Either ways, how do I achieve the first part, where the post content is not rendered if user is not logged in ?

Post count: 35449

Hi,
Our theme do not have this kind of option, but you can use plugins https://patrickposner.dev/8-best-content-restriction-plugins-for-wordpress/
Hope this will help you!

Post count: 3

I can do it by editing PHP files as well, Just want to know which is the right file for this.

Which file is responsible for rendering blog posts?

Post count: 35449

Hi jaychawda, if you want to edit the content that is call in each template, then you can find this file in this path wp-content/plugins/td-composer/legacy/common/wp_booster/td_module_single_base.php -> https://i.imgur.com/ErTKq5c.png also this function can be find the posts templates where is called, for example for post template 1 wp-content/plugins/td-composer/legacy/Newsmag/parts/single/loop-single-1.php -> https://i.imgur.com/H9JBy1L.png
Hope this will help you!

Post count: 3

Thank you! This helps

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