• Resolved Guenni007

    (@guenni007)


    the popups are CPT – aren’t they? so they all have there own publishing date.
    i want to show in the popup the publishing date under the title.
    But when i place my popup – it will show the publishing date of the post/page where it is shown/placed.
    Best would be a little shortcode for the publishing date of the popup post.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Bel

    (@belimperial)

    Hello @guenni007

    Thank you for reaching out to us!

    The popups are custom post types and it has its publishing date. Currently, we don’t have a feature to display the date under the title of the popup. You may need to customize this using filters and add a shortcode inside the popup content.

    If you would like, you can submit a feature request for this. Please login to your Popup Maker account and submit a feature request here.

    Hope that helps. If your issue is resolved please take a moment to rate and review the plugin.
    If you still need help please message us directly at https://wppopupmaker.com/support/

    Thread Starter Guenni007

    (@guenni007)

    for posts i have this shortcode [post_published]

    function shortcode_for_publishing_date_of_posts(){
     	return get_the_date( 'd.m.Y', get_the_ID($post->ID) );
    }
    add_shortcode( 'post_published', 'shortcode_for_publishing_date_of_posts' );

    but that code leads to the wrong date in the popup – it only shows the publishing date of the page/post where the trigger is placed.

    Bel

    (@belimperial)

    Hi @guenni007

    Thank you for getting back!

    Please could you send us a message at https://wppopupmaker.com/support/ and kindly include the code. We would need to escalate this to our developer.

    Thank you and we look forward to hearing from you soon.

    Thread Starter Guenni007

    (@guenni007)

    Unfortunately, this is not the right solution. This shortcode above inserts the creation date of the page where the popup trigger is placed, and not the date of the popup itself.
    https://i.postimg.cc/3xkY96FG/mismatch.jpg

    I was hoping you guys would know a solution to this.

    We really do apologize for this inconvenience, @guenni007.

    We will be happy to escalate this to our lead developer to be able to provide you further assistance. But, like what my colleague Bel already mentioned above, you will need to message us directly to our HelpScout support desk to be able to secure your website’s information, as well. Check this link: https://wppopupmaker.com/support/

    Looking forward to your response. Thank you!

    Thread Starter Guenni007

    (@guenni007)

    Thank you – a nice guy from your team did solve the issue:
    i only changed to prepend it before content :

    function add_date_time_popup_content( $content ) {
    	if ( ! function_exists( 'pum_get_popup_id' ) ) return;
    	$popup_id = pum_get_popup_id();
    	return $content . "<p>Published: " . get_the_date( 'l F j, Y' , $popup_id ) . ' ' . get_post_time( 'g:i a', false, $popup_id ) . '</p>';
    }
    add_filter( 'pum_popup_content', 'add_date_time_popup_content' );

    so can be closed.

    Hello @guenni007 – thanks for sending us an update.

    Wow! That’s great and thanks for letting us know that your issue is already resolved now.

    By the way, if you have time we would very much appreciate it if you could quickly rate the plugin, just to help us spread the word.

    Have a great weekend! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘echo get_the_date in Popup Window’ is closed to new replies.