If I want to create new taxonomies (e.g. Project / Documents / Etc…) is it better to create them in the theme’s functions.php or within a plugin? [duplicate]

I think it depends on the case. If the taxonomy is essential part of the theme, then functions.php might be appropriate place for registering it. If the taxonomy doesn’t care which theme is in use on the site, then a custom plugin might be better place for it. Please note that asking about best practices … Read more

$wpdb->insert not working for last select option

The ID can’t be empty. If you have created your table and set your ID as auto increment, you don’t have to insert it, it will be generated automatically. So all you have to do is the following: $result = $wpdb->insert(‘pagos’, array( “nombre” => $nombre, “tipo” => $tipo, “monto” => $monto), array(“%s”, “%s”, “%d”));

JavaScript: TypeError: xyz is not a function after upgrading WordPress

According to @fuxia comment: Solution is removing jQuery included by WordPress just before register/enqueue custom jQuery (see https://stackoverflow.com/a/27048128). So if you include some jQuery on your own, then add wp_dequeue_script(‘jquery’); wp_deregister_script(‘jquery’); just before register/enqueue custom jQuery script in wp_enqueue_scripts action. Or if you want jQuery included by WordPress just remember, that it’s in no-conflict mode … Read more

why jquery is not loading in wordpress page?

There are two things you should try: WordPress loads jQuery in compatibility mode, so you will need to use the noconflict syntax, ex. jQuery(‘.text-white.follow’).plate();. More information: https://learn.jquery.com/using-jquery-core/avoid-conflicts-other-libraries/ https://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/ If you are using a child theme, you need to call get_stylesheet_directory_uri() instead of get_template_directory_uri(). Parent theme assets are accessed using template, and child theme assets are … Read more

How we can reduce wordpress page loading time? [closed]

LiteSpeed Cache (1,033total ratings) All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization… https://wordpress.org/plugins/litespeed-cache/ Autoptimize (994total ratings) Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more. https://wordpress.org/plugins/autoptimize/ other plugins: https://wordpress.org/plugins/search/Cache/

Keep the wordpress custom type, after disabling theme?

You can use unregister_post_type(‘slug’) – where ‘slug’ is the CPT, such as ‘portfolio’ or ‘book’ or whatever your particular CPT is, and then re-register the CPT. I would suggest doing this in your own custom plugin so you can change themes freely. So if your CPT is ‘portfolio’ you can create a file in /wp-content/plugins/wpse_360145_create_cpt/create-cpt.php: … Read more