Tag Info

New answers tagged

0

You can use the the acf/save_post action to copy the content from your custom 'full_text' field over to the normal post content field, so it can automatically be accessed by toc+ and other plugins. add_action( 'acf/save_post', 'wpse199256', 20 ); function wpse199256( $post_ID ) { global $wpdb; $post = get_post( $post_ID ); $wpdb->update( ...


0

1) In order to check what kind of prefix used by current installantion you can goto wp-config.php in a root directory and find line with $table_prefix = 'PREFIX_HERE'; variable 2) Backup the DB before making any action! 3) Additionally check if other tables with different prefixes/name_patters are not used by badly-written 3rd party plugins. They may not ...


0

Working code: <?php global $wpdb; $date = date("Y-m-d"); $querystr = " SELECT * FROM wp_posts JOIN wp_ftcalendar_events ON wp_posts.ID = wp_ftcalendar_events.post_parent WHERE wp_posts.post_status = 'publish' AND wp_posts.post_type = 'post' AND wp_ftcalendar_events.start_datetime >= '$date' ORDER BY wp_ftcalendar_events.start_datetime ASC "; ...


1

First of all you are trying to combine both of the tables by post_parent. $wpdb->posts.post_parent = $wpdb->ftcalendar_events.post_parent I guess data in the ftcalendar_events has children of posts table, try $wpdb->posts.ID = $wpdb->ftcalendar_events.post_parent Also you can try joining tables: SELECT * FROM $wpdb->posts JOIN ...


0

The problem was caused by canonical meta tag (thanks @Milo), as it had the same value for all of these pages. You have to avoid using the same value for canonical meta tag for pages with dynamic content. I changed it to be unique for every page. However it took google more than one month to get these pages indexed. Check this article as well.


1

can I just create one using PHPMYADMIN ? Yes.You can. And its a shortest way to do it.


1

I didn't do this recently but in 2014, in a few WordPress projects that I need additional tables I used Laravel components. In WordPress, if you want to create your own tables by using wpdb and mysql queries. But with the Laravel database classes I managed to do this much more elegantly. A quick rundown how I do this: (note: At the time, I used Laravel 4 ...


2

When I started out with Wordpress I was anti-plugin. I wanted to add everything in my theme's functions.php. When I looked at the bigger picture it began making sense having and leaving some functionalities inside a plugin. There are many write-ups on the subject of what should go into a plugin and what should go into a theme. I, for one, have done one or ...



Top 50 recent answers are included