Cannot modify headers

When you redirect via wp_safe_redirect, this is done by sending a header to the browser containing the URL to redirect to. If any content has been sent to the browser before trying to send this header, you get the headers already sent error. Once content goes to the browser, happy header time is over, no … Read more

force jQuery to load in the head

Edit: new solution, based on one of the comments. If you are using wp_enqueue_script to load your js file, make sure jQuery is a dependency so that it gets called before your code: wp_enqueue_script( ‘my_script’, ‘my-script.js’, array( ‘jquery’), $ver, true ); You can then remove the original enqueue call you had since jQuery will be … Read more

Is it ok to chop index.php and include files?

Yes, you can separate your code and markup into multiple files. Be aware of scope issues when you use include, but done carefully it should be no problem. Since you are in WordPress and building a theme, I would suggest get_template_part over a raw include. In many ways, “chopping” up your theme files is what … Read more

How to get ONLY the URL of the image that show_media_header returns?

Try this Dynamic Header plugin function: get_media_header_url() instead of this one: show_media_header() It is defined as function get_media_header_url() { global $post; $post_id = $post->ID; //Declare the wpdb var and table name and run the query to see if there is a media object associated with this post global $wpdb; $table_name = $wpdb->prefix . “custom_headers”; $check_q … Read more

How do I begin debugging where the description meta tag is set for my categories?

in seo.php in the custom folder line 73 global $suf_seo_meta_description, $wp_query; if (is_home()) { $description = $suf_seo_meta_description; } else if (is_singular()) { $description = suffusion_get_post_meta($wp_query->post->ID, “suf_meta_description”, true); if (empty($description)) { // Check the old meta field $description = suffusion_get_post_meta($wp_query->post->ID, “meta_description”, true); } if (empty($description) && is_front_page()) { $description = $suf_seo_meta_description; } } else if (is_category() … Read more

Point get_header() to different plugin

get_header() is not filterable. Neither is locate_template(). Themes can alter which header loads by passing a parameter to get_header(). There is no obvious way that I see for plugins to alter which header loads. As I think about it, that makes a lot of sense. It would be fantastically easy for plugins to break themes … Read more

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