how to remove all body classes in wordpress

I’m going to assume you mean the classes generated by body_class(), e.g. from the twentytwentyone header.php: <body <?php body_class(); ?>> <?php wp_body_open(); ?> The simplest thing to do is to just remove the <?php body_class(); ?> call from your header.php. Or if you can’t / don’t want to change that, create a new header.php for … Read more

List top 5 authors with most posts

Are you using WordPress 3.1+? There’s a nice get_users() function that’ll do the trick! However, you will need a little magic to boot: add_action( ‘pre_user_query’, ‘wpse_11832_pre_user_query’ ); /** * Adds “post_count” to the SELECT clause. Without this, the “post_count” * property for users will be undefined. * * @param object $wp_user_query */ function wpse_11832_pre_user_query( $wp_user_query … Read more

how to move from content and place them elsewhere on a page template?

You could use, for example, the_content filter, run a regex to remove the images and grab them in a variable, then print that variable wherever you want. For example, appending all images to the end of the content: add_filter( ‘the_content’, ‘my_the_content_filter’ ); function my_the_content_filter($content) { //$matches will be an array with all images preg_match_all(“/<img[^>]+\>/i”, $content, … Read more

Custom page template for multiple pages

You can always make use of the page_template filter to tell WordPress to use a specific page template for all child pages of a certain parent. It is as easy as creating a special page template, lets call it page-wpse-person.php. Now it is as easy as including that template whenever a child page of people … Read more

How do you create a custom template to display a category with an image and related posts below?

I am not sure I understand exactly the problem, but If I do – there is absolutely no need for a custom post type. all you have to do is use multiple loops and basically divide the query into sub-loops for each category . <div id=”cat-1″> <?php query_posts(‘cat=1&posts_per_page=5’);// put relevant category and number of posts … Read more

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