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

learn more… | top users | synonyms (1)

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
695 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
2k 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
140 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
840 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
803 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 ...
4
votes
2answers
10k 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
245 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
375 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
133 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
1k 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
528 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
2answers
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
77 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
668 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
454 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
464 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
739 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
613 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
138 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
425 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
383 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
85 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
122 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
378 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
396 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
2k 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
150 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
329 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
150 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
2k 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
752 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 ...
9
votes
2answers
1k 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
647 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
676 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 ...
4
votes
1answer
997 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; ...