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

learn more… | top users | synonyms (1)

0
votes
2answers
1k 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
890 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
379 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
306 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
2k 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
346 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
713 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 ...
22
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
984 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
143 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
173 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 ...
2
votes
3answers
1k views

How do I get a list of popular posts by views?

I am using the Jetpack plugin to get 'site stats' which shows the number of views for blog posts/pages. So I'm no expert or anything but I'm guessing there is a table that stores these views. Is there ...
0
votes
2answers
3k views

How can I hide that I Use Wordpress (with W3 Total Cache)

For security reasons I don't want it to be obvious that I use Word Press. I use the W3 Total Cache plugin and minify HTML, CSS and JS. I may also use a CDN. Is it possible to modify the W3 Total ...
1
vote
1answer
634 views

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 ...
0
votes
4answers
1k views

how to show images without passing it to timthumb.php file for resizing

currently I m showing post image and it's exceprt on my index page of website. Beacuse of this site is slow downs as each image is passed to timthumb.php file. I want to change in code so that image ...
0
votes
1answer
180 views

PHP Puzzle: Unique Styles with PHP loop

The Puzzle: I am currently working on a music blog that has various venues and numerous locations that are laid out at the top of each post as follows: USA.California.Los Angeles. Hollywood Bowl ...
0
votes
1answer
684 views

Problem in replacing the_content with the_excerpt()

I want to add read more to a blog. For that I need to replace the function the_content(). I found it in the loop file and replaced it with the_excerpt() but still posts are being shown of full length. ...
0
votes
1answer
675 views

Is there a function to list all uploaded images? How can I add one?

Is there a PHP function that will return an array of all of my uploaded images? Or, failing that, how bout just my uploaded files? The end goal is to display a slideshow on my homepage: have it ...
0
votes
1answer
482 views

Show recent posts starting at a specific number archive

Is there an argument to define how many posts ago will be displayed in "recent" posts. Could I add something to this and define a specific number of posts ago to start the loop? $args = array( ...
0
votes
1answer
401 views

Change default comments form title [duplicate]

Possible Duplicate: Change comments form title on a page by page basis I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to"). I ...
1
vote
1answer
201 views

Change comments form title on a page by page basis

I'm looking to change the comments form title (my theme defaults this to "Leave a Comment" or "Leave a reply to"). I thought perhaps I could add a hook to comment_form_defaults but my snippet below ...
0
votes
1answer
263 views

Programmatically change post templates? [duplicate]

Possible Duplicate: Wordpress - Programmatically change post templates? I need to change the template on several hundred pages on my site. Does anyone know if there is a command to do it ...
0
votes
1answer
67 views

Wordpress time queries

When we setup the timezone in wordpress settings page. Does it changes the server time? If I call time(); does it returns unix time according to timezone setup in the settings page? I have checked ...
2
votes
1answer
200 views

Is it possible to move wordpress out of webroot?

Is there a way to put the wordpress out of webroot dir, and just leave a entry index.php to the webroot?
1
vote
3answers
606 views

Two-step login process - Is it possible?

Is it possible to do the following with Wordpress (without hacking too much code - I would like to make this a general plugin using simple hooks)? Log in with the username/password. If ...
1
vote
1answer
5k views

List page for custom post type?

I have created a custom post type in wordpress and have 90% of the functionality working correctly, but I am having a bit of trouble trying to create a custom listing page template. Currently it is ...
0
votes
1answer
109 views

Add title=“” to A PHP Code

I am using a code to call WP thumbnails and want to add a title="" tag. I would like the title to call the_title... how do I do so? I want to assign the title tribute to the image, not the link. My ...
1
vote
1answer
582 views

Pagination of custom mysql in wordpress

I'm a novice with php and mysql so please be kind. The problem is I'm calling a database which has various states open, closed, pending etc, all this works fine. The problem is when I click next on ...
0
votes
1answer
175 views

How i can obtain all the post meta for a specific post as an array?

<?php $fields = get_post_custom($ID); ?> This will fetch the custom fields ($key => $value) for $ID in to the array $fields. I want ALL the fields (both custom & standard WP fields) ...
0
votes
1answer
340 views

custom contact form no longer working (because of 3.2?)

Been trying to ask on Wordpress forums, but no hits. I'm hoping there are more people here that can help me. My custom contact form page used to work, but for some reason, it results in a 404 error ...
1
vote
2answers
345 views

Conditional display for custom fields/taxonomy

If there's a value for the custom field, I want it to display the value. If there's no value for the custom field, I want it to display "N/A". I have this working for custom fields but cant replicate ...
0
votes
1answer
128 views

Shortcode returns values in the wrong order

I have a shortcode function that returns: return '<ul class="list-pages">'. wp_list_pages( $args ) .'</ul>'; Of course it returns: {pages} <ul class="list-pages"></ul> ...
0
votes
1answer
292 views

Catchable fatal error in appcloud free theme by Tokokoo

I have been attempting to make this theme work, Kelontong by Tokokoo, as seen here : http://stylishwebdesigner.com/6-free-wordpress-ecommerce-themes-to-create-an-online- ...
2
votes
1answer
296 views

How to enlarge the media file upload size in wordpress admin

I'm using wordpress 3.0 with buddypress. I need to enlarge the file size that is being uploaded from the media section in the admin menu. We have tried many ways including the methods from this link ...
3
votes
2answers
777 views

WordPress as a backend only. How to output database content on public side without WordPress?

I'm a bit of a PHP MySQL newb but i feel i need to bypass WordPress for the frontend of a site i'm building (it is mainly just RSS and JSON feeds). I was wondering if there are any tutorials or advice ...
1
vote
1answer
525 views

User management system similar to wordpress one?

I am in very big need of a user management system just like the one that wordpress uses but without being blog related. I need to be able to manage users and apply certain privileges depending on user ...
1
vote
2answers
2k views

Initialize WordPress environment to use in a real cron script

I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as ...
0
votes
1answer
48 views

How *not* to show the last post on the latest posts list

An image speaks for a thousand words so please bear with me: http://interativo.modateca-sc.com/ The last post appears twice. Once as the feature post and then again on the "main blog part" where the ...
10
votes
1answer
439 views

Limit the number of inactive widgets

I'm trying to restrict the number of widgets from the "wp_inactive_widgets" sidebar to maximum 10, because the widgets admin page is incredibly slow: add_filter('pre_update_option_sidebars_widgets', ...
1
vote
1answer
212 views

Wordpress can't echo brackets

I am trying to make a simple plugin that will output the URL and title of a post. It should look like this: http://mysite.com/test-2/{Test 2} However when I use the code that I posted below, it ...
0
votes
1answer
437 views

Wordpress Specified file failed upload test

I am trying to upload a excel file to wordpress, i am getting error: "Specified file failed upload test.", .xls format file cannot be uploaded?? How do get arround it?
1
vote
2answers
993 views

Easiest way to show total number of subpages

I am making a portfolio site where each portfolio entry is a subpage of "Work". In my template, I am trying to say something like: worked on 15 projects and counting, where 15 is the total number of ...
0
votes
1answer
787 views

Three Questions with Twenty Eleven theme

I have a few things that I need help with in Twenty Eleven. The logo I put in the header is resized to 578px by 160px, when it is supposed to be 326px by 90px. I would like to simply the php code ...