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

learn more… | top users | synonyms (1)

0
votes
1answer
264 views

Remove problem PHP code entered into footer via Theme

A friend of mine has a WordPress site using the Theisis theme. Recently he added a bit of problematic PHP code to the footer via the Theme (not into a PHP file). The PHP code is erroring out causing ...
0
votes
1answer
196 views

Missing sidebar parameter “fix” - before_content

as you know the sidebar parameters from register_sidebar() that control the widget layout are - before_widget - after_widget - before_title - after_title the problem is that you cannot implement ...
1
vote
3answers
181 views

Recent comments from my blogs only

I'd like to create a list of recent comments, specific to each user on my network (Buddypress). My best idea so far is pretty lame: DB Query on all user's blogs, compare dates, select top 10 by date. ...
0
votes
1answer
136 views

How can I reuse the code to capture a param in a URL and place in a value in a hidden form?

I have a form that will be re-used in different posts. I also have php code that will be reused to populate the form with the value in the URL. I tried to use php shortcode and wp php exec, but it ...
0
votes
1answer
3k views

Fatal error: Call to a member function query() on a non-object

In the code below (from my functions.php), I'm attempting to create an array of items from the wp_postmeta table where the meta_key is "_wp_attached_file". I'm getting an error: Fatal error: Call to ...
1
vote
1answer
435 views

How to list all images in uploads directory except those that are attached to any post

I've got code in my functions.php which parses the WP uploads folder and lists all images it finds there. Is it possible to place a filter here that would exclude any image that is already "attached" ...
1
vote
1answer
111 views

Author Tracking Code!

I need help with coding this piece. Basically i want with someone click on my author page. It stored a cookie of that author name and email. I want the cookie to stay in place untill the person close ...
1
vote
1answer
546 views

problems with wordpress and php version 5.3.3-1

I recently installed a server with new php version - 5.3.3-1 and when I imported wordpress site and database, there were some problems with plugin settings - some of them were reset. In pagenavi ...
3
votes
3answers
2k views

Need help with friendly URL's in Wordpress

I'm creating som custom templates in Wordpress and I'm passing some data in the URL's. Currently my URL looks like this: http://www.mysite.com/designers/?id=43&name=designer+name The URL ...
0
votes
2answers
835 views

Strip tags from a the terms() function

Trying to print my custom post type's taxonomy but without the link. Tried this, but doesn't seem to work, any suggestions? $text = the_terms($post->ID,'type','','',''); echo strip_tags($text); ...
3
votes
1answer
2k views

difference between esc_attr(), strip_slashes(), strip_tags()?

So what's the difference between these, and when should we use each one? Is esc_attr() safe enough to escape any type of data you get from the user ?
3
votes
2answers
611 views

Enable/disable post revisions programmatically

Is there a way to temporarily disable revisions.... I have noticed that wp_update_post is very slow and creates revisions I don't need. The fix could be to disable revisions before issuing ...
0
votes
1answer
2k views

Horizontal drop down category with hover effect working

It will be difficult to explain what I need in words, so please see a live demo of the horizontal navigation menu here, http://cn.wsj.com/gb/index.asp I want to replicate it for wordpress categories. ...
1
vote
2answers
223 views

Using wordpress template tags within an array

A bit of a noob PHP question coming up. I am trying to create a generic archive style view for my custom post types. Ideally I want to create one generic template that can be used for all post-types. ...
2
votes
1answer
869 views

Display All Post Attachments and Assign Class to the Last Image?

I have a function get_images() in which I would like to display all image attachments for the current post (or page) in a list with the last image having a class="last" attribute to mark it as the ...
1
vote
2answers
507 views

I can't view or add comments

Hey, there. I just got this site up and going. http://www.paledogstudios.com It works fine except for the fact I can't seem to see past comments (this blog was imported from blogger) or add comments. ...
3
votes
1answer
2k views

Wordpress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]

Possible Duplicate: WordPress upgrade now receiving Error 101 (net::ERR_CONNECTION_RESET): Unknown error We have just installed WordPress 3.0.1 and everything worked fine. However, as soon ...
0
votes
1answer
1k views

Admin-ajax.php appending a status code to ajax response

I'm writing a plugin that uses Ajax (jQuery with form plugin) via a form submission and the php function returns a JSON response. add_action( 'wp_ajax_bubbly-upload', 'bubbly_upload_submit' ); ...
1
vote
1answer
1k views

Adding graphics to 404.php page

I am trying to customize the 404.php page by adding a graphic. I can figure out how to change the text and links, but the HTML I just don't know well enough to add a picture or graphic. I am using ...
1
vote
1answer
283 views

want to create a subcategory.php to manage subcats

is it possible to create a subcategory.php and use it to manage subcats. or is there a way to get around this. if it is not possible.. is there something like this <?php if(is_subcategory() || ...
3
votes
3answers
5k views

How to set custom cookies before output

What's a surefire way to check/set cookies before the php headers are sent? Is there an action or filter that would be the best place to hook a setcookie() function?
1
vote
2answers
3k views

How can I get the page or post language when I use wpml?

I'm using WordPress MultiLanguage Plugin and I want to know what is the language of a specific element, page or post. I do have the id but I want to obtain the language.
0
votes
2answers
3k views

What might cause “junk after document element” error?

I have PHP errors redirected to log file. Only for WP installation so this definitely doesn't come from somewhere else. This is what started to come up recently (this is all of them, not cut): ...
0
votes
2answers
293 views

Best way of getting a a series of custom fields into an array?

I've a series of custom fields attached to certain pages. These fields are named slide1, slide2, side3, slide4, slide5, slide6. These are images which are going to be used as a slideshow (I'm using ...
10
votes
9answers
5k views

Adding first / last CSS classes to menus

is that possible, without javascript hacks? like this: <ul class="my_menu"> <li class="first"> ... </li> <li> ... </li> <li> ... </li> <li ...
1
vote
1answer
504 views

Widget Javascript code (ajax)

I have a widget like this: class test_widget extends WP_Widget{ function test_widget(){ $widget_ops = array('description' => 'test widget'); $this->WP_Widget(false, 'Test', ...
1
vote
2answers
594 views

WordPress php error after editing file with FileZilla

I use the free FTP software FileZilla. In most cases, whenever I open any PHP file from FTP using FileZilla, I get this error after editing then saving the file: Parse error: syntax error, unexpected ...
2
votes
2answers
413 views

Is This A Correct Example Usage Of current_filter()?

Is this a good example of usage of current_filter()? <?php add_filter("_my_filter", "common_function"); add_filter("_another_filter", "common_function"); function common_function(){ ...
5
votes
3answers
1k views

How to Control user registrations directly on sub-sites

Does anybody have Idea to enable a wordpress based multisite user to automatically get access to all sub-sites under same Multi site ? If I have A Multi-site installation(Also Buddypress enabled) at ...
0
votes
3answers
2k views

I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?

I did some quick looking around, but my PHP skills are pretty nascent. I am sure there is just a package that needs installing. Edit to add additional information about the setup: Using: yum info ...
1
vote
1answer
78 views

RSS Subsriber count without using feedburner

Currently, I have a blog which is running on wordpress. I want to know how many users subscribe my feeds. I know that if i used feedburner, I can get the counter from there. But I was really wondering ...
3
votes
3answers
603 views

WordPress Theme variables scope

I need to create a variable that can be accessed throughout my WordPress Theme template files (index.php, header.php etc..). I know function definitions go inside the functions.php template file (in ...