Learndash: Customize user enroll time

Learndash wrote me with a filter: /** * LearnDash Lesson Access From * * This filter is called when using the learndash lesson drip feed options. This filter allows override timestamp value. * * @since 2.4 * * @param int $gmt_timestamps This is a GMT timestamp value like 1489062972 * @param int $lesson_id The Lesson … Read more

use php variable in wordpress page

As said by sabbir you have to create a custom template to use php code, other way is to register a shortcode and the use that shortcode on new page. creating shortcode is much easier, you can paste the code below in functions.php and then use [new_form] shortcode on your page. You can modify the … Read more

Unable to retrieve get_author_posts_url

Adding answer for reference: get_author_posts_url(get_the_author_meta(‘ID’)) retrieves the value into the PHP code, it doesn’t automatically output it, so you need: echo get_author_posts_url(get_the_author_meta(‘ID’)); To output it into the HTML

image uploader for widget

I think you facing issue of save button not clickable here. If I’m right about that a tiny line of javascript will solve the problem. Modify following portion of your javascript with mine: CODE UPDATED** imageUploader.on( “select” , function(){ var image = imageUploader.state().get( “selection” ).first().toJSON(); var link = image.url; $( “input.image_link” ).val( link ).trigger(“change”); $( … Read more

Show data obtained from a function and place it in a shortocode function

I don’t really understand what you’re trying to do. Why don’t you just call the function inside the shortcode handler? This looks more like general PHP question. Say we have a variable in our functions.php or wherever you define your shortcodes: $another_var = doSomeFunctionThatReturnsData(); With modern anonymous functions, you can pass variables using the use … Read more