wordpress

What is happening with this PHP echo and how do I resolve it?

I am trying to add some logic to a wordpress template. I want to build a simple if conditional which will check if a variable equals 26. The variable "$value" must contain some extra hidden characters, because when I echo the content... 26 appears before the echo string values that should appear first. Therefore, the if-condition does no...

jQuery load is truncating the beginning

http://www.gomatagorda.com/matagorda-weather/ I'm using jQuery to load [root]/data/weather-full.htm which is uploaded by the weather station every 60 seconds. I'm loading that file every 30 seconds, to maximize freshness of the data. In Internet Explorer 7/8, after a refresh, half of the right column of data disappears. I've tried var...

SimpleTest for Wordpress plugins

Does anyone has any insight on unit-testing wordpress plugins with Simpletest, or other testing packages? ...

Unique url for a wordpress blog?

Hi, I run a wordpress blog.. And I'm considering submitting by blog to Google News, now Google says each of your websites page's needs to have a unique url with atleast 3 numbers. how should I get this done? Is there a particular wordpress plugin that'll do the job? Regards, ...

You do not have sufficient permissions to access this page.

Hello All, I am creating a simple plugin in wordpress this is a simple form with three fields that will save data to a database table. Plugin is activated successfully, but when i fill the form and press button to submit, it shows me a blank screen with error "You do not have sufficient permissions to access this page." i am stuck here. ...

Change widget's CSS class names for different category pages in WordPress

I want to change the class names of the sidebar widgets on every different category page of WordPress and I figured the best way to do this would be to make a function in functions.php with all the conditions and return the required class name. I then called the function in the list tags of the register_sidebar function. if (function_ex...

Wordpress XML RPC - Latest posts within Category

I am using the JoeBlogs .Net wordpress wrapper by Alex James Brown. It just essentially makes all of the XML RPC calls available to .Net. I have been using the GetRecentPosts(5) call, e.g. "Grab the 5 most recent posts", but this returns everything from the entire blog. What if I want to simply grab the latest posts within Category X? ...

Get page content with theme structure in Wordpress

I'm working on an ajax-based Wordpress site and I want to know if there is a way to get a particular page content with theme structure applied in. One workaround is to use wget or file_get_contents(page_url) but it'd be cleaner to use Wordpress built-in functions. Thanks. ...

Wordpresss- Custom Table Loop- not quite right

I have this code on a wordpress site, in a custom table. The page is here: http://ulsandbox.org/bbtb10/?page_id=183 Code: <h1> 2009 Authors List</h1> <h3> Click on each author to read more about them</h3> <p>&nbsp;</p> <hr align="left" width="75%"> View Categories:<p><a href="#childrens">Childrens</a> | <a href="#fiction">Fiction</a...

Why does my wordpress 404 page appear blank?

I have built a few themes and noticed that the 404 pages, once uploaded to my server. never appear. They always do on my localhost setup, and even themes for others have worked. I see no reason for it not to work, I have mod_rewrite enabled for the pretty permalinks but the 404 redirection seems not to want to work. Is this a known iss...

Require new password on first login to Wordpress.

I am trying to set up a Wordpress site that requires users to login. The usernames are going to be pre-populated into the db, with 1 default password for all. Once they enter the default password, they need to be taken to another login screen that will act as a registration page for them. They cannot change their username, but are req...

How to write "if something -> print" "else if nothing -> print nothing"

I am writing a php function for wordpress that is executed through an XML feed. Therefore we are excepting a feed and then based on the nodes placing those in our website. What I need help with is we have a bunch of different images of credentials (i.e BBB, chamber of commerce etc) What I need therefore is when there is a link to a BB...

Does Wp-Ecommerce works with LinkPoint gateway ?

Hi there. I have an online store working with osCommerce, actually works fine. But there is no integration with the store blog which is in Wordpress fortunatelly. Now I've seen a new payment plugin for wordpress called Wp-Ecommerce , so i decided to migrate the whole store to wordpress since this can be treated like a CMS. This plugin h...

How to best Implement a Google CSE for a WordPress Blog

What is the best way to implement a Google Custom Search on a wordpress blog. a plugin or just the normal way? do we still use the search.php in the theme? ...

Wordpress: How to compare 2 float values in meta_value column?

Hi Guys, I have about 100 posts in wordpress, all with a meta_key of price and a value. How would I go about searching through all posts with a value between 23.00 and 41.00 for example? I know that 'meta_compare ' treats 'meta_value' as a string, so I can't use this to solve my problem. Anybody have any clues? Thanks ...

IN Wordpress, .php files within the theme folder do not run, but return 404 error

I'm on a VPS environment so I have root access, btw. So take a look at these issues: http://www.sonikastudios.com/wp-content/themes/sonikas/scripts/timthumb.php?src=/wp-content/uploads/tedleescreenshot1.jpg&amp;w=100&amp;h=100&amp;zc=1&amp;q=100 That returns a 404 error. However when I move timthumb.php to the root of the site, it w...

WordPress Child Theme

I use the following code in my Single.php file to grab show a different single template file based on what the user is viewing. <?php if (in_category('Portfolio')) { include (TEMPLATEPATH . '/single-work.php'); } elseif (in_category('Blog')) { include (TEMPLATEPATH . '/single-blog.php'); } ?> The proble...

What does the function _($string) do in PHP?

I noticed this piece of code in Wordpress 2.9.1 (/wp-includes/compat.php), I don't understand it: if ( !function_exists('_') ) { function _($string) { return $string; } } It seems that PHP indeed has a function _($string) but I can't find the documentation for it. ...

Lists wordpress posts by category and tag

I would like to generate all posts that has say a category name of X and a tag name of Y with in wordpress. query_posts('cat=X List&tag=Y'); I above works to an extent but not fully since I need to repeat this list and just echo the_title(). The problem is very similar to the one found here http://bit.ly/ba4Zot ,the solutions provide...

how to add/display something in dashboard/users/authors&users/edit user (wordpress)

I want to add new user meta profile field for every wordpress user but only admin can edit it. I think I can use some code from Adding Custom User Meta to WordPress User Profiles | DQuinn.net Adding and using custom user profile fields but I do not know where to place the code and how to not to edit core code of word press ...