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

learn more… | top users | synonyms (1)

3
votes
4answers
186 views

How to disable 3.1 “Admin Bar” via script for the admin user?

Every time I create a new site under 3.1, my first trip is to the Users > Admin User profile page to uncheck the "admin bar" checkbox. I'd like to place a script in my theme's functions.php to do ...
1
vote
3answers
2k views

How to call function that create table in database (plugin functionality)

I am trying to create a small plugin but it not creating table in database when i activate the plugin. please have a look the code given below there is function function jal_install () it not called. ...
0
votes
1answer
380 views

How to add drag and drop functionalities to a div inside option panel

Hi to all it's a few days that I'm trying to add some new functions to my theme option-panel, you can see my questions here: How to add an export function to a custom Option Theme Page Add a preview ...
0
votes
2answers
289 views

Testing a Form's Zipcode Field with Regular Expressions to Determine Wordpress Page Behaviour

I want to use a Regular Expression(regex) to test the value of a form's zipcode field on a WordPress page, then based upon those results either: Selectively assign/reveal price fields on the same ...
1
vote
3answers
2k views

only show container with next/prev links if they exist?

hey guys, i know there is something like if ( function_exists('') is it possible to use that with next_posts_link() and previous_posts_link(). The reason I'm asking that is that I have something ...
5
votes
2answers
2k views

Experiences with compiling WordPress using Hip Hop?

What are you experiences compiling Wordpress using Hip Hop? ( https://github.com/facebook/hiphop-php/wiki/running-hiphop ) Specific: is this maintainable with upgrades? is the performance ...
0
votes
0answers
100 views

WordPress Tag Page Hook?

Is there any hook for a tag page, so I can alter it's content before outputting?
10
votes
1answer
746 views

How do I make an HTML table from a database table?

is there a built-in wordpress function to make the HTML or should I use plain-old PHP?
1
vote
3answers
1k views

Custom Menus: dynamic highlighting problem with custom home link

I'm currently implementing wp_nav_menu - all has gone well save for dynamic highlighting. The menu code looks like this (when home, which is a custom link, is selected): <div ...
1
vote
1answer
118 views

Code to pull in a PHP file named after the category ID

I use this code to pull in an image based on a post's category. Images are named after the category they represent, so a post in category 50 pulls in 50.jpg. <?php foreach((get_the_category()) as ...
0
votes
1answer
905 views

Displaying custom post types as a gallery

This is a bit of a specific question--I have found bits and pieces of information on the net, but nothing that puts the whole picture together for me. Hopefully I can get some help here. Background: ...
0
votes
1answer
671 views

How can I get Wordpress to save comments in markdown format?

I love markdown, and I have the Wordpress markdown-for-wordpress-and-bbpress parsing markdown in my posts and comments. However, I've noticed that Wordpress saves the comments rendered in html ...
1
vote
1answer
3k views

Adding a post shortcode to a page template?

hey guys, The "mingle forum plugin" provides the following shortcode [mingleforum]. When I paste this into a page the forum is shown. My forum is using a specific page-template called forum.php. Is ...
0
votes
1answer
411 views

WP Subtitle Plugin Problem

I'm having some problems getting the WP Subtitle plugin to work. After inserting the <?thesubtitle()?> or <?getthe_subtitle($id)?> into the index.php template I get a 'call to undefined ...
1
vote
2answers
3k views

class=“parent” for wp_list_pages?

<div class="menu"> <ul> <?php wp_list_pages('exclude=&title_li='); ?> </ul> </div> creates the following output... <div class="menu"> ...
1
vote
2answers
112 views

Wordpress to end support for PHP 4?

Recently getting into wordpress plugin development, I started to investigate how to make my code backward compatible to php 4+. I've focused only on php 5.1+ for the past 5 years, so this was an ...
4
votes
1answer
1k views

Is it possible to create an “export to PDF” option?

I have a custom post-type "model", and I want to be able to export certain values (eg Name, Height, Shoe Size, etc) and a set number of images from the gallery, from each Model to a PDF. Ultimately, ...
0
votes
1answer
316 views

How to fix/improve this 'bad coded' function that sort posts by votes (for the Vote it Up plugin)?

The following is a tutorial to Sort Posts by Vote (for the Vote it Up plugin): I haven't found it anywhere so i put it here. This is a new function which add posibilities to sort post on index page ...
0
votes
1answer
771 views

Shortcode content filter?

I'm looking for something, but don't exactly know what. I have a shortcode, let's call it [shortcode]. Users will input HTML tags inside, mostly images, but also links, images in links, etc., for ...
1
vote
1answer
485 views

Using if/else statements with output from theme options

In another question I was talking about using theme options to modify CSS. This is a separate but related question. When a user sets a link colour in my theme, here's how I'm including their choice: ...
2
votes
1answer
101 views

First wordpress blog, should I make my own theme for maximum customizability?

I am, although still extremely n00by, a semi-competent web designer and developer and I have decided to start a blog. I have heard all about this WordPress phenomena and I am really excited to give ...
0
votes
3answers
741 views

Listing all sub-pages?

I'm wondering how to write a list of sub-pages of actually visited page. So I have 2 pages and 3 sub-pages for each: Colors [page] - Red [child of Colors - subpage] - Blue [child of Colors - ...
0
votes
1answer
471 views

Wordpress and MySQL: trying to print data using PHP from user_meta custom field data

I have some custom user_meta fields in my MySQL database. The data is stored in my DB as follows: the meta_key is called "paypal_user" and the info is stored in the meta_value column as: ...
1
vote
1answer
842 views

query if on page/2/?

hey guys, is there a way to check if i'm currently not on the frontpage of my blog? I know there are conditional tags like is_home(). However that won't work if I'm on myblog.com/page/2/ I have a ...
0
votes
1answer
319 views

Custom functions for string data calculations

Just a quick question. I have a form that calculates values based on user entry. The information is then passed via ajax to a php file for calculation returning the results. The problem is that that ...
1
vote
1answer
2k views

Why does Wordpress remove my variables in the URL?

I am trying to put variables into the URL, which I can then use in my Wordpress template. So for example I have created a wordpress template something.php and the page "somepage" with this template. ...
0
votes
2answers
753 views

How to edit background color of only one sidebar?

I'm using Oulipo theme on this site, which has two sidebars. I'd like to ask how can I change the background color of only the left sidebar? Also, how to change the text, hyperlink, hover and ...
2
votes
3answers
6k views

add_filter to post-gallery and remove all <br>'s?

hey guys, i really need your help. Whenever I use a gallery in wordpress and set it's columns to just 1 Wordpress automatically adds <br style="clear: both"/> after every <dl ...
0
votes
2answers
412 views

Is there any tool to find lines of codes responsible to generate front-end HTML elements?

Dreamweaver CS5 is very useful to design or modify a Wordpress theme. It inspects CSS elements in Live view (after seting up a test server), but its unable to trace original wordpress code responsible ...
1
vote
2answers
853 views

How to create another version of my site based on the same database

I have created a site and would like to create another version of the same site using the same exact database (db location, users, everything). The two sites would share one database. I already have ...
0
votes
1answer
305 views

How are these PHP functions applied to a specific page in WordPress?

I'm getting most of what's going on in the following code, with some help from http://www.php.net and http://codex.wordpress.org/Function_Reference/. In its current situation, only one page on the ...
2
votes
1answer
1k views

How to make alert for new version on theme options?

Let say my theme host on my server. User download my theme and use it. Now I want notify @ alert for new version of my theme. Example to show "New version has been release. Please download at ..." ...
2
votes
2answers
2k views

WP Insert Post function - Insert Post Thumbnail

Whilst performing wp_insert_post, how would one insert the post thumbnail. I tried the code below to no avail. $postit = array( 'post_title' => $itemtitle, 'post_content' => '', ...
0
votes
1answer
139 views

Add custom fields from different posts

I am trying to add up custom fields from different posts. The array I created is not working. Here is the code. <?php $totalpricearray = ...
0
votes
3answers
1k views

Timthumb.php image gallery not working on Multisite Wordpress

What I am trying to do is get a gallery working on a multisite wordpress installation . . It works on the home site because that is where wordpress is actually installed but not on the sub domain ...
1
vote
1answer
591 views

How to override .htaccess with new rules without ftp or edit it manual

I want script will add new rules to current .htaccess and user no need to ftp or edit it manually. Example, I use timthumb for resize image on my theme and want rewrite the URL and current .htaccess ...
1
vote
3answers
3k views

removing <li> tags from wp_list_pages() using PHP

as the title states, I am trying to remove the <li></li> tags from the list that gets generated with wp_list_pages(). My thinking is to somehow run a for/foreach loop through the menu ...
0
votes
2answers
188 views

Function Reference Documenting Template Tags for use in Custom Theme Templates?

(Moderators Note: Original title was "custom template / wordpress functions?") I'd like to use a modified WordPress theme template and was wondering where I can find a reference for the .PHP ...
0
votes
2answers
291 views

How would an if statement surrounding a custom field with two variables (holding values) look like?

This is from the codex: <?php if ( get_post_meta($post->ID, 'thumb', true) ) : ?> <a href="<?php the_permalink() ?>" rel="bookmark"> <img class="thumb" ...
0
votes
1answer
172 views

Display additional user fields

A theme is in development that echo's fields from the users account on their themed account page. This is the standard format. <?php echo $current_user->user_lastname;?> Thats all well ...
0
votes
3answers
3k views

Calling a plugin in theme development

I am trying to call plugins on a theme page. Specifically I am after the 'User Avatar' theme but their will be other later. How do I call a plugin on a theme? Presumable something linke <?php ...
0
votes
3answers
2k views

Problems wp_insert_post and save_posts filter

I'm having an issue with using wp_insert_post. I'm adding the ability for a post of one type to create a post of another type with the first post as the post parent. I was testing out a few things ...
0
votes
1answer
211 views

“Rendering of admin template [path to template] failed”

I've got a php script that is called when the user is editing the category. However, although the page renders fine for the most part, at the point where the image upload button should appear, I'm ...
1
vote
2answers
801 views

Use WordPress' URL rewrite engine

I'm developing a web application with user submissions, i'm not too hot on mod-rewrite and was hoping there is a way to utilise WordPress' amazing rewrite engine and incorporate this somehow into my ...
1
vote
3answers
8k views

Get PHP Fatal error on globalized $wpdb: Call to a member function insert() on a non-object- I have no clue. What to do?

I am trying to utilize this function. I cannot figure out why I am still getting the PHP error. All I can figure out is that for some reason the template isn't able to access $wpdb. I don't know ...
7
votes
1answer
3k views

How can I fetch loop of post titles via AJAX?

I have a list of the most recent post titles in sidebar.php. Here is an example of how that code looks: <?php $args = array('posts_per_page' => 20); ?> <?php $sidebar = new ...
2
votes
1answer
732 views

Add “last” and “first” to Wordpress Comment Pagination Links

<?php paginate_comments_links(array('prev_text' => '«', 'next_text' => '»')); ?> Using above in Wordpress theme to add comment pagination links - this displays as « 1 ... 4 5 6 "1" ...
2
votes
1answer
651 views

get_usermeta() deprecated in favor of get_user_meta(). But why doesn't it make use of it?

While coding WP I just wondered about this simple fact: get_usermeta() is deprecated since version 3.0. The warning suggests me to use get_user_meta(). Even the parameters are pretty similar, I ...
12
votes
4answers
8k views

User registration followed by automatic login

I am using a plugin modified for my purposes. What I am after is after the user has registered for it to automatically log them in and return them to the current page. At the moment it sends them an ...
0
votes
3answers
395 views

WP Insert Post If user refreshes override new post

WP Insert Post is a very simple and easy to use function. Currently I have it set up on event triggered by whether a user is logged in during a booking to ratify their booking in its own page. My ...