Articles of theme development

Check if current category has subcategories

I have found the following piece of code in the WP Knowledge Base theme in order to show subcategories of a parent category. The problem is that this only works for the first level of hierarchy, so I wanted to change the if clause in order to check if the current category has children but […]

How do I remove twentyten without ruining what I did?

I created a blog with the twenty ten theme. I understand there are issues with upgrading WP with this default theme. It overwrites what you did. Is there a way to fix this with starting over. How would I change something like this? Ex. <?php else : ?> <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> […]

When using wp_enqueue_script(); in a theme why don't we use add_action?

When using wp_enqueue_script in a plugin, I have always been told to use an add_action : function add_my_css_and_my_js_files(){ wp_enqueue_script(‘jquery-validate-min’, plugins_url(‘jquery_validate_min.js’, __FILE__ ) } add_action(‘wp_enqueue_scripts’, “add_my_css_and_my_js_files”); How come this is not required if you put wp_enqueue_script in the theme: wp_enqueue_script(‘jquery-validate-min’, plugins_url(‘jquery_validate_min.js’,

WordPress as a data intensive web app

I would like to get some opinion about using WordPress as a data intense Web Application, let say like rememberthemilk where a user can have multiple post (task) just in a single day. Or maybe like twitter where one can even have multiple post (twitter) in an hour. Another point is that those web application […]

Link won't show using the_permalink();

Inside my loop, I’m trying to have a link show and it won’t I’m not sure why Here is the code: <?php the_title(‘<h2 class=”wow”><a href=”<?php the_permalink(); ?>”‘, ‘</a></h2>’); ?> I understand this is maybe because of the ” quotations instead of “”, but how would I achieve this general thing with just PHP and not […]

how do you create an admin interface in plugin for your theme

I’m creating a theme that would need some settings on the client side. So I need a admin interface where they can set some values. (like, source of image, title, or numbers) so in my theme, I can just set some variables like <img src=”IMAGE_SOURCE” title=”TITLE” size=”NUMBER” /> If you can point me to a […]

Develop new theme without affecting the active one

Hi I will really appreciate your input. I just got a new template for wp. I want to start working on it without affecting the template already installed and running on the server. what’s the best way to work around it? someone told me to create a new directory and install wp in that directory, […]

How to display recent posts on home page with custom HTML

I am looking to display x (undecided) number of recent posts (no more than 10) on my home page. For each post, I would like to display the title and a snippet of the content. I can whip up a SQL query myself to get this but I was wondering what the WordPress function is […]

How do I get the next page of posts link?

Functions such as get_next_posts_link allow you to get the HTML link to the next page, with few parameters for change (label and max pages). I want to get the URL to the next page so I can add custom classes to the link.

the_tags without hyperlinks?

How can I call the_tags as a list without hyperlinks?