Author Tracking Code!

When you are on an author.php template page, you should be able to get the current author via $wp_query->get_queried_object(). That is also what is_author() uses when you want to check for a specific author. Do you also have a question about setting the cookies? I don’t think WordPress has specific cookie functions. wp_setcookie() is deprecated … Read more

Fastest way to get the comment and ping total count for a post

you can use this custom function in the functions.php of the theme: /** * count for trackback, pingback, comment, pings * * embed like this: * fb_comment_type_count(‘pings’); * fb_comment_type_count(‘comment’); */ if ( !function_exists(‘fb_comment_type_count’) ) { function fb_get_comment_type_count( $type=”all”, $zero = false, $one = false, $more = false, $post_id = 0) { global $cjd_comment_count_cache, $id, $post; … Read more

Pagination Issues using WP_Paginate Plugin

Your solution here is most correct.. if(have_posts()){ $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts($query_string . “&cat=4”); while(have_posts()){ the_post(); global $more; $more = 0; …but has some errors. Try: $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $category = get_category_by_slug(‘your-category-slug’); query_posts(array(‘paged’ => $paged, ‘cat’ => $category->term_id)); while(have_posts()){ the_post(); global $more; $more = 0; //output here } … Read more

Javascript Solution Remove Specific Tag but leave the rest in a specific DIV

<script type=”text/javascript”> function removeLink() { theAs = document.getElementById(‘lg_image’).childNodes; // get all children of div#lg_image for( i = 0; i < theAs.length; i++ ) { // loop through the children if( theAs[i].nodeType != 3 ) { // if the child is not a whitespace, theImg = theAs[i].innerHTML; // it is the a which contains the img, … Read more

I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box

Here is a complete tutorial with source files that do exactly what you want, You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more. http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html And here you can find some good information on how you call … Read more

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