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

learn more… | top users | synonyms (1)

6
votes
4answers
934 views

Apply class to every paragraph that holds image?

When adding an image to a page or post, Wordpress is automatically adding a paragraph tag <p> as parent holding the image. Like so: <p><img src="my-image.jpg" alt=""></p> ...
2
votes
1answer
127 views

Help with a custom page template - listing contents of childpages?

hey guys, I have no idea how to solve the following problem. I'd love to have a page-template that lists all it's child-pages but with the content. e.g. Imagine I have a page called "WORK. And "Work" ...
1
vote
4answers
1k views

wrong php date()?

hey guys, it's weird and I've never experienced that before. I've created a new blog and a custom theme. I'm using <?php echo date("H:i"); ?>in my theme. The time that's put is 2h earlier. ...
2
votes
2answers
2k views

Auto-add paragraphs to custom field?

hey guys, is it possible to format text in a custom field input box automatically with paragraphs? e.g. like the normal text-widget that has the option to say "auto-add paragraphs" when there is a ...
1
vote
2answers
291 views

defining a folder location in order to recall it

I'm creating a child theme off of wp-framework and in it's header it uses <?php echo IMAGES . '/favicon.ico'; ?> to recall the folder where images are kept. How do I define or create the ...
2
votes
3answers
8k views

Add a Jquery Datepicker to custom field in post edit

I would like to add a custom field that is set by a jquery datepicker ui in the post edit panel. Im new to wordpress, so Im not sure how to go about adding something like this. I haven't had much luck ...
7
votes
6answers
3k views

Where to store PHP files created by plugin / themes

There are cases in which a plugin or theme needs to create a php file somewhere that can later include it. For example a captcha plugin, or some kind of a templating system like twig/smarty (In my ...
0
votes
1answer
324 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
322 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
393 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
250 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
772 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
249 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
923 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
833 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
4answers
317 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
2k 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
400 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
568 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
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
745 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
904 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
664 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
410 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
111 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 ...