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

learn more… | top users | synonyms (1)

2
votes
2answers
5k views

Proper use of Output Buffer

I'm attempting to use actions to override function calls I currently have throughout a template (to make updating certain replicated sections easier). For example, in archives.php I have the ...
0
votes
1answer
1k views

How do I attach an invoice PDF to an email in the Dukapress plugin for Wordpress?

I'm using the eCommerce plugin Dukapress for my WordPress website. I want to attach the invoice PDF to the admin's email, but I'm not sure how to go about this. I'm under the impression that the only ...
1
vote
2answers
53 views

Trying to regain access to a wordpress based website

My Dad has a website based on wordpress, he went into the wordpress dashboard and modified the home page incorrectly appending an extra level to it, then when he exited it made changes resulting in ...
1
vote
2answers
2k views

How can I set a default category for a custom post type in wordpress?

I am trying to put together some functions in wordpress which will allow me to add a custom post type and associate a default category and post on the posts page. So far I have been able to create a ...
0
votes
2answers
466 views

Dynamic menu with custom post types

I'd like to create a dynamic menu with a mix of static pages and custom post type archives that applies a class of "current" to the current tab. The example below uses 1) Static page set as Home 2) ...
0
votes
3answers
2k views

Can a page contain php code?

I am trying to use the following line of PHP code in one of my pages: <input name="from" id="from" value="<?php echo $_GET['from'];?>" type="text" /> But instead of displaying an empty ...
3
votes
1answer
264 views

Adding Custom Fields for Img in Posts

I'm wondering how I'd be able to set a custom field within my Wordpress posts. I want to have a field available to add an image via the Post dashboard - that has a max width & max height set, I ...
0
votes
2answers
174 views

Trying do build a contact form

I have some problem making my contact form work. The contact form should only be in one simple site. So i created two templates. The first template only has the form. The other one have the php code ...
1
vote
2answers
685 views

How can I move (or create another) publish button?

How do I create a "publish" button to put in a custom metabox? Or if you can point me to the code that creates the current publish box, that'd help me out. -attempting to simplify my custom post ...
0
votes
1answer
707 views

What should I write in the post action of this front end post form?

I'm following this tutorial to build a front end form: <?php /** * * New Post Form for Custom Post Types for the Frontend of Your Site * By Jared Williams - http://new2wp.com * * Last ...
0
votes
2answers
57 views

Duplicate results are displayed in a custom plugin [closed]

I'm building a custom plugin for a Wordpress project I'm building as it's quite a specific project, and there isn't an off the shelf plugin suitable for the task. On one page I want to list objects ...
0
votes
1answer
648 views

wordpress radio button on single post page

I have two radio buttons that enable/disable the particular category posts from my wordpress homepage, I have also added these two buttons on single.php, this is what I'v done, If the post belong ...
2
votes
1answer
1k views

Why is my custom meta box input not saving

I've added the following function to functions.php to add a custom meta box enabling the end user to input a gallery shortcode. I then intend to use this to place a gallery in a specific place on the ...
0
votes
3answers
137 views

quotes problem in very simple sql

I just simply want to execute a SQL sentence inside of a post (i am using EXEC-PHP widget for that). The problem are the quotes when i want to do something like $my_name='hello' "select * from ...
0
votes
2answers
717 views

Cant we use a PHP file directly like myhome.com/some.php?

i just want to add a php file into my site say www.mysite.com/some.php. I dont want to create any page using that php file as page template. All i want is to add a php file which as some php codes in ...
1
vote
1answer
775 views

Custom field values to taxonomy terms

I have a "author" custom field with the names of author. I want to add some new features to the site so I decided that custom taxonomies will be the best solution. So what I need to do is to get the ...
3
votes
2answers
8k views

How to add a .php file to WordPress

I have a php file in my server (say www.example.com/up/up.php). If i access that file through the url, my site says no page found. but i want to call that php file using url parameter. I want to call ...
0
votes
1answer
236 views

Advertising: Every page refresh counts as 3 ad impressions

I have tried multiple plug-ins for ads and for each page refresh they all count it as 3 impressions. Any idea why this is happening or how to fix it? Currently using the Ad Engine plugin, and ...
1
vote
1answer
319 views

Is it recommended to pass some data to scripts in `wp_enqueue_scripts`?

I have on many occasions used wp_enqueue_script to pass some 'query variables' to scripts like this: function my_enqueue_scripts(){ $tempurl = urlencode( get_bloginfo( 'template_url' ) ); ...
0
votes
1answer
2k views

Using 'strtotime' function to convert a custom-meta-box to a date-stamp

I am building a "podcast" post type in a wordpress build using custom-post-types, meta-boxes & taxonomies. There may be a simpler way to do this.. I'm still learning and this is my first go at ...
1
vote
1answer
131 views

Wordpress Custom Content and Taxonomy's Archives

Ok so I have set up a custom content type: Event I have then set up the custom taxonomies in hierarchical format for Event: Type To display "event" posts in each "type", I'm using the template: ...
0
votes
2answers
1k views

Make Current/Active Page Number a Link (WP_LINK_PAGES)

With the default wp_link_pages the current/active page number is not a link. I would like to find a code/hack which turns the current/active page into a link to the top of the page. I am already ...
0
votes
1answer
78 views

Last class on last headline?

I have the following code which should add a last class to the fourth post but doesn't appear to be, what is wrong with this coding? It show's 4 posts fine but the fourth one doesn't have the class ...
0
votes
2answers
972 views

Don't display a sidebar widget when on a specific page

I am trying to stop latest blog items from displaying in the blog section of my site. I have used the following code: <?php if ( is_page('blog') ) { ?> <h2>Don't display ...
3
votes
1answer
508 views

Real time Duplicate title check

On my website there are a lot of authors and they are all writing about italian 'scene' so sometimes it happens that two of them write the same post or use same title so what I'm looking for is a way ...
0
votes
1answer
4k views

SetCookie simply not working

I cannot get a cookie to set properly through WordPress theme. I am putting the following code on the bottom of my functions.php page for my theme. function set_cookie() { if (isset($_GET['id'])) { ...
1
vote
1answer
75 views

Working with a modified WordPress & Theme and updating WordPress

I just inherited a site where the creator installed the Copperific Theme and then modified the source files to achieve customizations. My understanding of custom themes was that, in order to protect ...
0
votes
2answers
62 views

Unable to Find Space in Custom Function

As you can see in my next/previous link I have an extra space before the word "Previous" and I can't seem to find it. Any help is greatly appreciated: ...
0
votes
1answer
624 views

Setting a post's category

I'm creating new categories with galleries taxonomy : $wpdb->insert("wpem_terms", array( 'name'=>'Custom Category', 'slug'=>'customcategory', 'term_group'=>0, )); //id of ...
-1
votes
1answer
426 views

How to handle PHP parse errors?

I tried to execute the following code and I got a parsing error message (line:3). Here is the code on Pastebin http://pastebin.com/gC7rsJqw. I tried echoing but didn't seem to solve the problem. ...
0
votes
2answers
1k views

Convert WordPress date format to jQuery UI Datepicker format

I wrote the following function to convert the current WordPress date format into a format that can be recognized by the jQuery UI Datepicker: From: http://codex.wordpress.org/Formatting_Date_and_Time ...
0
votes
1answer
453 views

Auto create Nextgen Gallery on post creation [closed]

I was wondering if there is a way to create a nextgen gallery with a function, so that I can hook that into my front end post creation setup. The gallery could be completely empty or be created with ...
3
votes
2answers
2k views

How do I create a WP user outside of Wordpress and auto login?

I've built a directory of members on a non-WP site (using php and mysql). Each member can log in and update their details using a username and password. I want to be able to get this to automatically ...
0
votes
1answer
155 views

Wordpress custom post type and taxonomy

So I have a custom post type called Video and a taxonomy called category that I use to group videos togheter, so I want to list them like this: Taxonomy NAME 1 VIDEO 1 VODEO 2 Taxonomy NAME 2 Video ...
0
votes
1answer
659 views

Is it possible to display a DIV to not logged in users and then change it for users who are logged in?

Basically I'm putting together a magazine site that wants a strong focal point on the homepage for users who haven't signed up, if the user is logged in we need this content to show something else, is ...
3
votes
1answer
3k views

Using WP_Query - how to display something IF there are no results

I've used WP_Query to query and display events. In some cases, though, there are no events to be displayed and I'd like to display a friendly message when that happens instead of displaying nothing - ...
0
votes
2answers
471 views

How to access variables from Functions file in theme files

I just noticed, in a theme file, I can access custom functions I add to my functions file, however I can NOT access variables I set in my functions file. I have a few variables I set inside my ...
0
votes
2answers
133 views

Force string into signup form

I am running WP multi-site and BP. The plugin in question is Anti-Splog by WPMUDEV. They have advised they do not support customisations. Anti-Splog tries to limit spam blogs from appearing on your ...
0
votes
1answer
385 views

How To Use Custom Fields With .mp3 Links

Hope it doesn't seem to shallow of a question, but I've searched the web as much as I've could and have not found anything similar yet. :: Creating a regular post; How can I place a .mp3 link in a ...
0
votes
1answer
99 views

exec-PHP shows output at bottom of page

I'm using the latest Wordpress release with the default theme. I have a function similar to this which is included and called from within a page (using exec-PHP). <?php function myFunc($value) { ...
1
vote
1answer
5k views

Cannot get media type from 'x-mapp-php5'

I am moving a WordPress site from a shared hosting package to a VPS at 1and1 hosting. They have PHP ver. 5.1.6 but PHP5 support is there. I added the following 2 lines on the top of .htaccess file to ...
3
votes
2answers
4k views

How to include external page to wordpress page?

I have one external page (google_map.php) which contain code to display google map information based on the selection criteria. And in the wordpress page I want to display the google map which is ...
1
vote
1answer
99 views

Woo Framework: woo_cat_featured not populating

In framework settings: $options[ 'featured_cat' ] = array( "name" => "Featured Category", "desc" => "Featured Posts will display in the main rotator on the homepage.", ...
3
votes
2answers
378 views

PHP/Manual use of images? - 2 Questions

I've made a quick PHP script/page that uses the wp_insert_post() function to insert a post directly. And this works great. The post I am manually adding has an image in it, so I firstly ...
1
vote
1answer
84 views

Store records for a table in wordpress

I need to create a page in wordpress that displays a table with 3/4 fields, and let editors add and update the records in this table. I'm a drupal developer and don't have much experience with ...
0
votes
2answers
119 views

How to show number of unpublished articles?

I recently started an article directory using wordpress, and theme by dimox and plugin and plugin by artilcesss dot com. On homepage it shows number registered authors and and published posts. It ...
0
votes
1answer
363 views

making my own “related pages” / “pages you might like” section

I'm trying to get the tags of a post on the single content page and displaying a list of other articles that share the tags with the post. For example, the user is reading an article with a tag like ...
1
vote
1answer
2k views

Passing POST data from one WP post to another

I'm trying to pass data between two Wordpress posts via POST method from a form/link. However, the second post does not seem to be able to grab the POST data. I'm wondering if it has anything to do ...
1
vote
1answer
3k views

Run W3 Total Cache Flush Function with Crontab [closed]

Ok. I'm really stumped on this one. Basically, I need to call a function for the Wordpress plugin W3 Total Cache as part of a cron job in crontab. I'd like to automatically clear the entire page ...
0
votes
2answers
386 views

Allowing users to Sign-up > Login > Post articles that need approval

I need your advice! I have a small hobby website, it's a small music magazine, with all the content published by me. It's setup with an open source Wordpress Theme with my custom graphics and CSS. I ...