How do I disable Page Templates?

Viewing 4 posts - 1 through 4 (of 4 total)
#181258

Jill K
Participant

I have private membership pages that have download links. When a user clicks on the title of the download file, it goes to a page created by a page template. This page is found in Google searches and is accessible by everyone (non-paying members). I want these pages disabled and the Link template to have a title without a link. I have deleted the link from the Page Template, but obviously this will be overwritten with the next plugin update.

I did copy the page template and the link template to my theme with the correct directory structure, but wpdownloadmanager did not pick up the changes. I had to make the changes directly in the plugin directories.

The main thing I want is to disable the Page templates all together. How do I do this?

Also, is there a “standard” Link template that does not have the file name as a link?

Thank you.

#181260

Tanvir
Spectator

Hello,

It is visible in Google, so I assume that is the main reason you want to disable it.

making disallow Crawling Download Manager Pages for Google, Bing + search engines, Add the following code at the end of your active theme’s functions.php:

function noindex_for_wpdm()
{
    if ( is_singular( 'wpdmpro' ) ) {
        echo '<meta name="robots" content="noindex, nofollow">';
    }
}

I hope it may help you.
For further assistance, please also share related links of your website to check the issue closely and give you a solution quickly.

Thank you and regards
Tanvir

#181293

Jill K
Participant

Hi Tanvir,

Thank you for your timely response.

We do want to be in Google, etc., searches because we do have pages with download files that are available for the public.

Here is one such page: https://saarna.org/static-99/

If you click on a file name, it goes to the page created by the page template:
https://saarna.org/download/%f0%9f%92%a5static-99r-static-2002r-barr-2002r-training-guidelines-march-2021-2/

We don’t need, nor want these pages. How do I disable them?

We simply want a page with files listed and a download button next to each file.

I know that I can pass “title” as the parameter instead of “page_link” and this disables the link in the file title, but this does not prevent download manager from creating the page template page. I know this because when I am on a page template page, there are arrows that allow me to traverse through the page template pages.

So, how do I disable page template pages?

Thank you in advance for your help!
Jill

#181544

Tanvir
Spectator

Hello,

You have to edit the link template that is used there.
From the link template you have to remove the hyperlink and the url template tage. In example:
<a href="[page_url]" class="btn btn-primary">View Details</a>
if your link template has code like this, then you have to remove the total line in the <a> and </a>

For further assistance, please provide temporary admin access in a private reply.

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How do I disable Page Templates?’ is closed to new replies.