All Questions

12
votes
0answers
762 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 ...
11
votes
0answers
538 views

How to prefill Wordpress registration with Social

I created custom registration process in WordPress with a lot of extra fields like first name, last name etc. I would like to make integration with Facebook/LinkedIn so first name, last name, email, ...
9
votes
0answers
610 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 ...
8
votes
0answers
730 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
480 views

comment_post_ID 0 (cannot remove from dashboard)

Ran across something a bit odd that I haven't seen before. A client has a pretty active blog and uses Akismet (paid) to protect against spam. At least once a day, they're reporting a spam comment that ...
7
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): <...
7
votes
0answers
486 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 ...
7
votes
0answers
373 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....
6
votes
0answers
105 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
333 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
794 views

Filtering a custom post type by custom taxonomy in archive template

I've seen this question posted in different forms before, but most of those solutions are centered around the admin interface, and I haven't found any answers that apply to the front end. I've got a ...
6
votes
0answers
113 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
278 views

Auto Load Plugin Hooks inside Must Use Plugin

I am creating a custom MU plugin to run on a multi-site network. I am working on a function that will dynamically include files containing additional action and filter hooks based on the active ...
6
votes
0answers
443 views

Check for and enforce unique value in user-entered custom meta field in WP Admin

I am trying to figure out how, on a new or edit post screen, to allow the user to enter a custom meta item, BUT force it to be unique. Ideally the process would work like so: Contributor logs into WP ...
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" ...
6
votes
0answers
485 views

Using multiple taxonomies to sort Custom Posts

I have a post type that includes a taxonomy for (1) location and (2) a day of the week. I'm using the first taxonomy to sort the posts into groups. Here's the loop I'm using: <?php $terms = ...
5
votes
0answers
342 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
427 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 ...
5
votes
0answers
2k 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
106 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
522 views

Hosting a Wordpress blog as a sub folder from a S3 website

I have a website set up for my organisation under www.mycompany.com (running on Amazon S3). I also have a Wordpress blog set up under blog.mycompany.com (running on a separate LAMP server). For SEO ...
5
votes
0answers
236 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
140 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 ...
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: ...
5
votes
0answers
287 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. ...
4
votes
0answers
38 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
37 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, ...
4
votes
0answers
363 views

How to trace the cause of these PHP notices and warnings for class-wp-query.php?

My WordPress debug.log file is filling up with these PHP notices, alternately with a gap of about 15 minutes and then of several hours… [23-Mar-2018 05:33:00 UTC] PHP Notice: Trying to get property ...
4
votes
0answers
78 views

Remove “-2” from a Toolset Types URL with the same post name

I'm using Toolset Types to create a custom post type, and within that post type there is a taxonomy. I have created two posts with the same name, but in a different taxonomy. For the purposes of ...
4
votes
0answers
91 views

Implement authentication to an organization oAuth server

Sorry if some parts of this question seem obvious, I'm a newbie at WordPress and this is the first time I tap into oAuth workflow manually (without using a social login plugin). There is this oAuth2 ...
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
96 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
191 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
457 views

Send attachments via wp_mail from temporary folder

Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server? For example: <input type="file" name="file"> $attachment[] = $...
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
301 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
169 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
84 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
586 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
586 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
20 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
60 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 ...
3
votes
0answers
100 views

Gutenberg blocks - processing server data within a block

I have a block that renders titles of all existing posts in the <Modal/>. I retrieve it from the server using <ServerSideRender/> (that returns plain html). I want to be able to choose one ...
3
votes
0answers
30 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
40 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
39 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
25 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 ...

15 30 50 per page