why php tag is not working if i store and show it in wp_head?
why php tag is not working if i store and show it in wp_head?
why php tag is not working if i store and show it in wp_head?
Try this. It dequeues the style and script set in ‘init’. add_action( ‘template_redirect’, ‘remove_wizzylike’ ); function remove_wizzylike() { if ( ! is_single() ) add_action( ‘wp_head’, ‘remove_wizy’, 5 ); } function remove_wizy() { remove_action( ‘wp_head’, ‘wizylike_head’ ); // Enqueued in wizylike_init() wp_dequeue_style( ‘wizylike’ ); wp_dequeue_script( ‘wizylike’ ); }
The wp_head hook is not normally called for feed generation, so you need to find which plugin or other piece of code is adding that to the feed. Also check that your WordPress core files have not been altered somehow.
include TEMPLATEPATH.”/inc/settings.php”; is your problem. TEMPLATEPATH is used by the parent theme For child themes use STYLESHEETPATH so your code will be include STYLESHEETPATH.”/inc/settings.php”; Alternatively you can use get_stylesheet_directory_uri().’/inc/settings.php’
Yes, the global post object is already set when wp_head is called. An example for a function body from this post: // restricted to singular pages only if ( ! is_singular() ) return; // there has to be a featured image set $thumb_id = get_post_thumbnail_id(); if ( empty ( $thumb_id ) ) return; // FALSE … Read more
If you need it everywhere, simply enqueue it from your functions.php. See the codex for ore details function wpa_137833_scripts() { wp_enqueue_script( ‘jquery’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpa_137833_scripts’ );
I do not know much about how $[‘globals’] decides what browser you are using, i assume it uses some kind of browser sniffing which is generally a bad technique as the results it produces can be less than reliable. Why do you need to use PHP anyway, just putting this as HTML in the head … Read more
I simply added the below code right before the closing head tag. I am not sure if this is the best way to do it but it works. <style> html { margin-top: 0 !important; } </style>
You need to Edit your theme’s Header.php tag. You will see necessary codes there. You can modify to fit your needs. However, If you need more specific help, please paste your themes header.php here. Thanks
$attachment_id is simply the numerical ID assigned to any media you have uploaded. You can write: echo wp_get_attachment_image(‘1′,’large’); to display the large size of image attachment with ID of 1. You should setup a new query to get all of the attachment IDs associated with the current post, then you can get_posts(‘post_type=attachment’) Check this example … Read more