Articles of theme development

Theme showing incorrect update

We have a totally custom theme that we have built in house, recently the WordPress updater has started saying the theme is out of date. When I investigated this supposed update it links me to a similarly named theme in the WordPress theme directory but one that is not developed by us. We normally update […]

get_query_var() and permalinks

I have a permalink structure that looks like this, %category%/%postname% I have a category.php template coded up and and trying to pull of the post of a certain category, so for example my URL may look like this, /category/category1 I want all posts that are in category1 to be return however, when using the following […]

Script only partially runs on theme activation, but runs fully on deactivation?

The code below is near the top of my functions.php and is set to run only when my theme is activated: if ( is_admin() && isset($_GET[‘activated’] ) && $pagenow == ‘themes.php’ ) { However, even though its creating the category “my-utilities”, it is apparently not able to set the parent of the category1 and category2 […]

How to link to theme options page from anywhere in admin?

I’ve managed to add my own menu to the admin bar. I want the first menu item to link to my theme’s options page. For example, is this 100% bulletproof or is there a direct method? echo ‘<a href=”‘.get_admin_url().’admin.php?page=functions.php”>Theme Options</a>’;

What are non-printable characters doing in my theme?

* REQUIRED: Non-printable characters were found in the ‘functions.php’ file. You may want to check this file for errors. What are non-printable characters and how can I correct it?

How to load a new template page according to a particular URL?

I want to load some of the pages(not wordpress page, a template file other than wordpress’s default template file) according to the url came on the address bar. for instance, I have page in my template file ie my_account.php to show my profile pic and other informations from to my wordpress pofile. and it is […]

how do I get a sidebar's id or number for use with is_active_sidebar()

From the codex is_active_sidebar( $index ); ?> Parameters $index (mixed) (required) Sidebar name, id or number. When i try any of my sidebar names it doesnt work; yet when I put in random numbers 1,2 and 3 guessing that my sidebars are numbered that way and it works, but this is not reliable. There is […]

using jQuery Cycle by Malsup with WordPress Page and Gallery

I would like to modify a WP Gallery to use the jquery cycle plugin by malsup. I know this is possible but would like to know best practice for this, if anything just pulling out the url for each image should give me enough to work with. Please advise on best practice for this. Note […]

Free starter theme to make mobile websites?

Is there any free starter theme to make mobile websites using WordPress?

Change template dynamically

Is it possible to change the template loaded for a page, as it loads, without having to change the record in the database? I suspect it can be done with the template_redirect action, and the will probably have something to do with the template-loader.php file in the WP core, but I can’t figure it out. […]