Modifications to theme and plugin files to create new functionality.

learn more… | top users | synonyms (14)

1
vote
1answer
686 views

Limiting allowed html elements/strip harmful scripts from editor

How can I limit html elements allowed in the tinymce editor in Wordpress 3.1 and ensure harmful scripts have been removed (script/embed tags, etc)
2
votes
1answer
1k views

media_handle_upload weird thing

I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and ...
1
vote
2answers
1k views

How to allow visitors to enter custom post type?

I wanted to use a custom post type to create a "share your story" type of feature. People would fill in the text boxes and "share their story". This would then be automatically posted on to a stories ...
0
votes
2answers
1k views

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 ...
3
votes
3answers
353 views

Localization For Two Different Regions/Domains with the Same Language

I have a site which is based in US (ex. www.example.com). We've been tasked to create a UK/GB version of the site which has it's own domain (ex. www.example.co.uk), but shares the same common ...
1
vote
1answer
174 views

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
2
votes
1answer
112 views

user contributed content as custom post types

We are looking into creating a solution that allows user to contribute media files by filling out a form (without access to the admin) and have it ןד created as a custom post type. The files will be ...
2
votes
1answer
522 views

Get all posts WHERE custom_field is LIKE value

I'm trying to do a MySQL-style search with Wordpress' built-in functions for fetching posts. There's likely a simple way to do this and I'm probably just a little bit off from the solution. We have ...
1
vote
1answer
1k views

Adding Pagination on a Custom Author Page

i have created a custom author's page that list the title of their posts. but the problem is i can't get the pagination to work if it's beyond the set post per page value. i have used get_posts() to ...
2
votes
1answer
377 views

Show Custom Taxonomy Slug(s)?

can anyone help me with this? I need to print the slug of my custom taxonomy, can this be done? The following kind of works but it just shows the name, rather than the slug which i need for a class ...
1
vote
1answer
4k views

Displaying a checkbox array from advanced custom field

I'm using the advanced custom field plugin for wordpress and wondering if I'm able to do the following: If checkbox ticked = web and it equals the page title echo this. Does anyone know what code to ...
1
vote
1answer
424 views

How to set a single theme directory on a multisite blog?

Some days ago I've upgraded my single-site WP installation to support a multi-site WP website. So I've created two new sites and set the same theme I was using on my single WP blog before. But ...
1
vote
3answers
386 views

Override database config for WordPress multiblog

Our team has run in to a problem working with wordpress 3 multiblog. We usually work with a local copy of the site (localhost/testsite) but with the same database to keep all changes up to date. ...
0
votes
1answer
493 views

Customizing the gallery of the post correctly

I've found a way to insert a customized gallery inside my wordpress template but I'm not sure this is the better way. I've uploaded my images with the default image uploader of wordpress to manage ...
1
vote
1answer
440 views

Custom post type menu missing after 3.0b2 -> 3.1.2 upgrade

I had a theme in 3.0b2 that was registering custom post types and displaying them in the admin menu just fine -- after upgrading to 3.1.2, they no longer appear in the sidebar admin menu (although ...
1
vote
3answers
1k views

How to add classes in the wp_list_category parent link

How do I add classes in the wp_list_category , I know the wp_list_categories('title_li='); generates classes , but I want to add a class in the parent category link <ul> <li><a ...
1
vote
1answer
689 views

Post Type Label Name

i've just created a new post type. It's name is Academias so the first menu option is Academias as well. But I would like to change it to something like See All Academias (just an example), is that ...
0
votes
1answer
739 views

How to use multiple check-box values to work in a function and insert values in database

I am working on a custom theme where there is option to upload images . I have certain check-boxes in the form which the users select as per where the image has to go. My form code is as follows : ...
0
votes
2answers
536 views

How do I “trash” a custom post type post while logged in as Admin

I am using the members plugin and have a custom post type of "listing" When I navigate to listings in the backend, I can edit. quickedit, and view. There is no option to trash. I am logged in as ...
0
votes
1answer
388 views

Exclude current post but keep the same posts-per_page amount

Okay I have a custom loop within the main loop of the page that shows 4 posts but obviously excludes the current main post. I'll show you: <?php $my_query = new WP_Query( ...
1
vote
2answers
596 views

Creating an Archive using a Custom Taxonomy

I recently adjusted the twentyten theme to display archives in a three column grid. In doing so, it seems that the archive has lost the ability to display posts from the specified taxonomy. For ...
1
vote
1answer
2k views

WP 3.1 meta_query for multiple custom field values

I'm trying to use some conditional logic to compare custom fields in my query, but a bit stuck. How would I get all posts with ReleasedProject AND PermanentArtist set to 'true'? Here's what I have so ...
0
votes
1answer
797 views

How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?

I just upgraded from 3.0 to 3.1.2 and in the comments column under Posts in the WP Admin, this error keeps appearing for every row: Warning: number_format() expects parameter 1 to be double, ...
0
votes
1answer
535 views

How to fix these PHP Warnings with the “Feed JSON” plug-in?

I'm getting the following PHP warnings when using the WordPress plug-in "Feed JSON". Can someone tell me how to fix them? Warning: Invalid argument supplied for foreach() in ...
0
votes
1answer
437 views

Cannot upload to S3 using CDN Sync Tool

I'm trying to synchronise my files with the Amazon S3 server for distribution using CloudFront, as the CDN. I am currently having troubles syncing the files though. I've verified that the details ...
4
votes
2answers
2k views

Enabling Sessions in WordPress 3.0

Im using a wfcart in my WordPress site but for some reason on certain pages WordPress drops the session I'm wondering if there is a way to enable sessions in WordPress 3?
0
votes
2answers
158 views

custom post-type query just returns two posts

I'm making a custom activity calendar for a client here: http://arbeidshesten.com/aktivitetskalender/ The backend is a custom post type "aktiviteter", with custom fields for the date ("dato") and ...
0
votes
1answer
855 views

What would causes search to return incorrect results?

Recently our site began no longer returning correct search results. When searching it returns one result that's unrelated to the inquiry. I've turned off all plugins and reverted back to a day when I ...
0
votes
1answer
430 views

How Can I Always Display A Particular Post First Using WP_Query?

My apologies if this question has already been asked somewhere else, I searched but couldn't find anything. I am working on a tours website, there will be individual package pages that show some text, ...
0
votes
1answer
211 views

Customizing Titles on the Fly with Code

I hope this question is easy. I want to customize my theme so that the post titles are created on the fly with code. For example, I might have a post where a price changes on the page 4 times a week, ...
0
votes
1answer
557 views

Wordpress 3.1.2 Bug: add_theme_support() and video post format registering twice

Ive been experiencing a problem with the new WordPress 3.1.2 update. When i use add_theme_support(); and register an array of post formats, it registers all of them fine, but when it comes to the ...
0
votes
3answers
125 views

Odd functions.php issue in Wordpress

I'm using More Fields plugin, and when I use my functions.php to embed the custom field, I get an odd issue. The field value is followed by a "1" I use this code: //Address add_action( ...
2
votes
1answer
1k views

How to remove row-actions from pages table?

I've already found out here how to remove the row-actions from the posts table in wordpress admin. Now I'd like to do the same in the pages table. I've looked in the core files but, well, I just don't ...
0
votes
1answer
714 views

WP 3.1 & Sorting Admin Post List

I am stuck on two issues in trying to get my custom post type for events to function correctly in the admin area. 1st) I have upgraded to wordpress 3.1 after which the code (below) which was working ...
2
votes
1answer
1k views

wp-admin slow in multisite

Running Wordpress 3.1.2 (newly updated, installed as 3.0 about a year ago) with subdomain multisite & using the Sunrise domain mapping plugin. The frontend is fast, the backend (wp-admin) is very ...
1
vote
1answer
902 views

wp_nav_menu google analytics event tracking

I've got a WP3 custom menu, with a custom link in the menu, How can I add google analytics event tracking to that custom link. Thanks Alex
0
votes
1answer
108 views

After creating a new page, filling the page with structure

I looked 2 days now but I couldn't figure out how this is done: I created a new page in wordpress. This is easy. Then I see, that I can put content into the page. This is easy too. But how can I ...
0
votes
1answer
446 views

Force modified contributor role to be re-approved on edit?

I gave the Contributor role edit_published_posts capability. Contributor submits a post, Admin publishes it. Now Contributor can edit it without approval. Is there a way to force it to be re-approved ...
0
votes
1answer
268 views

How can I combine this php statement to get the results of multiple variable inputs?

This is my query, it shows the posts that have meta_key as extra1 and meta_value as test <?php $customkey1 = 'extra1'; ?> <?php $customvalue1 = 'test'; ?> <?php query_posts('meta_key=' ...
1
vote
4answers
3k views

What is causing this error? “Warning: Invalid argument”

I need urgent help figuring this out please - I've been working on a WordPress theme locally without problems, and now that I've uploaded it to the live server I'm getting this error: Warning: ...
0
votes
2answers
400 views

Site DOES NOT LOAD after 3.1 update

I recently updated my site to 3.1 and now the frontend of the site will not load. The weird thing is the admin section does load and is some what functional (sometimes the pages go blank and I have to ...
1
vote
1answer
697 views

Access post meta in future_to_publish function

Why am I having trouble accessing post meta data in a future_to_publish add action in functions.php? I have tried: function post_to_twitter() { global $post; $url = ...
0
votes
2answers
154 views

Display a specified content on a Page and all its child pages

I have a website with 5 main pages (consider them as sections), then 3-5 sub pages for each of them. I would like to display a flash banner for each section, i.e. it should display the flash banner on ...
2
votes
1answer
153 views

Is it possible to have two different previews of a post (ie. two templates for one post)?

I'm looking for a way to allow post editors to see two different previews of the posts they are writing. On the front, the same post can appear it two different sections of the website (each shows a ...
0
votes
1answer
458 views

Custom post type functions.php if statement on action

I am using developing a child theme for Woothemes' Canvas. I am trying to use functions.php in the child theme to only use actions on my custom post type. This code doesn't seem to be working: ...
0
votes
1answer
2k views

Use wp_list_categories to list parent categories from actual term

I currently have a taxonomy called wpsc_product_category. Under that taxonomy I have several terms used as sub-categories, and finally each sub-category has a number of products. I'm trying to use ...
3
votes
2answers
3k views

How do I create a featured post within a custom post type?

Do I do this exactly the same way as I would with normal posts? I use a $featured_cat global variable and pull that out. Should I do the same here? Or should I use an associated custom taxonomy? Or ...
1
vote
1answer
258 views

Is there a way to alter the order in which the plugins appear in the page?

I currently have the following plugins activated in my wordpress installation: row 1: Outbrain row 2: Subscribe via feedburner RSS/email row 3: Topsy tweet widget, FB like widget, WP-Email a ...
0
votes
1answer
142 views

How-to inspect filter-able $vars?

Note: This is more of a tutorial/wiki than a real question and should be a reference for later Questions. If you got something to add, please feel free to add an answer. Working answers get upvoted. ...
0
votes
1answer
194 views

Adding Theme File for Non-Wordpress Content

I have a third party events plugin that uses custom tables in the database. I have created a theme file (event.php) that pulls the data in based on a slug that is ideally given in the URL. I want to ...