9
votes
0answers
77 views
+100

Filtering multiple custom fields with WP REST API 2

I want to filter posts based on multiple acf custom fields with AND relation. Something like this: $args = array( 'post_type' => 'product', 'meta_query' => array( ...
7
votes
0answers
64 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 ...
6
votes
0answers
48 views

Wordpress retrieving meta data for all custom post types in list view

Im having an issue in WP where php is dying, ive increased memory but the process jumps to 100% cpu usage then dies and apache throws a 500 error. Ive tried to get apache to log something, or php / ...
6
votes
0answers
55 views

How to moderate posts

I am writing a plugin that will moderate all posts regardless of what level user posted them. It will check the post content and title against a list of words and if any are in the post, I want to put ...
5
votes
0answers
83 views

Physical organization of wordpress media library (Real Media Library plugin)

Introduction. In the above screenshot you can see a folder structure built with premium plugin Real Media Library. Now i want to create an extension plugin which can organize the folder structure ...
5
votes
0answers
119 views

Uploaded images don't show in Media Library if there are special characters in IPTC Keywords

Some images that are uploaded to WordPress don't show up in the Media Library. The images get uploaded and even cropped to the defined sizes, there is an entry in the Media Library, but the preview ...
5
votes
0answers
112 views

Tinymce - How to hook before or after live shortcodes rendering?

When the edit post page loads in WordPress admin, I launch a js process which alters the TinyMCE editor’s contents. Recently I've come across the WordPress live shortcode previews which break my ...
5
votes
0answers
1k views

$wpdb->get_results(…) returns empty array despite correct query

As title implies, I cannot seem to get $wpdb->get_results to give results. Running the "raw" query is successful, but this seems to be failing for some strange unknown reason. global $wpdb; ...
4
votes
0answers
31 views

Problem with Hebrew characters in username

I wrote a plugin to enable hebrew characters in usernames. This is the full code: add_filter ('sanitize_user', 'hu_sanitize_user', 10, 3); //Overrides the Wordpress sanitize_user filter to allow ...
4
votes
0answers
43 views

How to customize a shortcode using the customizer

General context: I have a plugin which implements a widget and I would like to make the widget into a shortcode. The widget has many options some of them mutually exclusive, and it is never good UX ...
4
votes
0answers
41 views

Post injection - how to exclude the original post

This question refers to @Pieter Goosen´s extensive work about how to alter the main query using the pre_get_posts hook on true pages. It is also referenced in the codex. With his method you are able ...
4
votes
0answers
47 views

Development of a Wordpress Search Plugin - Best Practices

Searching for around two days to find an answer to my question, I finally registered for this StackExchange. :) My Question is not simple, so I need to start at the very beginning. But to give you an ...
4
votes
0answers
30 views

Custom post type by ID in root folder

i have a custom post type project the url that worked out of the box was: www.myapp.com/project/POST-ID and www.myapp.com/project/POST-SLUG now my client needs the url be available in the ...
4
votes
0answers
100 views

How to override a function when isn't at functions.php

I am trying to override a function for a theme in the child-theme but I can't get it to work. At functions.php on the theme I can see this require_once line: ...
4
votes
0answers
53 views

WP-CLI not recognizing commercial plugin updates

I'm running into an issue I haven't encountered before where WP-CLI is not recognizing plugin updates for commercial plugins. The plugin updates appear in my WordPress dashboard, but running ...
4
votes
0answers
67 views

Custom editable content for front page from Theme Customizer

I developed a very basic theme with underscores. I am looking for custom editable content, or a changeable page, from the Theme Customizer for front-page.php. For example, when a user goes to ...
4
votes
0answers
76 views

How to Modify/Change a Buddypress/Wordpress Account Activation Process

I'm developing a custom BuddyPress/WordPress Plugin. Here's how a user would normally register. A user registers as usual on registration page His/Her account is deactivated till he/she clicks on ...
4
votes
0answers
45 views

Wordpress Media Uploader events

I want to capture the click event on the "Save all changes" button? Is there any callback method like there is when you click (window.send_to_editor) the "Insert into Post" button
4
votes
0answers
200 views

Reset Undo on the tinymce editor

I have one editor where I switch between content in one editor, and what I want to do when I set the new content, I would like to reset the undo possibility. I have read on this site ...
4
votes
0answers
110 views

SSL breaks customizer: page isn't returned from ajax

I have a WordPress install using a Comodo SSL certificate. I have the WordPress HTTPS plugin installed and I'm using the AZ theme, and the admin is set to load over HTTPS. So far so good. On the ...
4
votes
0answers
114 views

Enable update notification, disable updates

There are a lot of question on how to disable updates and/or removing update notifications. But all solutions that disable the update also disable the update notifications. But I want to disable the ...
4
votes
0answers
418 views

Multisite/network--automatic self-registration, blog setup

I am creating a WordPress Network multisite blog in a university environment. It's set up in subdirectory mode, so that each new blog appears as a subdirectory off a common domain name. The Network ...
3
votes
0answers
19 views

Adding a drag and drop re-ordering from a custom post type default list

I have custom post type named 'slider_to_be_ordered' and has the following arguments enabled: 'supports' => array( 'title', 'page-attributes' ), 'hierarchical' => true, ...
3
votes
0answers
44 views

$wpdb Query Result not coming but in phpmyadmin it works

Here is my query, when i run this in PHP file its returns NULL but same query in Phpmyadmin return row. Even I tried with $wpdb->get_row() and $wpdb->get_col() but the result is same for all. ...
3
votes
0answers
41 views

Why did multiple line breaks stop working in text editor?

# Adds ability to add break tags on posts remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); add_filter( 'the_content', 'nl2br' ); add_filter( 'the_excerpt', ...
3
votes
0answers
37 views

Efficient coding: how to keep track of function stack?

I've written a plugin that calculates how much server time is required for each function in a theme or plugin. The idea is it will encourage developers to write efficient and green code. If you want ...
3
votes
0answers
64 views

Hook to process a new taxonomy tag before it is created?

I am working on a website where there is a custom taxonomy for places, which can be either cities or states. The users are supposed to tag each post with a city and a state. To deal with ...
3
votes
0answers
190 views

the_post_thumbnail responsive srcset not populating with custom image size

I am trying to use the new responsive images feature in Wordpress 4.4 but I keep running into a particular problem when trying to use the_post_thumbnail with a custom image size. It seems I cannot ...
3
votes
0answers
30 views

Custom Taxonomy's Label to change the text appearing in Appearance > Menu

I have three custom post types, each has its own taxonomy like product_cat, event_cat, media_cat. I labeled all of them with the word "Category" like: register_taxonomy("product_cat", "product", ...
3
votes
0answers
82 views

Customizer Active Callback not working

From some reason my active_callback => 'is_front_page' is not registering and therefore not showing up inside the customizer on the front-page - I have definitely set my front page to static and ...
3
votes
0answers
42 views

Pb with responsive image sizes in WP 4.4

I don't understand how to customize responsive sizes images in WP 4.4.1. The only available hooks that I see are wp_calculate_image_srcset and wp_calculate_image_sizes, and neither has the named ...
3
votes
0answers
41 views

Can I create customizer setting that can handle plugin shortcode?

Can I create a customizer setting which will handle a shortcode from a plugin? Do I violate and rules or guidelines in WordPress theme development? If it's possible what is the best way to sanitize ...
3
votes
0answers
29 views

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I'm looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation. ...
3
votes
0answers
44 views

Global Objects and Public Methods

I'm developing a plugin and am just thinking over best practices. How common is it to have a global object? Currently on plugins_loaded I am creating a global object of my class: add_action( ...
3
votes
0answers
119 views

Removing custom widget area WordPress 4.4

I know it is a very simple thing but I just cannot figure it out. I always used to define widget areas and sidebar in source code, however this time I have used the UI option from Appearance > ...
2
votes
0answers
19 views

How to get WP to use EST Timezone

In my settings, I have New York defined as the time zone. But when I run plugins using PHP date() functions, I am getting a time zone of UTC as it shows in WP Admin > Settings > General. How can ...
2
votes
0answers
17 views

Calling shortcode in wp_localize_script strips result

I am working on adding some functionality on a Wordpress plugin which after a certain click needs to call on some shortcode through ajax. What I first attempted was to call the shortcode inside of ...
2
votes
0answers
20 views

How to debug “You do not have sufficient permissions to access this page”?

The error You do not have sufficient permissions to access this page when trying to access wp-admin can result from many causes. How can I debug effectively what is causing the problem? Is there any ...
2
votes
0answers
33 views

Case-insensitive add_rewrite_rules in Wordpress functions

Been hitting my head against the wall on this for a while. If I have a add_rewrite_rules like so: $aNewRules = array('my-books/?$' => 'index.php?pagename=my-books'); This works correctly; ...
2
votes
0answers
31 views

How to allow users login to WP from external domain and make REST requests

Basically what i want to do is: Use Wordpress as a login system and data storage for web-application on another domain. Make users able to register and perform REST calls from the application. Let ...
2
votes
0answers
13 views

get / list categories and counts filtered by custom taxonomy term

In my post 'post type' besides "categories" I've a custom taxonomy called "product-types". The category is actually more "manufactures" of the product types. I've a product-types page where I list ...
2
votes
0answers
43 views

Download external images with function

Actually, i display images on my site from other sites. Url is on a custom field name "couv" I'd like to download theses pictures on my site and create a new custom field with the new value "couv2" I ...
2
votes
0answers
32 views

Using a custom field value to redirect away from a 404 page

I’m moving from an old CMS to WordPress. The old articles are saved as posts and the new WordPress permalink is %post-id%. The old URL slug is unique and saved as a custom field for each post; the ...
2
votes
0answers
78 views

How to modify the new WordPress 4.5 link inline toolbar

I had my own plugin that add custom links options to the old wordpress link edition window (data attribute, nofollow etc). The new inline link toolbar introduced in WordPress 4.5 is ... not what I ...
2
votes
0answers
36 views

category_name not working (not showing up in sql query debug)

My plugin has a shortcode and it retrieves animals. There are filters/arguments and they all work well except the category argument or parameter. The category name(s) is/are well passed to my ...
2
votes
0answers
41 views

Should I hint table index for search query on wp_post

I'm currently inspecting a WordPress setup with multiple custom post types that should be included into search results. The database query for a search after the word Search looks like this: SELECT ...
2
votes
0answers
45 views

iris color picker in widget - click event doesn't fire when initially when widget is first created

I added the wordpress(iris) color picker to a widget, and the color picker is not clickable when the widget is first created. My guess is that it's where/how the javascript file is being enqueued, but ...
2
votes
0answers
62 views

Color Picker (iris) in widget - refresh when edited in Customizer

I have added the WordPress Core color picker (iris) to a widget I developed, but when you edit the color, there is no change triggered. As a result, the iframe (live preview) for the Customizer does ...
2
votes
0answers
26 views

Extending Wordpress REST API

I'm trying to create an API where external clients can authenticate users and reset their password through a REST API. I've already seen this: External WordPress API. However, it looks like this is ...
2
votes
0answers
60 views

Does Wordpress contain “default” anti-SQL injection code that responds with a 404 error?

I've been through the “seven layers of the candy cane forest” on this one… :) Our plugin receives data via a POST request. On a particular site that has our plugin installed, we observed odd ...

15 30 50 per page