The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

1
vote
2answers
338 views

WP_cron won't trigger my action

I'm in a dead end with a schedualed task in a wordpress plugin for a multisite. Somehow the action I added don't get triggered. The task is getting schedualed and returns a timestamp when I run ...
-1
votes
1answer
178 views

wordpress featured image

I'm new to Wordpress and I'm trying to create a new theme for it. I've downloaded the latest version (3.2.1) and installed it successfuly. But when I install my wordpress theme (to start to add the ...
0
votes
2answers
245 views

GET problem in WordPress

I have a strange problem. Any form using GET redirects back to the page not sending the variables. POST does work. I thought it might be an issue with the .htaccess but I deleted it and had WordPress ...
1
vote
1answer
1k views

How to sort posts based on the value (number) of a post's metadata?

I'm using the GD Star Rating plugin and the bbPress plugin. The first plugin do have a argument to sort posts by number of votes. But unfortunately, It doesn't work with WP_Query (and apparently the ...
0
votes
1answer
275 views

Add ASC / DESC to custom post columns

Im using the following code to create custom columns in the backend of the posts menu. add_filter('manage_edit-post_columns', 'post_edit_columns'); function post_edit_columns( $columns ) { ...
0
votes
2answers
411 views

Wordpress gallery shortag

I'm creating a simple slideshow on the side where i want to show 4 images from a post, i searched around i found this code that simply uses the build in gallery function <li><?php echo ...
0
votes
1answer
30 views

In Wordpress, how do you make several different editors for a single page?

I have a homepage that has many different parts to it. So a s single editor can get convoluted very quickly. Is there a way to break it up so that many editors attribute to this single page? If so, ...
0
votes
2answers
393 views

Display latest post from Wordpress Featured Category that is also in X,Y,or Z categories

I want to display the latest post from a "featured" category (id=1) that may also be in either X category, Y category, or Z category (id=2,3,4 respectively). Note, there are other posts in categories ...
3
votes
1answer
346 views

Installing wp3.2.1 on IIS; getting empty sessions

i have to install wordpress 3.2.1 on IIS 5.0 (yeah, i know...) here. Brand new default wordpress installation, no plugins ore previous versions installed. So, i downloaded the 3.2.1.zip and the ...
0
votes
1answer
1k views

post content and shortcode content displaying out of order

I've seen a couple of questions that address this problem but I can't seem to get it to work based on the answers given. I have 2 plugins that I've written myself that output content via shortcodes. ...
1
vote
1answer
3k views

add_filter the_content str_replace after shortcode

I want to add a PHP str_replace to the add_filter('the_content') function. I believe my problem is that the shortcodes are loading after the str_replace is called. I have a shortcode that outputs a ...
0
votes
2answers
418 views

Insert content into <title> head tag with function

Is there a hook available that lets you append or prepend text to the <title> tag in the head? I've seen lots of posts about customizing the <title> tag, but they all involve manually ...
0
votes
1answer
26 views

Limit 'contributers' abilities in WordPress

I have a few custom post types which i don't want any contribute to view or touch. However, the default settings allows contributes to see these in their admin. How do i disallow contributes access to ...
1
vote
1answer
1k views

Is there a Wordpress version that is incompatible with PHP 5.3?

Is there some decent information available which WordPress versions do not support PHP 5.3? I mean the more recent ones like 2.9 / 3.0 / 3.1? I'm only concerned about the Wordpress core codebase, not ...
0
votes
1answer
243 views

Almost Done… Post Format Code

I would REALLY appreciate some help with this, I have been working on it for a while and am so close to done I can taste it. I need each post format excerpt to have the same excerpt code as the ...
0
votes
2answers
3k views

How to show only parents subpages of current page item in vertical menu?

I just can't find a way to make it possible to show only current parent items down to current page item in a vertical menu the "wordpress way". What I want to achieve is the following dynamic ...
1
vote
1answer
880 views

Get most recent media upload

Wordpress sites this as an example of how to get the thumbnail: <?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> I want to know how can I use the same basic function but just ...
0
votes
1answer
525 views

WordPress sitemap with Custom Post Types

This is a really neat idea but I'd like to expand upon it. In his post, David Kennedy writes out some code to allow a basic wp_list_pages type feature for Custom Post Types to use as a sitemap. His ...
6
votes
6answers
1k views

Is there a way to use the Wordpress users but without loading the entire Wordpress core?

I have a Wordpress site and a web application that can be used only by the registered (Wordpress) users. Now I'm loading wp-blog-header.php to check if the user is logged in. Everything is working ...
0
votes
1answer
119 views

Load Javascript for a widget Worpress

I want to load a special Javascript File just when the widget is loaded in the sidebar. Where do I have to put my wp_enqueue_script(...) lines? class controller_widget extends WP_Widget { ...
0
votes
1answer
298 views

Categories Listing and Highlighting current category item

My query is on Wordpress and related to categories. I have a set of categories for my posts: All, Cat-a, Cat-b and Cat-c. a. When I click on the link to my posts page, I want to show an archive for ...
4
votes
4answers
5k views

Consuming an external API in WordPress?

I have a client who has a WordPress website, and he want to extend it to add new functionalities. These functionalities are included in a website I have already done (a kind of search engine over a ...
0
votes
2answers
279 views

Link to RSS feed not clickable?

Having recently installed a theme update on an inherited premium theme, I am facing a minor irritation that I do not have the coding knowledge to solve. The theme displays a link to RSS feeds for ...
0
votes
1answer
4k views

Convert a date to ISO8601 date format

This is more of a PHP question than a WordPress one. I have a custom post type event that by default outputs the date as "September 11, 2011 9:00 am" format. I'm trying to format the post in ...
2
votes
1answer
116 views

theme options echoing multiple times

I tried to strip down the Twenty Eleven theme options page and add my own fields correction: I followed a tutorial somewhere, but when I try to echo the data, it comes out multiple times. Here is my ...
1
vote
2answers
337 views

Where to place PHP code that inserts (or doesn't insert) menu item?

Where do I place the PHP code to insert or not insert a menu item based upon some condition, i.e. value of another PHP variable like so: $listItem = ''; <?php if ($condition) { $listItem = ...
0
votes
2answers
289 views

Fix My Custom Function: Remove Automatic <p>

I want to remove the automatic paragraph tag that goes around my excerpts, which are being outputted by a custom function. I'd really appreciate if you could tell me what to add to my code. I'm ...
8
votes
3answers
2k views

What's the best way to use the Featured Image for responsive web design?

I have a brilliant idea and since WordPress already takes care of some of the work, I just need to find a good method to make this work. I am working on a project that needs to be responsive to all ...
3
votes
2answers
384 views

Append code into wp-config.php

We have multiple wordpress sites and need to update the wp-config for w3 total cache. We have to append define('WP_CACHE', true); into the wp-config.php file. Is it possible to do this via ssh. I ...
0
votes
2answers
261 views

wordpress admin plugin menu custom css

I have a plugin that has a top level menu and subsequent submenus. Each one of these pages are going to need their own css and javascript. My code at the moment is: //main menu add_menu_page( "My ...
1
vote
2answers
733 views

Make Selected Mutiselect Items “selected”

I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a ...
3
votes
2answers
173 views

Detection of theme being used

OK, this may be a dumb question. Is it possible, using PHP, to detect which theme has been set for use by Wordpress ? If so, how's it done ? Thanks.
0
votes
2answers
929 views

Wordpress User Frontend Editing Custom Fields

I'm using the plugin Wordpress User Frontend and editing the title and content of a post is nice (I managed to change it so I can edit custom post types), but there's no support for editing custom ...
0
votes
1answer
815 views

Explode() expects a string

I currently am getting this error: Warning: explode() expects parameter 2 to be string, object given in D:\...\portfolio.php on line 12 Here is my portofolio.php: <?php $current = ...
1
vote
1answer
331 views

Linking text within textarea of custom meta box

I'm using 'Meta Box Script for WordPress' to create custom meta boxes and everything is working great...except the following: We have a textarea that we want to act, basically as another WP ...
0
votes
1answer
67 views

Writing a link cloaking plugin

I do not want to use any existing plugin. For WordPress-less projects, I would specify a PHP file in href <a href="FileOnMySite.php">Click here</a> FileOnMySite.php will be like ...
0
votes
1answer
123 views

Code in custom widget queries all posts, when it should only query the current post

I have a query in a custom widget (my first one!) which, if it's of custom post type book, retrieves the post ID. This then gets used in a WP_QUERY to retrieve data about the page. This works ...
1
vote
2answers
303 views

Dynamic page outside Wordpress

I have some data that I'm pulling from an XML source and would like to display it in Wordpress. One solution would be to take the static markup that my theme generates and spaghetti-code my page with ...
0
votes
1answer
1k views

Show post thumbnail only if it exists using timthumb

I am using timthumb as the image size management script throughout my wordpress site but I just noticed that an empty image tag shows up even when there is no thumbnail. <?php ...
4
votes
2answers
5k views

WP E-commerce: Showing 3 random products from current category when viewing product

This is more of a template tag question than a programming question, but since WPEC's wiki and forum is quite useless I had to give it a shot here. Using shortcodes you can easily include a given ...
0
votes
1answer
49 views

Using an “IF” statement based on the existence of custom field

I wish to use a function which is run only when a specific custom field is available. Something like: if (custom_field_x_exists("name_of_the_custom_field")) : <Do some ...
1
vote
3answers
339 views

Implementing a tricky wordpress menu (nested categories + thumbnails)

I'm trying to make a layered wordpress menu, out of categories. Here's how it's going to look: I have no clue how to develop this, can't do it with get_posts (not sortable by parent/children), or ...
1
vote
1answer
615 views

Why would a GET variable one one page of a site cause a 404 error when a GET variable works on another page of a site?

For example I have 20 pages on a site. one of them is called bacon another called eggs. on the same site...lets say breakfast.com I have the permalinks set up properly and have used them ...
19
votes
5answers
2k views

Should all plugins be encapsulated in a Class?

When developing a plugin should the functions be grouped together into a Class to avoid namespace conflicts? Does using classes create performance overheads for PHP? If there is a performance hit, ...
1
vote
1answer
2k views

Wordpress 3.2 query_posts and pagination, permalinks issue

My question is not new but it just does not work with all found solutions in my case. I am trying to display recent posts on single post using custom query_posts loop. The permalinks structure must ...
1
vote
3answers
1k views

Custom URL parameters in template files

SETUP I want to pull a query variable from the URL and use it on my single post template (single.php). For example: mysite.com/2011/07/29/testPost/?myvar=someValue To do so, I added the custom query ...
0
votes
3answers
916 views

Style every second widget?

I need to apply a certain style to every second widget in my sidebar, and I'm reluctant to use :nth-child due to cross-browser compatibility issues. Is there a bit of PHP that will allow me to apply a ...
1
vote
1answer
68 views

How would I go about creating a user ranked post popularity page?

I currently run a music blog using Wordpress as my CMS and i'm looking to redesign the site in the very near future. Part of my plan for the redesign is to try and integrate a user ranking system for ...
0
votes
2answers
142 views

Help with page nav?

I am taking over a site and we are making a sister site to it, but the problem is that the navigation was set up for the other site - so I'm having an issue getting the navigation to link to the ...
1
vote
1answer
171 views

Working with wordpress plugin and theme templates structures

This is probably totally off the wall, but I want to create a new wordpress plugin, that will have its own subset of templates and pages. Whats the best way to do this? The plugin will be used on ...