Post thumbnail is not shown in wp-admin

I figured out it was because of an script that was delivered with the Options Framework. There was a little piece of code in my functions.php which caused wrong javascript to be loaded. When you are having the same problem, be sure to search for something like wp_enqueue_media(); or something of the following script, comment … Read more

How to create a post based on data in a table?

yes that’s possible, you can create your custom post type and use MySQL query to fetch from csv file, and use insert into post function within the loop. you can use LOAD DATA INFILE query to fetch from excel and then use wp insert post function to insert into db. the query will look like:- … Read more

Exclude sub sub categories from displaying in the archive page

/* exclude sons */ $_categories = get_categories(array( ‘child_of’ => 16)); $exclude=””; foreach($_categories as $category){ $_exclude .= ‘-‘.$category->term_id.’,’; } $_exclude = substr($_exclude,0,-1); $_cats = $cat.’,’.$_exclude; query_posts(array( ‘cat’ => $_cats )); while ( have_posts() ) : the_post(); …… endwhile;

Index.php is ordering posts strangely

You shouldn’t modify the main query like that. Instead, make a secondary loop: // The Query $args = array( ‘post_status’ => ‘publish’, ‘post_type’ => ‘post’, ‘orderby’ => ‘date’, ‘order’ => ‘desc’, ); $the_query = new WP_Query( $args ); // The Loop if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); // Do output … Read more

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