Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1306410

    Hi 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.
    – Sheila

    #1306422

    Hi 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,
    Yigit

    #1306424

    Hi Yigit,

    On the frontpage – the one called “Forside (ny)”

    #1306430

    Hey,

    I updated page ID to new one “22954” and that helped. Please review your website :)

    Regards,
    Yigit

    #1306437

    Yigit, you are truly the best! Just saved my life and day and weekend!
    I wish you the best! Thanks

    #1306441

    Hi,

    I am so happy that I could help, Sheila :)

    Wish you the best as well and enjoy your weekend!

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘URGENT – problems after updating the theme’ is closed to new replies.