WordPress Development Stack Exchange Community Digest

Top new questions this week:

How to Use Webpack with WordPress Script Modules and Enqueue a Custom Class

I am working on a WordPress project using version 6.5, which introduced support for JavaScript modules. I have a parent theme that exports a JavaScript class, and I want to import this class in a ...

theme-development javascript child-theme wp-enqueue-script scripts  
user avatar asked by Nani samireddy Score of 2

WooCommerce: Custom dropdown for variation selection

In WooCommerce, I have an attribute called License Type. This attribute has 2 terms: Single Site License Multi Site License With the above, I'm trying to create a custom select dropdown, where the ...

php woocommerce-offtopic conditional-tags  
user avatar asked by Freddy Score of 1
user avatar answered by Dao Score of 0

How to disable trackbacks and pings on Images?

I got attacked by spammers that add comments/trackbacks/pings to my blog. I disabled everything, including old and new posts. But they found a way. I have no idea what it is. But it seems that every ...

images pingbacks  
user avatar asked by jcubic Score of 1
user avatar answered by Tom J Nowell Score of 3

Greatest hits from previous weeks:

WP_Query with "post_title LIKE 'something%'"?

I need to do a WP_Query with a LIKE on the post_title. I started with this regular WP_Query: $wp_query = new WP_Query( array ( 'post_type' => 'wp_exposants', '...

wp-query sql  
user avatar asked by Ludo Score of 55
user avatar answered by Jan Fabry Score of 54

How to set and use global variables? Or why not to use them at all

UPDATE: My original question has been solved, but this is turning into a valid discussion about why not to use global variables, so I am updating the question to reflect that. The solution was <?...

php functions globals  
user avatar asked by JPollock Score of 47
user avatar answered by Tom J Nowell Score of 51

Admin Ajax is returning 0

I am relatively new to jQuery and AJAX in particular. I have a small issue with the return value always being 0, though I think this is actually the success message and it's not returning anything. I ...

admin ajax  
user avatar asked by Apina Score of 45
user avatar answered by Apina Score of 4

How do test if a post is a custom post type?

I am looking for a way to test if a post is a custom post type. For example, in, say, the sidebar I can put in code like this: if ( is_single() ) { // Code here } I want code testing for only ...

custom-post-types conditional-content conditional-tags  
user avatar asked by Adam Thompson Score of 142
user avatar answered by Szymon Skulimowski Score of 165

How to create .pot files with POedit?

I've spent hours today on what seemed like something really simple, which is to create a .pot file for a Wordpress theme that I'm creating. I've read the Smashing Magazine article, the Tutsplus ...

theme-development translation localization  
user avatar asked by user1981248 Score of 53
user avatar answered by ٍShagrouni Score of 20

How to get URL of current page displayed?

I want to add custom PHP code to ensure that whenever a page on my site loads in my browser, the URL of that page is echoed to the screen. I can use echo get_permalink(), but that does not work on ...

php loop permalinks urls  
user avatar asked by cag8f Score of 136
user avatar answered by Jacob Peattie Score of 228

to perform the requested action wordpress needs to access your web server. please enter your ftp

I'm following Changing File Permissions « WordPress Codex, yet when I'm try to update and/or install plugin and/or theme through wp-admin, I'm getting following: To perform the requested action, ...

plugins themes updates permissions  
user avatar asked by alexus Score of 84
user avatar answered by Narendra Solanki Score of 180

Can you answer this question?

Extend WordPress Gutenberg core/navigation-link

Hey folks So Im pretty new to this react + php in wordpress and I found one article where it showed how to extend a core block, which works fine for group and some basic block but When i tried to ...

javascript block-editor core react  
user avatar asked by DevopsRedefined Score of 1
You're receiving this message because you subscribed to the WordPress Development community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3