Forum Replies Created
-
AuthorPosts
-
Jeff RivettParticipant
Clicking ‘Check again’ still doesn’t help for me.
Other plugin and theme updates are showing up and seem fine.
Not sure if it’s important, but when 5.3 first became available, I still had the free version installed (and disabled). I’ve since removed it, but maybe that confused things?
Jeff RivettParticipantClicking ‘Check again’ on the Updates page didn’t help. I’ll check again tomorrow.
Jeff RivettParticipantOkay, thanks. That works as well.
Jeff RivettParticipant> You can remove [3][e].
> That is not necessary.Nope. If I remove Visitor conditions: Custom function IS downloadclicked, the announcement appears on every page.
Perhaps you could try this at your end to see what I’m seeing.
Thanks,
JeffJeff RivettParticipantI don’t totally understand why it’s working, but I did get it working.
[1] /wp-content/themes/<theme>/functions.php:
add_action('wp_enqueue_scripts', 'jrc_enqueue_custom_js'); function jrc_enqueue_custom_js() { wp_enqueue_script('jrcustom', get_stylesheet_directory_uri().'/js/jrcustom.js'); }
[2] /wp-content/themes/<theme>/js/jrcustom.js
function downloadclicked(){} jQuery(document).ready(function(){ jQuery( ".menu-item-4190" ).click(function() { var my_announcement = document.getElementById('ancr-4186').announcer; my_announcement.show(); // or .hide(); }); });
[3] Announcement (ID=4186)
[a] Display: Immediately; Immediate; Slide
[b] Position: Bottom; Sticky
[c] Close: Display close; Keep closed NO
[d] Location rules: Show in all pages
[e] Visitor conditions: Custom function IS downloadclickedThanks for your assistance.
Jeff RivettParticipantPerhaps it would help if I explained what I’m trying to accomplish.
I would like an announcement to be shown when the user clicks a download link in the main menu (which appears on every page). Preferably, the announcement would appear after the download dialog, perhaps after a brief delay.
Is there some way I can accomplish this without using Custom Function?
Jeff RivettParticipantThanks for the information and suggestions.
> In your case you are always returning true. So the announcement will be shown always (after closing the alert box)
In fact the announcement is NOT shown. If I remove the Custom Function, the announcement does show up on every page (even without clicking). As soon as I enable the custom fuction, it stops appearing.
I tried your suggested code, and the announcement still isn’t shown on clicking. If I remove the schedule settings you suggested, the announcement again appears on every page, regardless of any clicking.
-
AuthorPosts