Generate

You can use wp_head action to add something to head section. You can change the output according your needs. <?php add_action(‘wp_head’,’add_meta_des’); function add_meta_des() { if(is_single()) { global $wp_query; $post = $wp_query->post; $page_id = $post->ID; $page_object = get_page( $page_id ); $content = wp_trim_words($page_object->post_content,30); $output=”<meta name=”description” content=””.get_the_title().”–“.$content.””/>”; echo $output; } } ?>

Change My Basket text in the header of WooCommerce Artificer theme

The functions are defined in the includes folder of the artificer theme, in the theme-woocommerce.php file: // Add the cart link to the header add_action(‘woo_nav_before’, ‘artificer_header_cart_link’, 20); if ( ! function_exists( ‘artificer_header_cart_link’ ) ) { function artificer_header_cart_link() { if ( class_exists( ‘woocommerce’ ) ) { echo woocommerce_cart_link(); } } } // Add the checkout link … Read more

How to rotate the header image per day?

<div id=”header”> <?php mt_srand((int)date(‘z’)); $headers=glob(PATH_TO_FILES .’/*.jpg’); $header=mt_rand(0,count($headers)-1 ); ?> <img id=”header-image” `src=”https://wordpress.stackexchange.com/questions/5232/<?php echo URL_TO_FILES .”https://wordpress.stackexchange.com/”.basename($headers[$header]); ?>” alt=”header” /> </div> replace your current header with this. I will of course help you implement this further if you need help. (or if you need the code explained)

How to stop loading multiple copies of jquery

You should remove these lines from your header.php <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/jquery.js”></script> <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/tabber.js”></script> <script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/154191/<?php bloginfo(“template_url’); ?>/javascripts/superfish.js”></script> And instead add the following function in your functions php… right at the top. wp_enqueue_script function sg_theme_js(){ wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘tabberjs’, get_template_directory_uri().’/javascripts/tabber.js’, array(‘jquery’), 1.0, true); wp_enqueue_script( ‘superfishjs’, get_template_directory_uri().’/javascripts/superfish.js’, … Read more

If Modified Since HTTP Header

the_modified_date() is a template tag that must used inside the loop, that is why it is not wokring for you. WordPress provide a action and filter hook to include or modify HTTP headers: send_headers action wp_headers filter But it doesn’t work for this purpose. For example, the next code is not working: add_action( ‘send_headers’, ‘cyb_add_last_modified_header’ … Read more

How to override parent theme function through the child theme [closed]

I just downloaded the theme to check it out, and header-extensions.php is not loaded as a template: /** Load Structure */ require_once (AMBITION_STRUCTURE_DIR . ‘/header-extensions.php’); So you wouldn’t be able to override the file in that manner. I’m not sure exactly what you are trying to do, but it looks like ambition_headercontent_details method is in … Read more

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