Moving FB comments at the end of page

From the plugin’s user manual. Curent_url – Type the page URL from where you need to show Facebook comments So you will have to change the current URL which is (http://developers.facebook.com/docs/plugins/comments/) to your real current URL. global $wp; $current_url = home_url( add_query_arg( array(), $wp->request ) ); echo do_shortcode(‘[wpdevart_facebook_comment facebook_app_id=”12345678910111213″ curent_url=”‘.$current_url.’ ” order_type=”social” title_text=”Facebook Comment” title_text_color=”#000000″ … Read more

How to use mysql LIKE with wpdb?

According to the Codex, the delete method will not accept the LIKE operator. You’ll be better off just using the query method. $query = $wpdb->prepare(“DELETE FROM $wpdb->posts WHERE post_type=”flamingo_inbound” AND post_content LIKE %s”, ‘%’.$mail.’%’); $wpdb->query($query); Hopefully $mail doesn’t have a % or _ character otherwise you need to escape it before you build $querylike so: … Read more

Is there a way to order children of post?

This should be doable in the get_children() query, try the following: Take a look at the codex entry of get_children(). You will see that get_children() uses the same args as get_posts(). If you than look at get_posts() you will see that you have 2 order arguments to work with: ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, … Read more

Custom wp-query in wordpress rest api

You can create a route for Rest API using the below code. Simply put this code in your function.php file /* Route For api */ add_action( ‘rest_api_init’, function () { register_rest_route(‘wp/v2’, ‘test’, array( ‘methods’ => array(‘GET’, ‘POST’), ‘callback’ => ‘test’, )); } ); And then simply create a callback function test and put your stuff … Read more

Why can’t publish posts with too much text?

If you look into LONGTEXT documentation you’ll see that: The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory. So I would say that 4GB support is only theoretical, in real life your server configuration wouldn’t allow operating on such a big chunk … Read more

Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?

It sounds like you are after adding Wiki functionality to your WordPress site(but with editing restricted to author). See this write up on the topic (complete with revision links above comments). The above article uses the Post Revision Display plugin which hasn’t been updated for a while. However, as he is an tech writer and … Read more