 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
June 18, 2021 at 4:21 pm #1306410Hi Enfold, I have cloned my site and added elements from my test site. That worked fine, until I updated the theme. 
 Guenni helped me making automatic date appearance on my text boxses everytime a popup is published. That function is now not working even though i took the code and placed it in the funcion.php, as before. All the popups still have classes, so I can’t figure out why it is suddenly not working, just because of that update. Here is the code:function add_date_time_popup_content( $content ) { 
 if ( ! function_exists( ‘pum_get_popup_id’ ) ) return;
 $popup_id = pum_get_popup_id();
 return “<p class=’date-published’>” . get_the_date( ‘\<\s\p\a\n \c\l\a\s\s\=\”\w\e\e\k\d\a\y\”\> l \<\/\s\p\a\n\> \d. d.m.Y’ , $popup_id ) . “</p>” . $content ;
 }
 add_filter( ‘pum_popup_content’, ‘add_date_time_popup_content’ );function show_date_of_popup(){ 
 ?>
 <script type=”text/javascript”>
 (function($) {
 $(document).ready(function(){
 $(‘#top.page-id-7 #av_section_2 .pum-trigger’).each(function() {
 var pumPopup = $(‘.pum’).css(‘display’);
 var trigger_name = $(this).attr(‘class’).split(‘ ‘)[0];
 var publishingDate = $(this).closest(‘#top’).find(‘#’+trigger_name+’ .date-published’).html();
 var date_published = $(‘<span class=”puplished”>’+publishingDate+'</span>’);
 $(this).append(date_published);
 });
 });
 })(jQuery);
 </script>
 <?php
 }
 add_action(‘wp_footer’, ‘show_date_of_popup’, 9999);This is very urgent as I launch this website on monday. 
 Please I hope that you can help.
 – SheilaJune 18, 2021 at 5:05 pm #1306422Hi Sheila, On which page should it be displayed? I believe it might be related to page ID in the JS code. I am guessing updating that would help but I do not know which was your previous thread so this is just a guess :) Best regards, 
 YigitJune 18, 2021 at 5:11 pm #1306424Hi Yigit, On the frontpage – the one called “Forside (ny)” June 18, 2021 at 5:27 pm #1306430Hey, I updated page ID to new one “22954” and that helped. Please review your website :) Regards, 
 YigitJune 18, 2021 at 5:36 pm #1306437Yigit, you are truly the best! Just saved my life and day and weekend! 
 I wish you the best! ThanksJune 18, 2021 at 5:41 pm #1306441
- 
		AuthorPosts
- The topic ‘URGENT – problems after updating the theme’ is closed to new replies.
