wordpress

php callback appending an extra 0?

I am trying to write a simple Wordpress plugin, which updates a custom field value and increments it by one, and then echos the result which is handed back to my javascript code. For some reason, the data returned by the callback function always has an extra 0 appended to the end. function like_post_callback() { $clicked = $_POST['c...

what's the best (php-based) platform for creating a portfolio site?

I've got a very simple site -- a few content pages and an image gallery. The design for the gallery calls for multiple albums, with thumbnails on the image page. We want an extremely simple, clean design. Usability of the back-end is a priority. My first instinct is drupal, because that's how I've been building my sites lately, but maki...

Excluding one category in Wordpress

I just started out using wordpress as a CMS. On the site I have 2 pages I want different posts to show on. So far I understand this small code to post only one particular category one a page (when put infront of the loop: <?php query_posts('cat=8&showposts=5');?> But what do I write when I need to exclude this category on my blog-page...

Using Python & XML-RPC to add a custom field to a Wordpress post?

I want to add an 'enclosure' custom field to an existing Wordpress post using Python & XML-RPC. My code looks like this: def add_enclosure(server, post_id, enclosure): post_data = server.metaWeblog.getPost(post_id, username, password) custom_fields = post_data['custom_fields'] new_id = max([int(field['id']) for field in cus...

How do I get the comment author in WordPress?

This deals with WordPress plugin development. Even if a user has not actually signed into WordPress, but has left a comment, WordPress remembers them from the last time. I wanted to toggle showing a "Subscribe To Newsletter" checkbox if they had already subscribed previously to a newsletter. I've already worked out the checkbox and it wr...

Is there a tool for managing redundant pages across a website?

I am in charge of constructing a website with a '2-dimensional' site map, as explained later. I am looking for (preferably a Wordpress plugin, as the site is built in Wordpress already) that would make managing thousands of pages a lot easier. To explain further, let me iterate my situation. I am building a website for a construction ...

how do i get jQuery .post to work with wordpress/php?

hi i'm building something like a posts gallery and i want to do the following: 1. have thumbnail for each post 2. when a thumbnail is clicked, i want the new post to be loaded at a div at the top of the page w/o the posts gallery changing. to do that i want to pass the id of the clicked-on post to that div and then run the query_string t...

Make a php function recursive

I have written a function for a multilevel wordpress menu, but I'd like it to work for any number of levels, at the moment it is written to work for 3 levels. //only gets the top level items $top_level_pages = get_pages('parent=0&sort_column=menu_order&exclude=129,2,13'); foreach($top_level_pages as $page){ //print_r($top_level_pages); ...

Delete Old or Redundant Post Metadata from Wordpress

Hello - it appears that somehow in the past, wordpress saved multiple redundant post-meta for post revisions which are no longer in the database. As a result, I have a ton of post-meta that does nothing and is tied to posts that no longer exist. Does anyone know how to remove this data in myPHPAdmin with a SQL querey? Thanks in advanc...

WP: redirect users to a certain category using cookies

Basically like cragslist. once you select city on craigslist, nexttime when you go to the site, it redirects you to the city you selected. What I want to achieve: When a person comes to the site and selects a particular category, the next time they come to the site (returning user) - the page will open up on that category section. I wo...

Chrome cache won't update in my site

Chrome cache doesn't seem to update while accessing my website. Only when people clear it or press ctrl+F5 they can see the new content. I'm running it on a Wordpress CMS. Does anyone have any idea why is this happening? ...

Best WP blank(naked) template?

Hi All I like to coding few wordpress templates, and did search around that found there are few naked templates available, which i can start with. As i am pretty new for wordpress, can you recommend the best naked template as foundation I can use? Cheers ...

.htaccess - Rewrite a request to one directory before the request is handled by that directory?

I'm trying to exclude all BUT one directory from a rewrite rule. I want the request to be handled by the index.php file in the root directory which will then include the subdirectory's index.php file as part of a script after wrapping it with it's own code. This is a really strange problem, since I'm trying to wrap Drupal within a Word...

how covert post into other language in wordpress?

hi In wordpress how to convert a post data into other language,i am given the xml response to mobile device.so each post is create in english but i have to response in chines and other language support,there are plugin like global translator but it use ajax,but i want the local function for translation.i am running wordpress 2.8 Please...

cakephp app authentication -> wordpress authentication

Hi, i have a cakephp app and included a wordpress blog. Does anyone have experience how i can extend the cake-app-authentication, so that the user is automatically logged in to the wordpress blog? thanks ...

What does this simple php code do?

I was browsing a worpress site, and spotted this line <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?> <li id="recent-posts"> <ul> <?php get_archives('postbypost', 5); ?> <ul> </li> <?php endif; ?> What do the colon before and after else do exactly?? How does this th...

Wordpress Custom Themes > How to script Categories, Tags and Excerpt options to appear on "page" editor

I'm using custom WordPress categories for some probably unintended functions, I will admit (things like marking a post no/index just by adding it to my custom "no-index" category, etc). But it sucks that WordPress does not enable pages with all the little extras you get with posts. For example, while the post editor gives you convenien...

WordPress development?

What's the most effective way to streamline WordPress theme development when moving from a dev to a production environment? ...

Wordpress excerpt - image and text

Hey, This is the mock up i have http://img697.imageshack.us/img697/3172/featuresb.jpg Each section will be an excerpt of a post that has a certain tag. Is there any way of doing this so a client doesnt have to touch and tags or code like that. Thank you ...

Wordpress Custom Query

I have posts that use a custom field for start date and end date. Query_posts returns an array of posts that exist in the category I'm filtering. How do I query posts using this custom field that has date i.e. 03/11/2010 and not the full array. Pagination works on the full array so it returns all posts. I can use an if else to only show ...