wmpromotions
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!Thank you Tom!
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!I dont know what to replace MY JAVASCRIPT with! How am I supposed to know what to repalce it with??? Why can’t you just answer my whole question instead of open ended answers????
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!So this?????
add_action( ‘wp_head’,’my_javascript’ );
function example_function_name() { ?>
<link href=”https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap” rel=”stylesheet”><link rel=”stylesheet” href=”https://use.typekit.net/fkv1moe.css”>
<script type=”text/javascript”>
(function($) {
function setup_collapsible_submenus() {
// mobile menu
$(‘#mobile_menu .menu-item-has-children > a’).after(‘<span class=”menu-closed”></span>’);
$(‘#mobile_menu .menu-item-has-children > a’).each(function() {
$(this).next().next(‘.sub-menu’).toggleClass(‘hide’,1000);
});
$(‘#mobile_menu .menu-item-has-children > a + span’).on(‘click’, function(event) {
event.preventDefault();
$(this).toggleClass(‘menu-open’);
$(this).next(‘.sub-menu’).toggleClass(‘hide’,1000);
});
}$(window).load(function() {
setTimeout(function() {
setup_collapsible_submenus();
}, 700);
});})(jQuery);
</script><script>
jQuery(document).ready(function(){jQuery( “#menu-item-639” ).insertAfter( jQuery( “.menu-item-635″ ) );});
</script><script src=”https://api.soarr.com/inventory/1.0/scripts/inv-app.beta-0.1.min.js”></script>
<script src=”https://inv.soarr.com/emtharp/main.js”></script>
<?php }Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!Like this? I am trying to make sense of what you are saying but I do not know how to turn this into a funciton
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!add_action( ‘wp_head’,’example_function_name>’ );
function example_function_name() { ?>
<link href=”https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap” rel=”stylesheet”><link rel=”stylesheet” href=”https://use.typekit.net/fkv1moe.css”>
<script type=”text/javascript”>
(function($) {
function setup_collapsible_submenus() {
// mobile menu
$(‘#mobile_menu .menu-item-has-children > a’).after(‘<span class=”menu-closed”></span>’);
$(‘#mobile_menu .menu-item-has-children > a’).each(function() {
$(this).next().next(‘.sub-menu’).toggleClass(‘hide’,1000);
});
$(‘#mobile_menu .menu-item-has-children > a + span’).on(‘click’, function(event) {
event.preventDefault();
$(this).toggleClass(‘menu-open’);
$(this).next(‘.sub-menu’).toggleClass(‘hide’,1000);
});
}$(window).load(function() {
setTimeout(function() {
setup_collapsible_submenus();
}, 700);
});})(jQuery);
</script><script>
jQuery(document).ready(function(){jQuery( “#menu-item-639” ).insertAfter( jQuery( “.menu-item-635″ ) );});
</script><script src=”https://api.soarr.com/inventory/1.0/scripts/inv-app.beta-0.1.min.js”></script>
<script src=”https://inv.soarr.com/emtharp/main.js”></script>
<?php }Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!Yes I see that. How am I supposed to know what the hook function is???
add_action( ‘your_hook_name’,’example_function_name’ );
function example_function_name() { ?>
Insert your hook contents in here.
<?php }Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!I want to add JS to the <head> area. Not PHP. Your instructions do not make sense. First you said I need the Premium Modules, now you are talking about PHP and I do not understand how that is relevant to what my question was???
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!It is JS not PHP? the Link you sent is for PHP
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!I have to purchase the premium version to be able to use Javascript?
Forum: Themes and Templates
In reply to: [GeneratePress] Where to place Javascript?!WHERE do I place the hooks?