Tag Info

Hot answers tagged

7

if you check the Wordpress importer plugin it is easy to implement this feature. But if you want the direct answer , here it is First of all, we need to copy the Wordpress importer plugin files to our theme directory. like this 1. themes/bootstrapguru_theme/inc/wordpress-importer.php 2. themes/bootstrapguru_theme/inc/parser.php you can find ...


4

@import is a convenient CSS shortcut for loading a particular stylesheet (often parent themes or other dependencies), but part of the reason why it's generally discouraged is due to - as you had mentioned - a small performance hit (stylesheets loaded with @import are not loaded in parallel). Another reason is that by loading stylesheets with Wordpress' ...


3

Simplest method to put your website in Maintenance mode, is to create a .maintenance file in your WordPress root folder with following content. <?php $upgrading = time(); ?> Make sure you place this file in same folder as your wp-load.php file. I just said that because in case you have WordPress installed in a sub-folder. Whenever you are ready to ...


3

Thanks @kaiser but not need to go through your solution I found a easy one and I'll share here for newbie likes me. If you're working on a WP Network site then the steps are: At the top, hover over My Sites and then click Network Admin. At the left, hover over Settings and then click Network Settings. Scroll to the bottom of the page and change the Max ...


1

I know this is an old ticket, but data importing is an ongoing challenge for users, I am sure! I've recently started using WP All Import, and I came across the same problem with ACF fields. Luckily, they came out with an extension for the plugin for exactly this problem: http://www.wpallimport.com/add-ons/ WP All Import ACF Add-On should handle this ...


1

You can use wp_create_user and pass necessary information like $username, $password, $email , where $email is optional. If user created successfully it will return ID of newly created user, other wise will return error object. Then update user's other information using update_user_meta.


1

You could target admin-post.php to do the processing via the admin_post_$youraction hook: This hook allows you to create custom handlers for your own custom GET and POST requests. The admin_post_ hook follows the format "admin_post_$youraction", where $youraction is your GET or POST request's 'action' parameter. You can output the URL via admin_url( ...


1

The steps to take would be: 1 - Extract files 2 - Create DB and import 3 - modify wp-config.php for database name and user credentials if changed Do not modify db tables to change the site url as they are serialized and this will create more issues than you want to deal with. 4 - Use a script like searchreplacedb.php to search and replace all of the ...


1

I believe that if you are not going to do a massive sql insert (which I think is likely just as efficient) that you need to go ahead and utilize the plugin api and at the time of the button being pressed, create them. I think it's pretty clear your choice is either to create the widgets on the fly, or to import through an sql insert. ...


1

There's a filter named 'upload_size_limit' where you should be able to change the value. Just add a small mu-plugin for that job: <?php /** Plugin Name: (WPSE) #177620 Alter Upload Size Limit */ add_filter( 'upload_size_limit', function( $limit = 0, $u_bytes = 0, $p_bytes = 0 ) { return ( in_array( get_current_screen()->base, array( /* Add ...


1

The post that an attachment is related to is determined by the post_parent column on the wp_posts table (depending on your database prefix). Set it to the post_ID of the parent post.


1

When you use the importer it should prompt whether to download any media/attachments it finds in the posts. If you don't say yes, they will not be added to your Media database. To my knowledge, even if you do say yes, Featured Images are not included. It's a very rare instance that I recommend using the built-in importer, and migration from one server to ...


1

Worst case scenario, just make a new environment, with that theme (can even be on the live), then just re-upload the CSS and anything else you've edited (successfully that is).


1

This answer is essentially the same as Ünsal's, but I'd like to elaborate a bit because despite being right his answer didn't help me (I was just trying to remember what I'd done in the past, I should have read his more carefully and I would have figured it out, but I think for others a full description would be useful). To export the full category ...


1

Its not that $wpdb->query does not need $wpdb->prepare(), it's because of not using $wpdb->prepare() in a correct manner. In your case $wpdb->prepare() never received any values which it must. Please refer to the Codex for details about using $wpdb->prepare().


1

If you have already created the database that you wish to import into and you have selected that database in PHPMyAdmin, but the import file is trying to create a new database, then you will see this error message. All you need to do is open up the SQL file in a text editor and delete the line that begins with CREATE DATABASE (it will be very near the top ...


1

From what I can see, you are inserting data in table wp_commentmeta. However the column meta_id has a Primary Key restriction. You can see the table definition at http://codex.wordpress.org/Database_Description#Table:_wp_commentmeta As meta_id has a Primary Key restriction, this column may only hold unique values. The insert statements you have posted show ...


1

Sounds like a sound approach to me! Not enough rep to comment so I'm posting an answer... Only advice I'd have is to 1. Make sure character encodings are correct so you don't end up with a bunch of "æÃ" 's 2. Make database backups :-) As to ACF, I think it's pretty much the same as the "add_post_meta" function. Maybe it has a separate one in its API. But ...


1

In WordPress, user's Biography is saved in User Meta table with description key.


1

Nope, the WP is pretty flexible about this and will perfectly handling omitted fields. Including assigning IDs (which is actually best left to it, outside of edge cases when exact IDs must be imported). The only situation that natively won't let you create post is if neither of title/content/excerpt is provided and post type supports any of them. Even then ...



Only top voted, non community-wiki answers of a minimum length are eligible