Display a selectable map in wordpress

I have a problem. I bought a theme, I created a page called “Harta”. The page looks like this:

enter image description here

Under the “test” part I want to display a world countries map. The map needs to be selectable, I need to select two countries, after selecting them, their names should be displayed into input elements of a form and then save the data of the form in the database. Any suggestions how to do that? Is there any plugin in wordpress that deals with the maps?

Go to Source
Author: Çlirim Kastrati

How to change the Media Uploader screen from WordPress admin to normal browse screen for frontend users for featured image submission

I have a theme form in my frontend which takes the featured image from the user. But my problem is when the user clicks the upload button they are taken to the normal MEDIA UPLOADER screen which is normal for admin users. On top of that, the site visitors can also see the other media library images. I want to change this media uploader screen to just file browse screen. My site users are of “Authors” category. Please need help!

Go to Source
Author: Muhammad Aurangzeb Khan

Wodpress Customizer Selective Refresh Div with respective Javascript and Localized data

There is a div with the selective refresh which is having a javascript to make some changes. As due to selective refresh HTML is dynamically updating hence respective javascript stops working as it has selected previous element which has obviously replaced.

How to deal with this situation? Is there any way to refresh the javascript as well?

Go to Source
Author: Rohit Patil

Naming problem helperpluginservice

I am looking for some service or plugin which can help with naming problem. Something that check consistency or checks for a verb in method names. May be suggesting how to shorten the name (which is not trivial for non native speakers). I’ve heard of code summarization researches. I don’t know will it solve such problem or not, but if it is, it would be interesting to look at such solution.

Go to Source
Author: Yaroslav Kishchenko

Plugin wp-offload-media stopped working

I’ve just noticed that the plugin wp-offload-media has stopped working in my WP page. It stopped uploading to AWS but uploads to where the WP install is. How to debug it? I’m not experienced at WordPress at all.

Update: I’ve checked if the AWS key/secret worked – it still works.

Go to Source
Author: haxpanel

WPBakery vc_map populating from a field to another

I’m playing around with WPBakery Page Builder and its ability to be enhanced.
In order to achieve that, we can use an API function called vc_map (https://kb.wpbakery.com/docs/inner-api/vc_map/).
What I’m trying to achieve is populating values of “posttypes” param to a “dropdown” field. But I don’t figure out how to do that.
There might be a callback through param dependencies but it has to be written in JS and the API is in PHP.
So I will be glad if someone could show me the way 😉

Go to Source
Author: sugardaddy

Change WooCommerce backend Order_ID

I want to change the Order_ID Prefix on WooCommerce Order because the payment gateway only captures the order ID. As my payment gateway is integrated into three to five websites it is difficult differentiate which payment came from which website.

I have already implemented the Custom Sequential Pro Plugin from WooCommerce but it only changes the order ID on the front end. But the payment gateway collects Order ID from the backend. How can i add a prefix to the order_ID in the backend in WooCommerce.

images: woocommerce: https://pasteboard.co/JiGZcYR.png
Payment Gateway: https://pasteboard.co/JiGZOGY.png

Go to Source
Author: Aetzad Asghar

Make the product page as homepage WooCommerce

I’d like to make the product’s page as homepage. But this product’s page I created with Elementor Pro. I’m trying to use the shortcode [product_page id=99]. But it imports the standard page of theme, not the page I’ve created with Elementor. Someone knows how to do this?

Go to Source
Author: Gabriel Borges

Remove add_action from plugin

I use this plugin. Is for auto expire user on specific date.

I want to add this action add_action(‘edit_user_profile’, array($this, ‘extra_user_profile_fields’)) when is_admin only because i have a conflict with an other plugin. I have try this to source code:

if (is_admin) {
add_action('edit_user_profile', array($this, 'extra_user_profile_fields'))

and all work well! But i want to add a function to child theme.

class Expire_User_Admin

    var $settings = null;

    public function __construct()
        $this->settings = new Expire_User_Settings();

        // Admin Actions
        add_action('admin_init', array($this, 'expire_user_now'));

        // Profile Fields

        add_action('show_user_profile', array($this, 'extra_user_profile_fields'));
        add_action('edit_user_profile', array($this, 'extra_user_profile_fields'));
        add_action('user_new_form', array($this, 'user_new_form')); 


So i have try this with no luck. Any thoughts?

add_action('init', 'remove_plugin_action', 9999);
function remove_plugin_action()
    $plugin_class = new Expire_User_Admin();    
    remove_action('edit_user_profile', array($plugin_class, 'extra_user_profile_fields'));
    if (is_admin()) {
     add_action('edit_user_profile', array($plugin_class, 'extra_user_profile_fields'));

Go to Source
Author: xiamtoula

publish_{$post_type} hook works only for posts and not for custom post types or pages

I’m trying to send push notification when any of posts, custom post types or pages is published. I’m getting enabled post types from the plugin settings and adding action via foreach loop in my class __construct method. The problem is that it only works for posts and not for any of custom post types or pages. Here is my function and action:

foreach ((array)get_option('PushPostTypes') as $postType) {
    add_action("publish_{$postType}",  array($this, 'doNewPostPush'), 10, 2);

public function doNewPostPush($id, $post) {
    $pushData = array(
        'title' => $post->post_title,
        'body' => strip_tags($post->post_content),
        'data' => array(
            'url' => trailingslashit(get_permalink($id)),

    if (has_post_thumbnail($id)) {
        $pushData['image'] = get_the_post_thumbnail_url($id);

get_option('PushPostTypes') is an array of post types that user choose, for example: array('post', 'page', 'custom_post');

Any idea why it only works for post and not for pages or custom post types?

Go to Source
Author: Akaki Khujadze

Adding Custom Endpoint in WordPress Rest API

I have been working on custom WordPress rest API Endpoint. Goal is to create a WordPress custom route in this route i want to get Category Id and convert it to Category Name. I have written the function but its returning null for the category Id. The function simply get the categories of the WordPress and register the route.How Can I get the all Categories Id and convert category Id into category name.


    $categories = get_categories();

    $data = [];
    $i = 0;

    foreach ($categories as $category) {

        $data[$i]['id'] = $category->ID;

    return $data;
add_action('rest_api_init', function () {
    register_rest_route('w/v2', 'trending', [
        'methods' => 'GET',
        'callback' => 'w_categories',

Go to Source
Author: Shahryar Rafique