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

learn more… | top users | synonyms (1)

2
votes
1answer
108 views

Custom Meta Field - Youtube embed

I created a custom meta field and I want to use it to embed a youtube video into the post. It works but when I post a code like this: <iframe width="640" height="360" ...
2
votes
1answer
694 views

How to include checkbox in widget backend form?

I'm trying to include a checkbox in my widget back end. But I cannot get the value (on or off) after the user submits it. I thought the value would be stored in "esc_attr( $check )" (as it is when ...
2
votes
2answers
84 views

Unable to set right time in admin and frontend template

When I run a simple php file called test.php (placed in the root of the wp installation) that contains something like that: <?php echo date('H:i:s'); ?> The result is right: 15:30:00 and the ...
2
votes
1answer
51 views

WordPress plugin installation

I am using the simple add_filter function to output the content. add_filter('the_content', 'my_name'); function my_name( $content ){ // code return $content; } When I activate the plug-in ...
2
votes
1answer
836 views

Wp favorite posts get user favorites in profile using buddypress

Im currently encountering a problem i display user wp favorites posts fine, but the issue is i wont display them, once users are logged out it says " no posts have been made" while each user has ...
2
votes
4answers
2k views

How to stop form resubmission on page refresh

Hi I have a form that adds attachments to a post, however when the form posts it obviously doesn't show the post with the new attachment echoing "your file has been uploaded". When the user refreshes ...
2
votes
1answer
188 views

wordpress custom post type remove duplicate menu item

I've registered a new content type with following - register_post_type('news', array( 'labels' => array( 'name' => __( 'News'), 'singular_name' => __( 'News'), ...
2
votes
1answer
159 views

Restrict access to post if it is currently being edited

On a platform with many Editors, the problem that I am experiencing is that two editors proofread the same post simultaneously (and disregarding the warning notice about someone else currently editing ...
2
votes
1answer
451 views

Adding a custom line of text to php code

The below code is used to pull in my Tweets and post them as individual blog posts on my Wordpress site. I would like to add a "Follow me on Twitter link" after the tweet when it is displayed in the ...
2
votes
1answer
424 views

How can I get an XML export of my 1K+ posts WordPress instance?

I'd like to export my database to XML because the import script to my new blog already supports getting data from that. A database backup or wordpress clone is not that useful in this case. The ...
2
votes
1answer
89 views

Set a User as Author of all 'New Posts' posted

An Author 'XYZ' is need to be set as the Default author of all New Posts. Irrespective of the actual Author posting the content, the post should be saved by this author 'XYZ'. Is there a Plugin or ...
2
votes
2answers
703 views

Hide main div if wp_nav_menu is empty

I want to hide the div class "navmain2" if the menu is empty. See code below: <!-- Start main navigation --> <div class="navmain2"> <div id="logo"></div> ...
2
votes
1answer
382 views

Site Title and Tagline in Theme Options Page

I'm using the Options Framework Theme to put together an options page. The user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the ...
2
votes
2answers
353 views

If in parent category

I have this structure Category > Subcategory > Post I´m trying to display some content if the user it´s on a specific category, or in it´s subcategory or post. I´m using this code but it only works ...
2
votes
2answers
737 views

Renaming wp-content folder dynamically

Is it possible to rename the wp-content folder dynamically? I am building a custom framework to use on themes and it would be nice to set it up where it does everything on its own. I am using this ...
2
votes
1answer
370 views

Rewriting search and pagination base

After trying for weeks now how to find a working solution I got rid of most of my functions and trials and just left the pagination function underneath in my functions.phh file: /** * Pagination ...
2
votes
1answer
114 views

Bug in Stackoverflow styled badge system script

I have modified an old Stackoverflow inspired badge system script to work with the latest Wordpress version. You can view the code here (and please feel free to use it if you wish): ...
2
votes
1answer
1k views

Bulk Image upload and one image for each post?

I have around 3000 photos, want to upload on WordPress. Is there any way to bulk upload all the photos as one image for each post ?
2
votes
2answers
284 views

Create new category upon save based on post information

After finding a couple of leads on how to do this, I'm coming up blank. What I am trying to accomplish is to add the post to a new category based on camera name. If the category doesn't exist, then to ...
2
votes
1answer
720 views

Appending meta value onto post content in WordPress during save_post

The problem seems pretty straight forward: Once the save_post action is fired, I would like to append the value of a meta key onto the end of the post_content if it's not already found within the post ...
2
votes
1answer
50 views

Output data like WP's plugin installer/updater

I want to update my plugin and have proper feedback, like the WordPress update/upgrade mechanism. How is this effect done? Essentially I have a script I want to run that has lots of processing, and ...
2
votes
1answer
857 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 ...
2
votes
2answers
191 views

WordPress 2.8.5 & 'Responsive Twenty Ten' - error

So, According to the WordPress theme download page; the theme 'Twenty Ten' and it's child theme/plugin 'Responsive Twenty Ten' are compatible with 2.8+ I'm stuck with using 2.8.5 at work, I don't ...
2
votes
1answer
322 views

How to create Sub Sub domain Multi User blogs?

Hi to all I would like to create a big Wordpress network with this structure: sitename.com (Main website) cat1.sitename.com (sub website) cat11.cat1.sitename.com (sub-sub website) ...
2
votes
1answer
106 views

Wordpress and Custom PHP single SignOn

I have a Wordpress installation and some php pages (not related to Wordpress). I want to use the same login between Wordpress and My Php pages. When I login from my php, and go to wordpress, it ...
2
votes
3answers
865 views

How do I get a list of popular posts by views?

I am using the Jetpack plugin to get 'site stats' which shows the number of views for blog posts/pages. So I'm no expert or anything but I'm guessing there is a table that stores these views. Is there ...
2
votes
4answers
4k views

Get custom post type by category in a page template

I've created a custom post type with categories and sub categories, what I need to do is list out the post titles and images for a given sub-category or category in a page template. I've got as far ...
2
votes
3answers
1k views

wordpress inserting posts programatically through a url

I have to insert posts programatically in Wordpress. I want that I should be able to publish posts via a url. Something like ...
2
votes
1answer
861 views

Using WPAlchemy metabox values in another metabox

I'm building a quite complex custom post type structure and I would need some help regarding my metaboxes. What I want to do: Thank's to the have_fields_and_multi() function, the user enters data ...
2
votes
1answer
230 views

Anything I can add to functions.php to make text widgets accept PHP?

Is there a way I can make text widgets accept PHP? Perhaps something I can add in to functions.php? I'm redesigning my site, and I was wondering why I didn't use widgets at all in my current design, ...
2
votes
2answers
224 views

Comment filtering (search)

Basically I want to develop the ability to search comments on my site. A form with input field where the visitor can enter a search string, which tells WP to display only comments that contain that ...
2
votes
1answer
289 views

Delete option value from array using update_option()

I have a user profile field which subscribes the user to forum posts by email. This adds the user's email address to an array in wp-options. Naturally I want the user to be able to unsubscribe, in ...
2
votes
1answer
236 views

wp_remote_get returns an error for valid URL

I currently have the following snippet of php to fetch some HTML and render it in my theme(squash theme). <?php $response = wp_remote_get( ...
2
votes
1answer
94 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
2
votes
1answer
2k views

Why Better WP security plugin returns 418 I'm a Teapot “error”?

I am working on the Wordpress website and all of a sudden after deploying it on the server, I started seeing a problem where some of the pages on my website return 418 I'm a Teapot as Response status ...
2
votes
1answer
68 views

nowplaying.include.php Will Not Display Results

Cyberchimps.com recommended I post here as they believed there may be a global issue with my request. I thought what I was missing was obvious and simple, but two months into this and being referred ...
2
votes
2answers
385 views

How can I add dropdown widget/box to admin post page?

I am trying to figure out how to add a dropdown widget to the post page. The reason I ask is because I would like to be able to have a few different post classes that the user can select while making ...
2
votes
1answer
100 views

Am I not understanding plugins?

So I am trying to make it so that you can load a class from a child theme, theme or plugin using the following: class AisisCore_Loader_AutoLoader{ protected static $_instance; protected ...
2
votes
1answer
48 views

Modifying Footnote Plugin for Descriptive Title Attributes

I've been struggling for a couple hours now to get this working... Hopefully someone here can help me. I just started using the wp-footnotes plugin, and I'm trying to set the title attribute on ...
2
votes
1answer
187 views

How can one utilize a variable as a callback function name for add_settings_field

I'm trying to cut down on the amount of code that is in my theme options function. I'm adding my settings like so: add_settings_field($k,$v,$callback,$the_options,$the_group,$args); This works for ...
2
votes
1answer
205 views

How to hide get_theme_mod if field empty

I'm using: get_theme_mod to show various pieces of info from the theme customizer, in the following format: <a href=" <?php get_theme_mod( $name, $default ) ?> ">This is the ...
2
votes
1answer
366 views

fetch_feed: retrieve entries in the appearing order, not chronologically

I'm using WP function fetch_feed to retrieve a feed and display its items. <?php /* include the required file */ include_once(ABSPATH . WPINC . '/feed.php'); /* specify the source ...
2
votes
1answer
146 views

Archive dropdown styling not applied

I am trying to add a custom dropdown for archives but struggling with couple of mistakes that might be the reason why it doesn’t work. The CSS only gives my dropdown the width, not the other styles ...
2
votes
2answers
43 views

A Specific Blog post to be assigned as the landing page of my wordpress blog

Is it possible for a specific blog post (in wordpress) to be the landing page? For example my domain name is www.overflowingstupidity.com and I have this blog entitled post "How to burn your house ...
2
votes
1answer
1k views

Rename image uploads with width in filename

I am attempting to change the name format that Wordpress uses to rename uploaded files. For example, when I upload an image with filename "cat-picture.jpg" Wordpress will create scaled versions and ...
2
votes
2answers
224 views

How can I access the “description” of a menu item?

Where you can add your menu in under appearance > menus, I have descriptions in. In my page, I want to be able to echo out that description. Not in the menu, but in my page. How can I access this ...
2
votes
1answer
118 views

New Plugin: Post update pushes a copy as a revision

I've been working alot with editing of posts after they've been published. I know I can hit update on the post to just update it, but I want to have the journey of revisions available for users to ...
2
votes
2answers
89 views

queries inside of a class

I'm building a plugin and I'm quite new to wordpress I have a class what has couple of methods what should execute database queries. The class look as it follows class MyClass{ private ...
2
votes
1answer
1k views

Check if post of title already exists

I'm writing a plugin that takes an xml feed and posts it into WordPress using wp-cron Everything is working dandy, except it keeps adding the same posts over again. So, I'm working on a system to ...
2
votes
2answers
1k views

Fatal error: Call to undefined method WP_Error::get_item_quantity()

I've implemented a way to show the Twitter feed without a plugin. It's worked for weeks(months even, on a different site), but is now giving me trouble. Here is the error: Fatal error: Call to ...