Skip to main content

Questions tagged [javascript]

A client side scripting language useful for making interactive web sites. Questions about using JavaScript outside a WordPress context are off-topic but might be asked on Stack Overflow.

-1votes
2answers
27views

Cannot establish AJAX connection ('400 Bad Request')

Im trying to create a very basic AJAX script that shows a random post title, just so I at least know I can get AJAX to work. But I keep getting a 400 error in the Chrome console. I've been checking my ...
user303096's user avatar
0votes
0answers
20views

New to Wordpress, CSS, JS, etc. Having trouble adding custom JS - works in console with desired results but not on live site

I apologize for my ignorance, I'm still learning. Trying really hard to understand this all and make it work. I have a page with an image in a container and I want it to expand when the user clicks on ...
Karma Karma's user avatar
2votes
0answers
81views

How can I check if a post is dirty using javascript on the edit post screen?

I'm trying to block a custom javascript function from running (with an appropriate error, of course) if the current post is dirty (ie, something has changed either in the editor or a custom field). I ...
Rob Williams's user avatar
0votes
1answer
29views

Wordpress custom post_status after 6.6 version

I'm trying to add custom post_status to WP after version 6.6 where status popup was introduced. Can someone tell me how to add own status to this popup? I wasn't able to find it. add_action('init', '...
fabian's user avatar
1vote
1answer
22views

How do I hide block YouTube, Vimeo block variations from the Block inserter but keep already inserted blocks usable

I have tried all kinds of things. Nothing worked. Not sure if it's worth posting it all but. For example: add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_hide_blocks_script' ); ...
NextGenThemes's user avatar
0votes
1answer
69views

Hide or Show Read More Button by Content Area

I'm trying to hide the read more button somehow based on character count, the button should only appear on long posts. But since I also control the button with css, maybe I need to hide it based on ...
A. Muller's user avatar
0votes
0answers
26views

Create a Query Loop block

I am creating a Query Loop block that retrieves post type, similar to Gutenberg's, but for various reasons I need to create one. Currently the code I am using is as follows and it works, but I would ...
Matteo Feduzi's user avatar
0votes
0answers
36views

Sending a Screenshot of a div via Email

First apologies for any typos and such, as I am visually impAIRED. I have a page created that allows a user to create a chart using sliders. The idea is they can then download the chart as a PNG image,...
Bradley's user avatar
0votes
0answers
20views

Is possible to open directly the core WP image editor on a modal?

I'm trying to do a modal where I can edit the thumbnail of a specific post, and I wanted to know if it's possible to call and use the Core WP image editor inside this modal and be able there to Crop ...
sinned's user avatar
-1votes
1answer
24views

Why is my JavaScript class not working in WordPress? Constructor not firing, and no changes applied to the DOM

I’m working on a WordPress site and trying to implement a JavaScript class (MobileUI) from a Webpack compiled module to handle mobile-specific UI changes. However, the class doesn’t seem to work at ...
BrigantiumXIX's user avatar
0votes
0answers
12views

Modify Gutenberg blocks quick inserter defaults

I am trying to modify the blocks suggested via the quick inserter, ie the six blocks shown when you click the + button: The reason is that once we implement Gutenberg blocks on a certain website (...
emmzee's user avatar
0votes
1answer
19views

How to inject right sidebar on post edit page?

I would like to display an optional date and time entry field on the right side of the post screen in the Gutenberg editor. I know that with Advanced Custom Fields I can display it at the bottom of ...
qwe001's user avatar
0votes
0answers
26views

GET admin-ajax.php returning 400 bad request error

I am trying to get some data to show from a MySQL table when I click a button but I'm getting 'GET ajaxurl action 400 bad request'. I know the url is correct because I console.logged it and it was ...
Luzzi98's user avatar
0votes
0answers
7views

Issue with Ajax filter categories and Javascript

I've created an Ajax category filter to display the posts on my website. The filter uses input checkboxes, so the user can select one or multiple categories. The issue is when I select a category (or ...
Mathieu Préaud's user avatar
0votes
0answers
27views

How to resolve Multisite Speed issues

Can anyone assist in helping me determine our WordPress multisite speed issues? Our pages are taking 6-7 Full load times https://www.hilliardschools.org/ I've tried. Minifying CSS/JavaScript Multiple ...
Jeremy Thomas's user avatar

153050per page
close