Does WordPress work without a theme?

I think there’s a song for that: “Imagine there’s no theme. It’s easy if you try. No hell below us. Above us only sky …” 😉 So in that imaginary dream: you can still fetch the RSS feeds from your site: example.com/feed/ you can still login to your backend: example.com/wp-login.php you can still access the … Read more

how to add version of style.css in wordpress

Version number is a parameter of wp_enqueue_style(). As per the Codex, here are all the parameters that wp_enqueue_style accepts. wp_enqueue_style( $handle, $src, $deps, $ver, $media ); So for example to load a stylesheet with a version number you’d do the following: function wpa_90820() { wp_enqueue_style(‘my-styles’, get_stylesheet_directory_uri() .’/my-styles.css’, array(), ‘1.0’ ); } add_action(‘wp_enqueue_scripts’, ‘wpa_90820’);

How do I turn off self-closing tags for markup in WordPress (for HTML5, or HTML4, for example)?

Line breaks are added by wpautop(), not wptexturize(). wpautop() is also the function that automatically adds paragraph tags. You’re better off fixing the <br />‘s than you are replacing the filter. Since wpautop() runs at priority 10, you can just hook in after that and fix it. add_filter( ‘the_content’, ‘html5_line_breaks’, 25 ); function html5_line_breaks( $content … Read more

Where can I learn to create my own theme?

There are many different ways to learn to create your own theme. First, there’s the “official” WordPress Codex on Developing Themes, but I’d say that it is more of a reference than a tutorial. Another approach and one I like a lot is to read some of the better tutorials about WordPress Theming on the … Read more

How to add custom css file in theme?

I usually add this piece of code if I want to add another css file <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/58351/<?php bloginfo(“template_url’); ?>/css/my_custom_css.css” type=”text/css” media=”screen” /> I believe the theme makers want to retain as much as possible of the theme’s layout design. So a custom css file doesn’t hurt much. I think it’s more of a support … Read more

What are all the available parameters for query_posts?

Below is everything from WordPress 3.0.1 found in the parse_query() function of /wp-includes/query.php (lines 1246-1550). However, it’s possible for a plugin to add parameters and so a list can never be fully complete: attachment attachment_id author author_name cat category__and category__in category__not_in category_name comments_popup day error feed hour m minute monthnum name order orderby p page_id … Read more

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