Bulk Management Tools
Tips and Tricks
Exporting Limits
Some people have been having issues with this tool so I thought that I should add some Tips for you.
Please share your experience and like my page
Lots of you have run into issues with download limits, I have managed test and get the tool to download thousands of listings by making some small tweaks, I have tested upto 5000 listings with no issues so if this works for you please share the amount that your were able to download.
A small tweak to your download.php
1 |
$downloads = new WP_Query( array( 'post_type' => 'place', 'orderby'=>'ID', 'order'=>'ASC', 'posts_per_page'=>2000) ); |
I know you are going to say “I have already tried that increasing the limit from 2000” to blah blah, but can you also do the next tweak and see if that makes a difference.
Next Bit
In your wp-config.php add in the below lines.
1 2 3 |
/*Tim told me to do this for Bulk Management tools*/ define('WP_MAX_MEMORY_LIMIT', '512M' ); define('WP_MEMORY_LIMIT','512M'); |
Your wp-config file is in you root directory of your WordPress installation, and you can add the lines anywhere, for neatness I added mine just below the define(‘WP_DEBUG’, false);
I hope this helps….
Post custom Fields
Tips and Tricks
You can export and import post custom Fields, but not multi select custom fields, I have not worked out as yet as they are serialised strings.
To do this you will have to edit the export process in the download.php but it is not too painful.
So here is an example of how to achieve this.
Go to your Geo Theme folder /wp-content/themes/GeoTheme and download via FTP the download.php file.
Get the name of the Html Variable from your WP Dashboard Geo Theme >> Post Custom Fields and in the Post Custom Field Page you will see the HTML Variable Name, these are what you are going to use to extract the data from the database.
In my example I am going to want the check box field name for my restaurants for chinese food so I have called this post custom field “chinese” (I know creative).
Okay now open the download.php in your text editor notepad, notepad ++, or which ever text editor you prefer.
You need to replace the columns for customfield1, so around line 521 you have the below.
1 |
<th>customfield1</th> |
Change t0
1 |
<th>chinese</th> |
And the around line 603
1 |
$headrow[] = "customfield1"; |
Change to
1 |
$headrow[] = "chinese"; |
Then around line 979 (including the $post->ID)
1 2 3 |
echo "<td>".get_post_meta($post_id, "customfield1", true)."</td>"; $b[$counter][] = get_post_meta($post_id, "customfield1", true); |
Change this to
1 2 |
echo "<td>".get_post_meta($post_id, "chinese", true)."</td>"; $b[$counter][] = get_post_meta($post->ID,"chinese",true); |
That is it save and upload and give it a test run.
You can add more obviously.
Now the cool thing is if you leave the column header in the file you prepare for upload it should work in updating the data, I have also tested this with the standard Geo Theme Import script and you can import these fields with that as well.
Good luck !
Alterations and Improvements
I have had to edit this add on again as Featured is now a requirement for Geotheme, I have also edited it so that event start/end dates and times can now be exported and imported, contact me if you want the altered files.
Tim
Thank you, as always a true pro.. you solved my download issues, Geo Theme would not be the same without you on board.
Hey Tim,
This is awesome work! Since my site will get about 5000 listings as well I need such a tool.
You notice you had to edit this for the new Featured and events. Any chance you can send me the modified files like you stated in your last paragraph?
Would be great!
Thanks like always,
Tom
Hi Tom,
Sure no problem.
Tim
Modified the download.php and wp-config.php files but still cannot download more than 2000 listings. Any thoughts on what I might be doing wrong?
Thanks!