Removing jQuery from footer

If your working with a blank theme why don’t you just remove or comment out the wp_enqueue_script(‘jquery’); in the theme functions.php? Otherwise your action hook is wrong, use, add_action(‘wp_print_scripts’,’theme_slug_dequeue_footer_jquery’); function theme_slug_dequeue_footer_jquery() { wp_dequeue_script(‘jquery’); } This will still load the build in jQuery (I think) in /wp-includes/js/jquery/jquery.js?ver=1.8.3 To remove all jQuery from the admin & the … Read more

editing footer text in JBST theme

The footer credits are output by the jbst_credits custom action, which has the jbst_custom_credits() callback: function jbst_custom_credits() { if(get_theme_mod(‘footer_credits’) <> “”) {echo get_theme_mod(‘footer_credits’);} else {?> <?php printf( __( ‘&copy;’, ‘jamedo-bootstrap-start-theme’ )); ?> <?php echo date(‘Y’);?> <?php echo bloginfo(‘name’);?><span class=”sep”> | </span><a target=”_blank” href=”https://wordpress.stackexchange.com/questions/135687/<?php esc_attr_e(“http://www.jbst.eu/’, ‘jamedo-bootstrap-start-theme’ ); ?>” title=”https://wordpress.stackexchange.com/questions/135687/<?php esc_attr_e(“Powered by JBST’, ‘jamedo-bootstrap-start-theme’ ); ?>” rel=”generator”><?php … Read more

How to load jQuery in the footer – nothing works for me

You need to load your scripts in the footer so you’ll need to add them to the functions. This method works for parent themes dependent on jQuery. For child themes Change: get_template_directory_uri() To get_stylesheet_directory_uri() Example code for parent themes: function wpsites_load_scripts() { wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘wpsites_load_scripts’ … Read more

Create a page template with No Footer

The correct way to load footer-none.php is: get_footer(“none”); Anyway, I think it can be better to use wp_footer() (required function on any frontend page) directly in the page template file so you don’t need to load any empty footer template (assuming you load all required HTML tags in the page template, for example closing body … Read more

Add dynamic Sitemap to footer

You should call wp_nav_menu() in your footer.php template. It’s used as following : <?php wp_nav_menu( array(‘theme_location’=>’footer’) ); ?> The theme_location parameters refers to the checkboxes below the menu editor (Theme location). If your theme doesn’t have enough theme_location, you can add some by adding function register_html5_menu(){ register_nav_menus(array( ‘footer-1’ => __(‘Footer Menu 1’, ‘theme_translation_domain’), )); } … Read more

wp_register_script(… $in_footer = true) not working

Choose the right place in (rendering-)time First off, you are hooking at init, while you want to add your callback on wp_enqueue_script. Example: add_action( ‘wp_enqueue_script’, function() { wp_deregister_script( ‘jquery’ ); // Rest of logic } ); Staying up to date with core Also, you might want to use the correct version that core uses. I know, … Read more

Understanding Theme specific Code

do_action(); creates an action hook which we can use to hook our function in function.php file. in the above code, 4 action hooks are defined cherry_footer_before cherry_footer cherry_footer_after cherry_body_end if you go to theme-folder/lib/structure.php you wil see three action hooks. add_action( ‘cherry_footer_before’, ‘cherry_footer_wrap’, 999 ); add_action( ‘cherry_footer_after’, ‘cherry_footer_wrap’, 0 ); add_action( ‘cherry_footer’, ‘cherry_footer_load_template’ ); and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)