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

learn more… | top users | synonyms (1)

1
vote
1answer
4k 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
3k 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
97 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
354 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
81 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
112 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
330 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
1k 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 ...
0
votes
1answer
2k 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
363 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 ...
4
votes
3answers
1k views

Has anyone managed to integrate the wp_editor inside a widget?

Adding this in the widget form method: wp_editor($text, $this->get_field_id('text')); seems to work. But after you press the "Save" button the widget goes funky... Adding ...
0
votes
1answer
142 views

When I use rewind_post() it shows menu items in my loop

I have code like below (I removed all the uneeded HTML and stuff for this post). The code is for my author.php page. So it shows some author data at the top of the page then runs rewind_post() so ...
1
vote
2answers
174 views

How to return multiples lines in a shortcode?

I found this example of a shortcode on the Internet: function project_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'class' => '', 'id' => '', ...
0
votes
1answer
124 views

Somehow adding to “Insert Into URL” posts are contradicting each other

I added a second upload image ( doc_thumb_box ). They both work perfectly independent of each other. But when the second one is added, the first one (doc_uri_box ) no longer pastes the value of the ...
1
vote
1answer
1k views

Sort query_posts for Parent Pages to menue order or the count?

thanks to a member here i display my Parent Pages in a 2 column grid with title and excerpt. But for some reason i can't figure out how to sort all 5 Pages by the menu order for example or the order ...
1
vote
1answer
554 views

How to hide all child pages with post_query?

i have a page template as start page(home.php). i use a 2 columns grid to display all pages on that home.php with title and excerpt. unfortunately also my child pages are shown and i can't figure out ...
6
votes
2answers
826 views

Can I use the same nonce for multiple requests on the same page?

Or does this break the purpose of the nonce, which I admint I don't quite understand it? :) For example on two ajax requests that run on page load, or when something is clicked: $.ajax({ type: ...
3
votes
2answers
298 views

How do i hide the <h2> if the <h1> appears

I'm working on a WordPress site that automatically displays an h2 on the page as what the page/post is titled. I want to manually create h1 for some pages and have the h2 to be hidden if the h1 ...
-2
votes
1answer
505 views

Too many if's and else if's ?? - Must be better way [closed]

Everyone on this forum has helped me tremendously. Thank you. I now have a page that functions the way I want it but my code seems to be cumbersome. To figure out a string to echo I have a long ...
3
votes
1answer
626 views

Variables declared in header not available in other includes

I have a var set in my header.php file: $myBool = false; and in page.php, I try to echo it: echo $myBool; But the variable is never set. This doesn't help either: global $myBool; echo $myBool; ...
1
vote
1answer
391 views

If has $title in widgets

I'm writing a widget to display 125 x 125 pixel ads. There are 6 spaces for the ads and currently all works. However, I would to add some conditional logic so that if nothing is entered in the ...
0
votes
1answer
182 views

Adding a navigation page state to individual blog and portfolio pages

I'm using a Woo Themes template (Simplicity) for a client's web site. I'm using the portfolio page as the profile pages (Our Trainers). Also have a blog category in the main nav. How do I get the ...
1
vote
3answers
129 views

How to configure self hosted wordpress so that everything can be upgraded/installed from dashboard

I have a blog on shiplu.mokadd.im. After installing wordpress I see upgrade notice time to time. Sometimes its core upgrade and sometimes its plugin or theme upgrade. Each time I try to upgade any of ...
0
votes
1answer
353 views

How to change theme programmatically from a external application?

I have a one-click Wordpress install as part of my services. After install I want to show my clients a set of themes so they can choose one and their pages will start working without any configuration ...
0
votes
1answer
347 views

Why doesn't update_post_meta work for certain strings?

I am trying to store the local path to an uploaded file as a meta for a custom post type, using the following code: $upload = wp_handle_upload ( $_FILES [WPSM_MAIL_META_ATTACHMENT], array ...
2
votes
1answer
507 views

Advanced Custom Fields - Storing array value for further usage

This might might be more of a PHP question - but does deal with a WordPress plugin, Advanced Custom Fields I am using a global select option to store a specific Location (custom post type) as the ...
0
votes
2answers
260 views

Strip Paragraph Tag

In my image.php I am using this code to grab the image caption of each image. The problem is a paragraph tag ( <p> ) is being added around it and I don't want one to be. Could somebody tell me ...
0
votes
1answer
467 views

PHP variables in a post?

I'm very new to PHP. On a Wordpress site, I want to use custom Google Maps with the Javascript API V3. Some posts will have maps in them, and I want to use PHP variables to determine the unique ...
0
votes
1answer
3k views

Creating login session via CURL

Using the following code I experienced some problems: Login works but every link in the dashboard I will click will follow into the 404 not found page. It seems that there won't be a working session ...
0
votes
1answer
133 views

Update some database fields when post is saved

I have a class that will count the Lines of Code, Source Lines of Code, and the Code disk space used. I would like to save these values into the database so that these values can be calculated only ...
1
vote
2answers
1k views

Very Slow Page - How to Optimize # of Queries?

EDIT 12/19/2011 Thank you again Ijaas. Everything is working except for the order of the days. It is ordering the groups of days by the publish order. If an older post has a newer date in its ...
0
votes
2answers
193 views

Unable to process php via shortcode

I've been searching around for a fix to this and while I definitely have a much better understanding of my issue (thanks to similar queries posted by others) I am still not sure of the solution. I am ...
0
votes
1answer
621 views

working with term_relationships table

I have this little code to insert posts via custom form: $post = array( 'post_author' => 1, 'post_title' => 'my title, 'post_content' => 'my content', 'post_category' ...
1
vote
3answers
518 views

How to make Tag Aliases

How would I build something like this with wordpress. Where multiple tags texts all go to the same page. If you click on the tag "scifi" it takes you to tag "science fiction". I am not looking for ...
0
votes
2answers
252 views

WP_Query and help with the loop for magazine front page

I'm having a difficult time writing out the PHP for this magazine layout I'm making. Here's the prototype: http://socalnpo.org Here's what I currently have: http://socalnpo.org/wp The first 3 are ...
1
vote
1answer
85 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?
0
votes
1answer
743 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
546 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
342 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
2k 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
174 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
761 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
77 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
935 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
203 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
684 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
228 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
2k 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( ...
2
votes
1answer
2k 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
88 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 ...