Tag Info

New answers tagged

0

A while ago I added a function to one of my sites to change a set of posts from one type to another. I can't remember exactly why, but I've dug it out and updated it a little, and it is tested and working. The function Place this in functions.php so that it can be called from anywhere within your blog. /** * Change the type of a WP_Post object * * ...


0

I think the best way to do it is just go direct into your phpmyadmin and export your database


1

Your AJAX callback method should be outputting something followed by a die() statement. function wp_insert() { ..your code echo $whatever_your_results_are; // die(); } I would also recommend against prefixing your custom methods with wp_. That should be reserved for WordPress and will cause confusion to other developers - and probably you ...


0

When the query was done using ~ (tilda) quotes around columns in the SQL instead of the ' it worked. It has something to do with the collation of my tables in MySQL, I believe.


-1

Accidently deleted very essential widgets (wifi and battery) so created a new user and then copied its configuration to the older one, and IT WORKED!


0

I found the errors thanks to the help from @Milo @Milo's query on catno pointed me to my error with my first query involving catno, and I also noticed a double equals in $catno == $row[0]; when it should be $catno = $row[0]; Final coding is function QueryStock($cat) { $query = "SELECT * FROM stock WHERE catno = '$cat'"; global $wpdb; $row = ...


0

I know this has been answered and since your question was based off on using WP_Query, my answer is probably a long-shot but you could also try to use this: wp_count_posts( $type, $perm ); where $type = post_type (post, page, 'custom-post-type-slug') and where $perm = To include private posts readable by the current user, set to 'readable' I've used ...


0

If that is the error, a couple of things could be going on. The part that uses 'require', 'require_once' and 'include' is not likely correct in the code. Each of these code statements should end with a semi-colon [;] not a comma [,] hh3_ I expect is the table prefix initially used in your database. Is that still the prefix of all the tables?? Vee


5

There is no build in function to achieve what you want, at least not for complicated meta queries like this. If you need to use build in functions for this, the best will be to make use of WP_Query. To make the query faster and to skip the unwanted returned array of WP_Post properties, and because you are only interested in post count, you can use the ...


1

There're few plugins to storage it on WordPress database. I recommend you save as users. I believe one of these plugins will help you: https://wordpress.org/plugins/wp-all-import/ https://wordpress.org/plugins/wp-ultimate-csv-importer/ To send emails, you might use an Email Marketing provider, like Mailchimp. In this case you can import all the users to ...



Top 50 recent answers are included