4
votes
0answers
52 views
How to write testable classes in Wordpress
I'm currently doing some modifications on the Wordpress plugin that I created in order to make it testable. The problem is I don't know which methods am I suppose to write tests for. I have methods ...
4
votes
0answers
232 views
How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
In WP 3.4.x and earlier, it was possible to add a button to the media manager by messing around in an attachment_fields_to_edit filter. For example, a plugin could, when it figured out that an item ...
4
votes
0answers
111 views
Permalinks so that one custom post type appears to be a child of another, not working
Currently I have two post types, "products" and "products-data" they are separate post types; however, for all intents and purposes products-data is a child post of products. The relation is ...
3
votes
0answers
210 views
How do I extract the Alt Text from an image attachment upload via the Wordpress Options Framework Plugin?
I'm currently creating a custom WordPress theme and using the WordPress Options Framework plugin to make a custom options page for my client. I'm able to easily create an image upload option and can ...
3
votes
0answers
155 views
Highlighting current item of custom post types' sub pages, listed by wp_list_pages
The below code is for listing the custom post types itself and its children in the sidebar.
The code works great but does not highlight the sub pages.
In functions.php:
...
3
votes
0answers
227 views
Extend walker class with custom post types
I'm using the walker class below, but I can't make it work with custom posts.
class Zwp_Walker_Nav_Menu_Dynamic extends Walker_Nav_Menu {
function end_el(&$output, $item, $depth) {
...
3
votes
0answers
67 views
How to reply to Buddypress notifications?
Currently, when I receive notifications from Buddypress, I have to log in the site to post a comment on an event, or a reply to a message.
Is there a way to reply directly in the MUA ? My idea was to ...
3
votes
0answers
134 views
Add Image to the RSS plugin reader from another RSS
Hello there i need help with the "Super RSS Reader". It works great but i need add function to get image thumbnail from RSS description.
foreach ($rss_items as $item){
// Get the link
...
3
votes
0answers
160 views
How to cache custom pages using W3 Total Cache?
Some posts are requested through Ajax.
<?php
// Filename: ajax-posts.php
require_once "wp-load.php";
echo my_get_post($_GET["id"]);
?>
How can I make theese Ajax requests cacheable by W3 ...
3
votes
0answers
68 views
List User Comments on User Profile BuddyPress
Does anyone know if there’s a way to create an option on the BuddyPress user profiles where it can list the users’ comments, so that the user can see a list of everything they commented on. I searched ...
3
votes
0answers
694 views
Custom Meta Boxes: multiple fields within a repeatable field
I am working on a meta box for events. Each event has it's own page with a meta box for the line-up, background image, tickets page URL and some text.
To create the line-up I would like to use the ...
3
votes
0answers
174 views
Best way to programmatically link to multiple categories (union/intersection)
This question assumes that you know about the various complex taxonomy queries available from the WP_Query API. I know about tax_query as well as about things like category__and, which allow you to ...
3
votes
0answers
116 views
Creating new dynamic menu including BP links
Perhaps I have missed something fundamental, but I am attempting to include the various dynamic menu items included with BuddyPress and other add-ons to my primary drop-down menu.
For example, the ...
3
votes
0answers
134 views
How to use custom database tables for custom post types?
I need to use an existing database table as a Custom Post Type (CPT) to integrate it with wordpress.
I've considered @boone-gorges thoughts here (should I?) and have decided, Yes, I need to use a ...
2
votes
0answers
37 views
How to change the matches in add_rewrite_rule
One of the examples using add_rewrite_rule function in wordpress is
add_rewrite_rule('^nutrition/([^/]*)/([^/]*)/?','index.php?page_id=12&food=$matches[1]&variety=$matches[2]','top');
I can ...
2
votes
0answers
52 views
Can't use the built-in wordpress install/upgrade plugin feature
When I try to upgrade or install a plugin I get a successful message:
Downloading install package from http://downloads.wordpress.org/plugin/jquery-lightbox-gallery.zip…
Unpacking the package…
...
2
votes
0answers
40 views
WP Cron emails not working
Running wp 3.5.1.
I have 2 plugins that work in part. They do everything nice. If I click to send emails, they send the emails. However the scheduled emails are not being sent.
The plugins are:
...
2
votes
0answers
15 views
Multi user site and image captions
On multi user sites when authors select images from the media library they can choose images that other authors have uploaded.
The problem is that they can edit the caption and it changes it for both ...
2
votes
0answers
30 views
Customize multisite site creation with user data
No, I've never made a plugin. But I would like to, or find someone who can work with me on it. What I'm hoping to accomplish is setup presets on site creation. I need my multisite to do this:
When ...
2
votes
0answers
102 views
PHP Fatal error: Out of memory / Unknown Error On Line 0
I know this has been posted a number of times but I'm getting really stuck so thought I would see if anyone can help.
My error logs keep getting these errors
[24-Apr-2013 01:25:44] PHP Fatal error: ...
2
votes
0answers
127 views
AJAX vs Fragment Caching for W3 Total Cache
I'm running a WP site with WooCommerce and I want to do some caching. I'm going to exclude the pages such as the cart/checkout for obvious reasons however there are a couple of the things on the site ...
2
votes
0answers
52 views
Is it safe to post form data via Ajax to the settings api? Am I missing something?
In my Wordpress Admin, I have my theme options set-up using the Settings API. I am trying to save the theme options form using Ajax so that the page does not refresh. The only thing i needed to add ...
2
votes
0answers
46 views
How to consolidate all sitemaps in a multisite network?
I have a multisite installation with quite a lot sites on subdomains. The problem is that all multisite sitemap plugins create a separate sitemap for each site.
I do not want to have to add dozens of ...
2
votes
0answers
61 views
Plugin development with unit tests
One of the things that my plugin does is creates a number of SQL tables as part of a versioning function (that is run under the admin_init hook as I couldn't find a better wordpress way of doing ...
2
votes
0answers
37 views
Automatically populate a hierarchical taxonomy from a custom field
I've got a vexing how-to that I've not found any help on. I have a custom post type that has a custom field with a date in it (format: yyyy-mm-dd-t). When a post is published or edited, I would like ...
2
votes
0answers
41 views
Add nonexisting pages to navigation
I want to include categories which are listed in a non-native WordPress table to display within the "normal" wp page navigation
(the table comes from WP-Filebase and is called ->prefix .wpfb_cats)
...
2
votes
0answers
27 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
0answers
46 views
Image upload callback in new 3.5 media
I am using new 3.5 media uploader in my theme frontend (base on this example). It is very simple when you want to do something with images after 'Select' button is pressed:
file_frame.on('select', ...
2
votes
0answers
50 views
Hide upload image fields for the different media upload popups
I am trying to change a few of the options in the Set Featured Image popup in the Wordpress admin. I can't seem to find anything that determines if the popup window is a Featured Image or an Add Media ...
2
votes
0answers
51 views
wp_generate_attachment_metadata returns empty array
foreach ($_FILES as $key => $file) {
$uploadedImage = wp_handle_upload($_FILES[$key], $upload_overrides);
pre_r($uploadedImage);
if ...
2
votes
0answers
46 views
Removing hierarchical pages in the permalink
I have several pages set up in a hierarchy on my site. Currently the site's pages and URLs look like this.
Page name | Current URL | Preferred URL
...
2
votes
0answers
191 views
Saving images from Gravity Forms repeatable File Upload as post attachments
I am trying to upload multiple images as attachments to a post using Gravity Forms and the Gravity Forms + Custom Post Types plugin.
I have a repeatable File Upload field using the Gravity Forms ...
2
votes
0answers
66 views
Custom Comments - Parent / Nested Reply
I am making a custom theme and have edited comments.php, but I'm unable to get the comments to save as a reply to another comment. I have succeeded in showing the comment parent id to show as a hidden ...
2
votes
0answers
88 views
Change post status based on meta value
I have this cron set up to trash posts x days after it is posted. This works. Edit: Added my answer to my question.
add_action( 'wp', 'do_trash_ads' );
function do_trash_ads()
{
if ( ! ...
2
votes
0answers
67 views
Warnings in nav-menu when visiting query pages
Using query-wrangler, similar to drupal's views, I created some query pages.
When I visit these pages, in the top-navigation-menu there is this warning:
Warning: in_array() expects parameter 2 to be ...
2
votes
0answers
81 views
Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
I am registering sidebars and sidebar widgets.
The theme currently supports two sidebars. Primary and Secondary.
add_action('widgets_init', array($this, 'add_sidebars'), 10, 2);
public function ...
2
votes
0answers
114 views
Paginate wordpress gallery
I am using wordpress gallery shortcode [gallery] I was wondering if there is anyway to paginate them without using a plugin.
2
votes
0answers
60 views
Placement of Code in Plugin for hooking `save_post`
I ran into a strange Problem today developing a new Plugin.
I set it up as usual, creating the f711-roomprice folder in the Plugindirectory, and creating the f711-roomprice.php as well as an inc ...
2
votes
0answers
75 views
Save HTML formatted data to wordpress post meta using add_post_meta()
Array
(
[post] => Array
(
[jw_objective] => Exposure to e<b>nd to end development</b> of various applications; right from requirement analysis to system ...
2
votes
0answers
78 views
Buddypress: Edit activity when new blog post
I am trying to edit the activity on Buddypress (1.7 and running latest Wordpress) for when a new blog post is created. By default it displays the excerpt and shows any attached images, it also strips ...
2
votes
0answers
42 views
Want to add my custom prepare query but add_filter doesn't run
I want to manipulate the order of WP_User_Query(). I want the user to come out ordered by a custom meta field and by ascending order.
I have the code correctly working tested it on users.php but ...
2
votes
0answers
77 views
How to move parent li to end of child ul
I'm working on translating a site from HTML/CSS to Wordpress, and I've come across an issue. In the spirit of keeping the site fully customizable from the dashboard, I've been using Wordpress' default ...
2
votes
0answers
117 views
wp-admin won't load after setting wp-login custom url
I changed the wp-login.php url to /login/ so all links in registration and forgot password emails have /login/ rather than wp-login.php.
The problem now is that when I visit /wp-admin/ or click on ...
2
votes
0answers
74 views
Scheduled Posts and wp-cron - Why don't scheduled posts publish if too old?
I notice that the documentation for wp_schedule_single_event mentions the following:-
The action will fire off when someone visits your WordPress site, if the schedule time has passed.
However ...
2
votes
0answers
66 views
“Allow Comments” box cannot be checked
I've registered a custom post type, ensured that 'supports' has 'comments', and comments are allowed on new posts under settings -> discussion.
I do see the check boxes for allow comments and allow ...
2
votes
0answers
64 views
Breadcrumbs which show parent category as well as childcategory
there is any plugin to show breadcrumbs included child category also
most of plugin support for parent category for example :
home >category 1 >subcategory 2 >subcategory 3 >post (most of time we ...
2
votes
0answers
59 views
Make Search Function include subdomain (blog.ourwebsite.com)
Wondering if there's a way to edit our search.php or .htaccess or function.php (or anything else...) so that our search function on our main site (www.oursite.com) includes the subdomain of ...
2
votes
0answers
52 views
Tab from Settings API resetting all options with INSERT INTO
I have an Options menu created with the code from Chip Bennett tutorial, the old code, though, the one from like a year ago (the new one has a much better validation structure, but still, it works ...
2
votes
0answers
38 views
Query meta field using between
I'm trying to Query some lattitude and logitude and then I get some long numbers and apperently the Query dont like that.
Let says I have these in the database
Meta-key: lat
Meta-value: 54.3415000
...
2
votes
0answers
33 views
Updated multisite locally
I manually updated multisite locally with 3.5.1 but now all my subsisites in "My Sites" link to the root site even though if I type the domains directly they work.