Articles of customization

is_wp_error() and handling errors

Im trying to build a function which grabs the feedburner “readers” using wp_remote_get(). I noticed that it frequently returned a value of 0. I assumed at first that it was a WordPress error (handled by is_wp_error()) or a flaw with wp_remote_get(). Wrong of-course.. Feedburner just kept crashing, so I used a second transient to store […]

show the meta values to visitors that collected via coment form

in stackoverflow (here) there is a solution for collecting extra information from visitors, and i want to ask that, is it possible to show the collected information to other visitors in his/her comment section? Thanks…

Create unique page without header.php for json feed

I have two WordPress sites on separate domains. I need to expose the latest posts within a category via a json feed on one site that I have to use for the other site. I’ll need to hit a “hidden” url, ex: /themes/mytheme/json_api.php?cat=news to get the json response. I’d like this json feed to be […]

Custom query with DECIMAL(5,2)

I want to know if there is a way to DECIMAL (5,2) instead of DECIMAL in meta_query

How to rotate the header image per day?

I’d like to have my header banner change every day, chosen (e.g. randomly) from a list/folder of images. So far I only found plugins that select a random banner per post or per page view, neither is what I want. Do you know of a plugin, or any other way? Edit: Example. I’m adding a […]

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 […]

Best way to pass arguments to another page in WordPress

What is the best way to pass arguments to another page in wordpress. I did it this way : <a href=”get_permalinka(id_of_page).’/&i=2&j=3&k=4′”>Link/a> I get this arguments with $_GET[‘i’],$_GET[‘j’],$_GET[‘k’],problem is : this works just with default permalinks,but when I change it to some other permalink type,it does not work any more.Note – I’m passing these arguments from […]

Is there a way to rename “themes” directory name?

By defining TEMPLATEPATH, STYLESHEETPATH, WP_CONTENT_DIR and WP_CONTENT_URL merely affect the naming changes to wp-content. Is there any way to redefine the theme path and plugin path, so the new path can propagate through function calls such as get_options or bloginfo?

Use a wordpress page to display a certain category

I’m trying to set up a portfolio page on my wordpress website, and I would like the following construct: /blog/ where I blog all kinds of things, including portfolio entries /portfolio/ where I show just posts from my portfolio category some regular /pagename/ pages (about, contact, etc) I want the portfolio section to have a […]

in_category() works in single.php but not in page.php?

I’m using in_category(array) inside The Loop to detect whether a post is categorised into the Discussion category (or has one of a couple of slugs). This works beautifully on single.php but doesn’t even seem to be evaluated when used inside page.php? FWIW, here’s my code: <?php if ( in_category( array( ‘Discussions’, ‘discussion’, ‘discussion-article’ ) )) […]