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

learn more… | top users | synonyms (1)

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?
1
vote
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
877 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
513 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
192 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
927 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
78 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
218 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
920 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
258 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
4k 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( ...
4
votes
1answer
6k 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
89 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
1k 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
212 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
291 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
441 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
1k 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
247 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
386 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
124 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
335 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
13k 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
210 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
242 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
419 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
135 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
771 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 ...
0
votes
1answer
57 views

custom data in url

Inside a WordPress site I load a external xml file parse it and show some links. The link looks like this: domain.com/prof/vac/item?guid=1234&title=foo This works, but now i would like the url to ...
0
votes
1answer
562 views

How to deal with a GET variable of 'name'?

I'd like to have a custom registration confirmation page live within a WordPress site. I can provide a URL for this page to an external site. When the registration is successful the URL has several ...
0
votes
1answer
397 views

How do I call an external php non WordPress class into functions.php?

All my WordPress files are in: /httpdocs/news/ and the classes I want to call are in: /private/classes/ Would I use the include_once() function or is there a WordPress function? And how would I ...
1
vote
3answers
325 views

Why the JavaScript code is ignored from wp editor?

In WordPress when i publish a page with JS code is ignored and don't returns anything. How can I make sure that when I write a HTML+JS code will be converted to output?! Like: <a class="print" ...
1
vote
1answer
551 views

Thumb rating for wordpress - top user

I am currently using gd star rating (thumb rating) to rate posts (articles - no rating on comments). What I really want to do is show a table of the top 5 users and their number of votes based on the ...
1
vote
1answer
269 views

Cause of Blank Lines Being Added to WP FIles?

Does anyone know why some of my websites add a blank line after every line of code, while others on the same host and server leave the files untouched? A few details that might help: PHP Version ...
0
votes
1answer
159 views

How to define template directory in this widget code

How can I define the template directory (So I can reference and image in the 'images' folder) from within this php widget code? // WIDGET CODE GOES HERE ...
0
votes
2answers
491 views

wordpress sql posts query won't display the latest post in a specific category

Hi I tried to display 5 posts titles from a specific category also show the date, but it won't display the most recent one that just published, I had to change the recent post date 2 months so it'd ...
1
vote
2answers
223 views

Anonymous functions usage

Just wondering what the preferred method of using anonymous functions is. First I had some code like this: function page_columns( $columns ) { $columns = array( 'cb' => '<input ...
-1
votes
2answers
185 views

Upgrade to WP 3.2/ and Server to php5 breaks theme? [closed]

I upgraded to Wordpress 3.2 and my server from php4 to php5 and now my site outputs this error; Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server ...
0
votes
1answer
406 views

How can I increase the post count for custom post types only?

I have the page count set to the default 10 in my reading settings menu. However, I use my template archive.php file for all post types, including posts and books How can I change the loop so that ...
0
votes
1answer
1k views

Show Custom Menu Name in Wordpress 3

Is there a way to display the name of a custom menu in the frontend? I can't use the widget title because of the usage of many languages.
0
votes
1answer
49 views

Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed

What are the differences, in terms of overall "work" required by the PHP processor to retrieve a page using these two permalinks settings: /%post_id%/%postname%/ vs /%postname%/ The second ...
1
vote
2answers
336 views

Is using eval() ok in this scenario

I am trying to include user input includes using "get_template_part()" The includes are added in the theme options eg a user inputs. get_template_part('content/block', 'branding'); ...
0
votes
2answers
241 views

Drupal is going Symfony. Would WordPress benefit from doing the same? [closed]

If WordPress would do the same, would it lose much in performance?