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

learn more… | top users | synonyms (1)

1
vote
1answer
471 views

If has $title in widgets

I'm writing a widget to display 125 x 125 pixel ads. There are 6 spaces for the ads and currently all works. However, I would to add some conditional logic so that if nothing is entered in the ...
0
votes
1answer
194 views

Adding a navigation page state to individual blog and portfolio pages

I'm using a Woo Themes template (Simplicity) for a client's web site. I'm using the portfolio page as the profile pages (Our Trainers). Also have a blog category in the main nav. How do I get the ...
1
vote
3answers
132 views

How to configure self hosted wordpress so that everything can be upgraded/installed from dashboard

I have a blog on shiplu.mokadd.im. After installing wordpress I see upgrade notice time to time. Sometimes its core upgrade and sometimes its plugin or theme upgrade. Each time I try to upgade any of ...
0
votes
1answer
397 views

How to change theme programmatically from a external application?

I have a one-click Wordpress install as part of my services. After install I want to show my clients a set of themes so they can choose one and their pages will start working without any configuration ...
0
votes
1answer
380 views

Why doesn't update_post_meta work for certain strings?

I am trying to store the local path to an uploaded file as a meta for a custom post type, using the following code: $upload = wp_handle_upload ( $_FILES [WPSM_MAIL_META_ATTACHMENT], array ...
2
votes
1answer
578 views

Advanced Custom Fields - Storing array value for further usage

This might might be more of a PHP question - but does deal with a WordPress plugin, Advanced Custom Fields I am using a global select option to store a specific Location (custom post type) as the ...
0
votes
2answers
299 views

Strip Paragraph Tag

In my image.php I am using this code to grab the image caption of each image. The problem is a paragraph tag ( <p> ) is being added around it and I don't want one to be. Could somebody tell me ...
0
votes
1answer
604 views

PHP variables in a post?

I'm very new to PHP. On a Wordpress site, I want to use custom Google Maps with the Javascript API V3. Some posts will have maps in them, and I want to use PHP variables to determine the unique ...
0
votes
1answer
5k views

Creating login session via CURL

Using the following code I experienced some problems: Login works but every link in the dashboard I will click will follow into the 404 not found page. It seems that there won't be a working session ...
0
votes
1answer
138 views

Update some database fields when post is saved

I have a class that will count the Lines of Code, Source Lines of Code, and the Code disk space used. I would like to save these values into the database so that these values can be calculated only ...
1
vote
2answers
1k views

Very Slow Page - How to Optimize # of Queries?

EDIT 12/19/2011 Thank you again Ijaas. Everything is working except for the order of the days. It is ordering the groups of days by the publish order. If an older post has a newer date in its ...
0
votes
2answers
223 views

Unable to process php via shortcode

I've been searching around for a fix to this and while I definitely have a much better understanding of my issue (thanks to similar queries posted by others) I am still not sure of the solution. I am ...
0
votes
1answer
887 views

working with term_relationships table

I have this little code to insert posts via custom form: $post = array( 'post_author' => 1, 'post_title' => 'my title, 'post_content' => 'my content', 'post_category' ...
1
vote
3answers
670 views

How to make Tag Aliases

How would I build something like this with wordpress. Where multiple tags texts all go to the same page. If you click on the tag "scifi" it takes you to tag "science fiction". I am not looking for ...
0
votes
2answers
265 views

WP_Query and help with the loop for magazine front page

I'm having a difficult time writing out the PHP for this magazine layout I'm making. Here's the prototype: http://socalnpo.org Here's what I currently have: http://socalnpo.org/wp The first 3 are ...
1
vote
1answer
87 views

How does Wordpress insert Paragraphs in posts

So when looking at the html-view in the editor there is no <p> tags, when a view the post every line break is surrounded with a <p>. How?
0
votes
1answer
2k views

Function to return true if current page has child pages

I'm trying to create a simple function to do a "status test". Goal is to test and see if the current page being viewed has any child pages or not. Using this to alter layout to accomodate child ...
0
votes
1answer
764 views

$wpdb->flush(); breaks the loop

I am using $wpdb->flush(); at the base of my page in an attempt to prevent the query executing multiple times due to caching however it seems that it isn't flushing the most recent query but the ...
0
votes
1answer
476 views

MySQL query performed 4 times inside loop

I have enabled custom php in my pages through the use of the exec-php plugin so I can run more complex pages than the standard WordPress page. I have had no problems with this plugin so far. I have ...
0
votes
1answer
3k views

How to display recent posts on home page with custom HTML

I am looking to display x (undecided) number of recent posts (no more than 10) on my home page. For each post, I would like to display the title and a snippet of the content. I can whip up a SQL query ...
-1
votes
1answer
187 views

which table updated after logout?

I am working on wordpress in which on clicking logout button user will be logout using <?php wp_logout(); ?> function when I followed some guidelines on wordpress site I came to know that it ...
2
votes
1answer
870 views

How can I make the “Preview Post” button save and preview in the same window?

When you choose "Preview", which is actually a link, <a class="preview button" href="?p=52&amp;preview=true" id="post-preview" tabindex="4">Preview</a> the post is saved and the ...
1
vote
1answer
77 views

Wordpress Access allowed to fewer pages till user logs in

Is it possible in wordpress,by editing theme functions.php, to stop user access for all pages except Home, about-us, contact-us until a user is logged in to the system? All buddypress and wordpress ...
0
votes
2answers
1k views

Why is home page content not displaying with this rewrite rule?

I am trying to pass a variable from a URL to PHP using mod_rewrite while maintaining standard WordPress functionality. Here's my mod_rewrite rules: RewriteEngine On RewriteBase / RewriteRule ...
0
votes
1answer
215 views

Modifying WP URL handing code?

I am trying to use mod_rewrite and modify WordPress' URL handling to allow for passing variables to PHP from the URL while maintaining "pretty permalink" functionality. (on WP 3.2.1) Something like ...
0
votes
1answer
855 views

Uses for function: wp_update_user

my theme currently uses the wp_update_user function to update a set of user metas. I created to some new user meta fields that I would like to include in the existing wp_update_user. The function ...
0
votes
1answer
251 views

Problem using explode inside add_shortcode() callback funciton [closed]

Explode not working as i expect inside add_shortcode() callback funciton. Here is the scenario: My implemented sortcode is like this: [table] name1 = value1; name2 = value2; name3 = ...
1
vote
1answer
3k views

Using require_once in a Plugin?

Whats the difference between these two code snippets, and which one should I use for a WordPress plugin? require_once(dirname(__FILE__).'/inc/canagan_admin_functions.php'); require_once( ...
2
votes
1answer
4k views

How can I see all the actions attached to an “add_action” hook?

I'm working with the admin bar and trying to debug some of the menus and their priorities. I know several callbacks get bound to actions, such as this one: add_action( 'admin_bar_menu', ...
3
votes
2answers
88 views

Wordpress will not operate correctly

My website is ImASpy.com. If you click on the link, Findings, this takes you to my first Wordpress page. It appears to work fine until you click on comments, or you try to go to the about page, which ...
1
vote
2answers
982 views

Theme Options: If There is No Input, Don't Display?

I have built a custom options panel which allows site owners to enter their social profiles. I then use the second code to make the links appear in the theme. When no link is entered in the options ...
1
vote
2answers
200 views

How do I implement a .diff changeset from core.trac.wordpress.org locally?

I have a local copy of the latest version of wordpress that I set up using svn co http://core.svn.wordpress.org/trunk/ There is a diff that I want to pull into my local fileset: ...
0
votes
2answers
262 views

WordPress Stripping Colons?

I'm souping up a WP theme with the BuddyPress plugin to make a cool hybrid of sorts between the two. Anyway... I'm using the following to grab author RSS urls. The problem being the colon ":" is ...
0
votes
2answers
3k views

I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?

I am trying to extend the Walker_Nav_Menu walker to make some changes to the way WP outputs menus. The method I have to override is start_el, so I created my Walker and copied the base method: ...
0
votes
1answer
413 views

Defining 'last' class on foreach blog posts

I'm using the following code to display the latest 3 blog posts on my front page but I need to add a last class to the 3rd post on the ID blog. <?php $args = array( 'numberposts' => 3 ); ...
0
votes
4answers
114 views

Create a slug for a page in WordPress

How can I create a slug for a page in WordPress? I see that there are custom formats available, but I would like to be able to specify things like: mydomain.com/about mydomain.com/home ...
1
vote
1answer
944 views

Preferred Method of debugging a wordpress SQL calls?

What is your preferred method of debugging Wordpress Applications when writing custom behind-the-scenes SQL calls, etc. ? Coming from a Rails background, I usually tail a log file that displays not ...
0
votes
2answers
234 views

How to make modifications only to certain elements of an HTML string on the server-side?

Is there a similar way to select / perform DOM manipulation on the server-side (PHP) like the way jQuery works? For example, if I wanted to modify content of each <pre ...
1
vote
1answer
373 views

How do I alter the comment form 'allowed tags' text in a plugin?

I'm using the PHP Markdown plugin, and I'd like to modify it so that it adds some text to the bottom of the comment form indicating that Markdown is supported in comments. I've been modifying my ...
2
votes
3answers
2k views

Import 10,000 Users into Wordpress WITH a specific ID for each user

I have a website which has about 10,000 users. I am converting this site over to Wordpress. The new site is ready to roll, but I have to bring over all the users. There are a number of plugins ...
0
votes
1answer
119 views

Pasting this PHP breaks my page. Why?

I tried a few echo commands, and they return properly. Breaking Statement <?php $gallery_ids = $wpdb->get_results( "SELECT gid FROM ".$wpdb->prefix."ngg_gallery ORDER BY gid ASC", ...
0
votes
1answer
328 views

Page load timer?

Ok, so I'm confused as to what's going on here... I've been trying for hours now to get a relatively accurate page load timer setup on my WordPress site, but nothing is working like it's supposed to. ...
0
votes
3answers
11k views

Warning when using <?php include 'thefile.php'; ?>

Would need some more help with the Did ask a question how to import some code with php, in this case it's a sidebar that will be used on some of the pages on a website, It's wordpress and it can ...
0
votes
1answer
205 views

How to call a specific value within the functions.php file?

Hi all, I'm a newb here, but hoping someone might have the answer to my question. Within my functions.php file, I have this code: //Contractor Page meta box details $contractorpage_meta_box=array(); ...
0
votes
1answer
237 views

Check against server time to display SQL entries - Radio Station DJ Rotator Plugin

I'm building a WordPress plugin that will create a radio station "On-Air Now" DJ rotator. Working options panel I've built so far: http://i.stack.imgur.com/SiYde.png I've based the idea on a PHP ...
0
votes
2answers
401 views

How to know where this function definition is declared?

I am new to wordpress, I wanted to know where this definition is mentioned in wordpress return apply_filters('check_password', $check, $password, $hash, $user_id); I found it in pluggable .php ...
0
votes
1answer
132 views

In adding CMS functionality to static website, is complete conversion the only way?

I have a static website that is built in ASP.NET and PHP, and I want to add the functionality of a CMS to it. I know the most complete way would be to convert the whole site over to WP - mimic the ...
0
votes
1answer
40 views

Creating a blog on my companies new website using Wordpress but I have sidebar issues

As said in the title, I am creating a blog on my companies new website using Wordpress but I have sidebar issues. The website is only in production phase at the moment. The Link is so you can see ...
0
votes
1answer
722 views

Error on Include php:/usr/share/pear

I'm trying to work with an old plugin http://wordpress.org/extend/plugins/wp-ecards/ (I'm not the plugin author) and I get this error in the php error log and a blank screen when trying to view the ...
1
vote
1answer
3k views

Front end submit form with jquery form plugin

Maybe someone can help me with a small problem I'm having. I'm trying to use this: http://jquery.malsup.com/form/ to create a submit form for Wordpress. I've tested it on a regular site(not WP) and it ...