How to lock a part of the WP php code with a countdown?

themadoxter

Member
Oct 24, 2020
53
25
18
Hello guys, I need help here.


I'm using this wordpress theme Paintable (https://anthemes.com/themes/paintable/ph/photography-with-these-tips/). As you can see, after the image there is a download button. It's triggered when you activate these functions on the theme options. It needs to be a featured image to work, BUT, I want to lock this box (attached) with a message like, "your download button will appear in 30 seconds" or even with recaptcha.

It seems I need to do this directly on the PHP code, which I've found. Is there any soul with a practical solution? I'm not a coder, so, if anyone can help me, I'll be glad.

Thanks in advance.
 

Attachments

  • box to lock.jpg
    box to lock.jpg
    11.3 KB · Views: 7

frizzel

Well-known member
Trusted Uploader
Jun 13, 2019
485
253
63
Wherever my imagination takes me
You will need to use some coding to achieve this, e.g. recaptcha and some simple javascript:
(In the preview above it's about a 'submit' button, but the solution given is for a simple button.)
 
  • Wow
Reactions: Fat_Thor

themadoxter

Member
Oct 24, 2020
53
25
18
You will need to use some coding to achieve this, e.g. recaptcha and some simple javascript:
(In the preview above it's about a 'submit' button, but the solution given is for a simple button.)
I'll check, thank you!
 

ngepetlo

Member
Nov 26, 2020
36
15
8
Hello guys, I need help here.


I'm using this wordpress theme Paintable (https://anthemes.com/themes/paintable/ph/photography-with-these-tips/). As you can see, after the image there is a download button. It's triggered when you activate these functions on the theme options. It needs to be a featured image to work, BUT, I want to lock this box (attached) with a message like, "your download button will appear in 30 seconds" or even with recaptcha.

It seems I need to do this directly on the PHP code, which I've found. Is there any soul with a practical solution? I'm not a coder, so, if anyone can help me, I'll be glad.

Thanks in advance.

i think it's just a simple button to download image files so you don't need to integrate with recaptcha


you need to remove the href of download button from single.php

use wp ajax to get featured image url from the post ID,
use js for the countdown time to show the download button and for set the new href link from wp ajax to download button
 

tradesman

Well-known member
Mar 9, 2020
367
225
63
Cold North
Hello guys, I need help here.


I'm using this wordpress theme Paintable (https://anthemes.com/themes/paintable/ph/photography-with-these-tips/). As you can see, after the image there is a download button. It's triggered when you activate these functions on the theme options. It needs to be a featured image to work, BUT, I want to lock this box (attached) with a message like, "your download button will appear in 30 seconds" or even with recaptcha.

It seems I need to do this directly on the PHP code, which I've found. Is there any soul with a practical solution? I'm not a coder, so, if anyone can help me, I'll be glad.

Thanks in advance.
There are tons of ways to do this, but what I'd suggest is javascript.... Because I suck at PHP.

Probably getElementById or querySelector

check this SO by people who are smart enough to operate a 4 button blender.


Yeah, it says Hide Button, but explore innerHTML and innerText too. Good Luck
 

Forum statistics

Threads
69,498
Messages
910,045
Members
239,974
Latest member
geozinho

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu