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

learn more… | top users | synonyms (1)

0
votes
1answer
315 views

Undefined variable _POST

Using 3.1.1 with debug on, I am getting following notice. Notice: Undefined variable: _POST in <filepath> on line 1000 Code at line 1000 is $data = $_POST Why am I getting this notice? ...
1
vote
1answer
318 views

Show css depending on activity type in BuddyPress activity-loop [closed]

I was wondering if anyone knew of a way to show specific styles to the activity loop depending on the activity type? This is what I had an idea of: function mycustom_act_type() { if ...
1
vote
1answer
389 views

Is there a built in function to see if a URLis oEmbed Compatible?

I want to be able to take a url and see if the domain is one of the ones Wordpress supports to add embeds via oEmbed. Is there a built in function that does this in WordPress or would I need to ...
1
vote
1answer
247 views

How to move all theme templates into a subfolder WP

I'm looking for a wordpress function to move theme's templates into a subfolder (mytheme/templates). Anyone know? The solution can be paid (plugin) or free.
1
vote
1answer
735 views

Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?

sanitize_title_with_dashes (see code below for reference) is the function Wordpress uses to format "pretty" urls. However, contrary to the function's comment header, it allows much more than ...
0
votes
2answers
2k views

if plugin is active? check if plugin is enabled or not?

I'm using the mingle plugin and the mingle-forum plugin. I want to show a certain part on my site only if those two plugins are active. How can I solve this? <?php if ( ...
2
votes
1answer
199 views

Browser title script ignoring is_page /else conditional [closed]

I've used this code to stipulate different separators for different pages in my clients site: <title> <?php if(is_page('Portfolio')){ wp_title( 'of', true, 'right' ); echo ...
1
vote
3answers
248 views

wordpress upgrade has broken my permalinks

I have just upgraded my wordpress installation from 3.1 to 3.1.1 and my custom structure permalinks are now broken, The permalinks were set to follow this procedure, /%category%/%postname% ...
0
votes
3answers
2k views

Use PHP in stylesheet to specify a background image based on Category ID

In my stylesheet I'm hoping to use code like this... background-image: url(/wp-content/images/' . $category->cat_ID . '.jpg); ...to pull in a different background image for each category. So ...
1
vote
1answer
896 views

Wordpress 3 - how are passwords stored and how do I compare to them?

For reasons I can't go into right now, I'm creating a form that will allow users to change their passwords for Wordpress by entering their current password and then entering the new password. I want ...
0
votes
2answers
206 views

Removing the first 8-10 letters from a post?

I have a widget that shows all the post names. All the post names are "Chapter ## - Title" I would like the php in the widget to remove the "Chapter 1 -" or "Chapter 12 -" for example so that just ...
2
votes
1answer
2k views

urlencoding of the_title() doesn't work?

hey guys, <?php urlencode(the_title()); ?>doesn't take effect. this is my entrie line of code: <li><a href="mailto:?subject=<?php urlencode(the_title()); ...
4
votes
4answers
825 views

Separate Wordpress themes for each category page

I've read http://codex.wordpress.org/Category_Templates, which tells you how to change your index.php for each category. But I want to load a whole different theme directory in for my site when a ...
4
votes
3answers
282 views

Is there a browser plugin or method to find which php template an item is coming from?

Is there a browser plugin or method to find which php template an item is coming from?
1
vote
2answers
3k views

page template for attachement page?

hey guys, I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so ...
0
votes
2answers
140 views

Building a Wordpress App

I construction of a administrative back office inside the wordpress theme for running our travel company, monitoring users, bookings and payments, it has come to my attention that it might be better ...
0
votes
2answers
1k views

Wordpress function when file is uploaded, deleted or edited

I need to call this bit of PHP when a file is uploaded, deleted or edited. $output = shell_exec("bash ./upload.sh"); echo $output; I can't seem to find the right code to execute this when any of ...
3
votes
1answer
4k views

adding a filter to a shortcode?

<?php echo do_shortcode('[mingleforum]'); ?> inserts the mingle forum into my content! is it possible to use add_filter() on that?
0
votes
2answers
2k views

PHP nested If statement syntax

Hiya Guys! so I need some help with this: <?php $newsposts = new WP_Query('cat=restaurant'); if ( is_front_page()) { echo '<h3 class="member-review">Latest ...
0
votes
2answers
3k views

Theme requires allow_url_include = on in php.ini

I don't even know where to start with this one. I'm using a theme that requires me to override server php.ini settings in my own php.ini with allow_url_include = on That setting at very least seems ...
2
votes
2answers
2k views

How to return the_excerpt (without echo)?

Hey all, I see that get_the_excerpt() echoes the post excerpt if it is manually set, but not if it is automatically generated (with just the 55 words, for example). [and its use is deprecated] ...
1
vote
1answer
1k views

str_replace the_title(); blues

I have a dilemma, well a new blog which im developing and a few of the posts titles are like this 'Tutorial: Build your first App' or 'Tutorial: Start your business with xensuithia' I have a page ...
0
votes
1answer
94 views

How to forbid users to change their first, last and screen names?

I'm using Wordpress 3.1. I need to forbid users to change their first, last and screen names in their profile, but admin must still have this possibility. How can I do that?
0
votes
2answers
398 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
2answers
538 views

What exactly does “Posts page” do in WordPress?

Hay, I'm making a WordPress template, and i have 4 main pages. HOME BLOG CONTACT ABOUT US As you can see "Blog" is a page (i need it to display when i call wp_list_pages()), but how do i edit this ...
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
377 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
284 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
99 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
740 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
987 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
117 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
896 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
632 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
2k 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
399 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
110 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 ...
3
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
756 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
474 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
100 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
727 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
464 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
821 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
318 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 ...