All Questions

14
votes
0answers
851 views

Extend Media Library

The Media Library in WordPress has "Insert from URL" link to the left. It accepts image URLs. It's not said anywhere but if you paste YouTube URL or <iframe> code then it will insert it too. It ...
10
votes
0answers
2k views

When does Wordpress wrap inline scripts in CDATA?

I'm debugging a problem with a third party script of ours that wordpress users use by copy / pasting a snippet of script and html into their post's bodies like (non-real world example of course): <...
9
votes
0answers
648 views

Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn't work

I've added to the normal WordPress gallery popup (when clicking "Add Media" in the WordPress editor), in order to allow my custom gallery type to be selected (which interacts with / uses the main ...
9
votes
0answers
806 views

How to trigger a refresh in the media modal

I'm developing a plugin that adds a new tab to the media modal, and I need to know a way trigger a refresh of the attachments tab so it shows newly added attachments. This is the code I'm using: wp....
8
votes
0answers
461 views

web.config conflict on IIS

folder structure docroot |- wordpress |- web.config |- wp-content |- japi |- index.php \- web.config ... ... As you can see there are 2 web.config s....
7
votes
0answers
87 views

PHP code in page template vs functions

I've made numerous WordPress sites, and learned PHP practices that I believe to be right, i.e. functions go in functions.php file, nearly everything in functions.php should be wrapped in a function, ...
7
votes
0answers
525 views

User-edit role setting distinct from wp_capabilities?

I need find out how $profileuser->roles is set. wp_capabilities can hold multiple roles, whereas user-edit role caters only for a single role. Under certain circumstances it is possible for there ...
6
votes
0answers
120 views

Hook in wp.media to add a new tab

Salut! This is an issue coming up while creating a plugin. I want to add a tab to the wp.media.view.MediaFrame.Select modal or if a general approach helps: In the customizer I want to hook in any ...
6
votes
0answers
389 views

Custom Taxonomy Endpoint Pagination using paginate_links()

The Setup I have 2 taxonomies and 1 post type: Post Type: products Hierarchical Taxonomy: product_cat Nonhierarchical Taxonomy: product_type The product-category has a defined endpoint: ...
6
votes
0answers
485 views

'Preview Changes' for custom meta boxes?

How can I have the 'Preview Changes' working for custom meta boxes? For instance, I just want to test/ preview some text in a custom meta box but I don't want to save/ update because that post/ page ...
6
votes
0answers
169 views

Use author author display name in permalink structure for pages and posts

I need to add the author name as a subdirectory prefix for all user's posts and pages. For example: example.com/johndoe/ //The author page for John Doe example.com/johndoe/category/test-post/ //Test ...
6
votes
0answers
119 views

Custom collection in media manager?

I'm working on a plugin that extends the media manager, load JSON based input data to render an own collection of images and may upload them to my wordpress media library. So far I got my own tab, ...
6
votes
0answers
301 views

RequireJS in custom theme. Working Example

I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning. ...
6
votes
0answers
2k views

Login members using web services

I want a login system which authenticate user from web services.The steps should be as follows: we have few member web sites (Outside of wordpress server). Each member website have its corresponding ...
6
votes
0answers
6k views

AJAX with loop filtering categories

I've been researching on how to make my loop with AJAX. I found some codes online and modified some parts but I can't seem to get it to work. This is my code for the loop: <article id="main" ...
5
votes
0answers
238 views

Edit srcset and sizes attributes in Gutenberg image, cover and gallery - blocks

I am looking for a way to adress the responsive srcset and sizes attributes on Gutenberg image blocks - like image, cover and gallery. Usually one would do this with the '...
5
votes
0answers
484 views

Replacing Gutenberg Featured Image control?

I can replace the Featured Image control in current WP version by PHP: add_filter( 'admin_post_thumbnail_html', 'my_admin_post_thumbnail_html', 10, 2 ); How do I do the same thing with Gutenberg?
5
votes
0answers
3k views

WP REST API V2 - Retrieve sub page by full slug (URL/Path)

I'm struggling to see if this is natively supported, or if it's not the best place to implement this functionality - in my app (Laravel) or the same side as the API (WordPress). Retrieving a single ...
5
votes
0answers
118 views

Escaping and sanitizing SVGs in metabox textarea

I want to include inline SVGs in a metabox textarea. That's easy. What's killing me is how do I sanitize the textarea before saving the postmeta, and how do I escape it? Halp? Thanks!
5
votes
0answers
277 views

static variable loop not working in Wordpress

I have a function in my wordpress theme that deletes the first embedded video in a video post. See code below. This is in the functions.php file. /* - function that hides first video in post content -...
5
votes
0answers
2k views

How to refresh Theme Customizer after change color inside wpColorPicker?

I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class: ...
4
votes
0answers
182 views

Creating conditional blocks for WordPress Gutenberg

I've been reviewing tutorials on creating blocks for Gutenberg but I am unclear how to handle a particular use case - conditional blocks. I am looking at creating a custom post type for which I will ...
4
votes
0answers
273 views

Gutenberg: Is there a way to know if current block is inside InnerBlocks?

So I am using nested blocks in Wordpress Gutenberg. I am applying a wrapper on my elements that apply a bootstrap container class. Obviously I'd only want that on the outermost blocks, not on the ones ...
4
votes
0answers
57 views

How to track user progress?

I'm looking to build a very lightweight learning management system of sorts. I'll have 2 custom post types "Course" and "Lesson". I will associate the Lessons to the Courses, probably by using the ...
4
votes
0answers
141 views

Retrieve CSS and JS From the REST API

Does anyone know of a way to get a list of all registered styles and js scripts in-use on a site via the REST API? Essentially was wp_print_styles() does?
4
votes
0answers
1k 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 ...
4
votes
0answers
117 views

Creating Custom Taxonomy without mapping to any post type

I just want to create a custom taxonomy for my plugin use but this should not be linked with any post-type and also I need to add the menu in my custom admin menu (which i have already created). I ...
4
votes
0answers
197 views

Customize WordPress Media Manager - Media Window

Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
4
votes
0answers
1k views

get_permalink returns default link

I hope you can help me. So I'm using /%postname%/ as permalink structure, and my htaccess looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /develop/...
4
votes
0answers
1k views

Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content

I've never posted here, but I'm tired of slapping code together. That said, I would be most appreciative if someone could help me with this. I need a page template that: outputs the PARENT PAGEs, ...
4
votes
0answers
305 views

Upload Image Not accessible

I'm getting a 500 error when trying to access the full version of any image. As soon as it's uploaded to the server, it becomes 'unavailable', and each file cannot be accessed/deleted/anything - like ...
4
votes
0answers
173 views

permalinks with get variables

I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows add_filter( 'query_vars','driver_vars' ); function driver_vars( $vars ) { ...
4
votes
0answers
86 views

How to hide “Trackback” on paginated comments

My Setup: On my Single's page I have used this comments_template('', true); to separate Trackback's & regular comments. The Heading "Trackbacks for this post" shows up only if a post has ...
4
votes
0answers
590 views

WordPress + Magento .htaccess ReWriteRule Issue (www vs. non-www)

I have an issue I've been facing for a bit now. Moved away from it, but now I'm back and just have no idea after trying to find a solution online. It seems individuals have faced similar issues, but ...
4
votes
0answers
589 views

How to reload a select box of posts dynamically?

I'm using custom meta boxes for a project. I have created a custom taxonomy (select box) and I have another select box populated with Posts. I need to only load the posts based on the selection of the ...
4
votes
0answers
1k views

I want to load post content by categories using Ajax

I have question. I would like to load post content, custom post, depends on category. So first of all I would like to have drop down menu which will list all my categories then once user will select ...
3
votes
0answers
114 views

How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table <td> elements?

I'm trying to allow users to paste (relatively) simple tables into Gutenberg. The editor converts the raw HTML fine but strips out any attributes/classes. For the most part this is good - I want to ...
3
votes
0answers
40 views

Hooking a callback into the code within a Gutenberg block

I want to run some JavaScript when a user uploads an image or images using the core/image block or core/gallery block. Ideally I would run my own code when the onSelectImage function is called (and ...
3
votes
0answers
35 views

Is it possible to set another language for debugging messages?

The site language is defined as Hebrew. So I get translated error messages. It's a terrible thing. It is difficult to understand, it is difficult to search on Google, the directions of the text are ...
3
votes
0answers
176 views

WordPress REST API call generates nonce twice on every call

I'm trying to login a user via the REST API, and then retrieve the current user on subsequent requests. As per the documentation, in my plugin, I am creating and retrieving a nonce after a successful ...
3
votes
0answers
42 views

replace parent theme images in child theme

My images are found in the parent theme in this folder directory structure: public_html/wp-content/themes/listingpro/assets/images I tried placing replacement images with the same name in the ...
3
votes
0answers
393 views

WordPress “Link has expired” error on updating posts

I'm maintaining a WordPress site on GoDaddy for a client and they started to get the "this link has expired error" when they saved a post. It does not happen when I upload a file. However, I am ...
3
votes
0answers
50 views

Make default new sites https (multisite)

Quick background case: If I use Softaculous to install WP in cPanel, I can specify which protocol I would like the site to be in... (so they have something that addresses this). However with my ...
3
votes
0answers
387 views

Add parent/child taxonomy to custom post type url

I have seen several cases of one taxonomy being added to a custom post type url, but I have modified that function to include a parent and a child taxonomy term. However, I am getting a 404 when I go ...
3
votes
0answers
121 views

Linking three taxonomies with ACF

I'm creating a product finder using a CPT called "Products", which is already used for displaying products separately on the site. The product finder is based on a answer and question idea, where the ...
3
votes
0answers
43 views

Yoast SEO blocking/re-initialising longer running process

I have created a custom plugin, the job of which is to calls an external API to fetch data and fill in some custom tables in WordPress database. This is really a long-running process (maybe over 30 ...
3
votes
0answers
47 views

Trying to save and display a wp_editor()

Like the title said, I want to save and display the content of a custom form, i'm using woocommerce and wp-crowdfunding. each time i create a "campaign" wp-crowdfunding create a product. That said, ...
3
votes
0answers
564 views

Change permalinks for post type 'post' only

Like many other, I would like to have: domain.com/post-title changed into domain.com/blog/post-title but only for the post type 'post', not for 'page' and especially not for the custom post types (of ...
3
votes
0answers
29 views

Get widget settings function?

I am using this to find if a new widget has been added or removed from my site: serialize(retrieve_widgets()); Works great for added or removed widgets. But it doesn't detect if a widget setting has ...
3
votes
0answers
45 views

How can I use the TinyMCE editor for the description field on a Media item?

When I view an image in my Media Library, the Description field textarea has a toolbar, but it's only for creating HTML tags. How can I get the TinyMCE wysywig editor to be used instead? I've found ...

15 30 50 per page