Best db table structure for users with many records

Personaly I would go with one table for all users. Having more tables with the same columns seems like a strange idea to me. The database will be a complete mess after you gwt more users. Make sure that the user_id is an index for the table and all your select/update/delete will be fine. The … Read more

Function to get a list of all comments on 1 post [closed]

You should use get_comments( $args ) and add the post ID in the arguments ($args) array: $post_id = 1; // post ID here from the submitted data $comments = get_comments(array( ‘post_id’ => (int) $post_id )); // dump the comments found print_r( $comments ); That would get you a comments list on that post. Hope that … Read more

how to use header function in wp-load.php file [closed]

You should never create standalone files to do things like this. This is one of the reasons timthumb turned into a security nightmare, and it’s incredibly fragile and dangerous. WordPress is a CMS, and it should handle all requests. Instead, use GET or POST variables in the URL to do the work inside WordPress, by … Read more

Single post pagination

It’s possible to modify the content pagination with the content_pagination filter. Here’s a way to always display the content of the first page: /** * Content Pagination: Always display the content of the first page */ add_filter( ‘content_pagination’, function( $pages ) { // Nothing to do if there’s no pagination if( count( $pages ) <= … Read more

Ajax Load More or View More functionality for woocommerce category layout by template overriding

You can achieve this by create a template override for woocommerce category layout. How to Create Template override Go to wp-content/theme/{your_theme} Create a folder named woocommerce if already not exist Then create a file titled archive-product.php Now, paste the below code as instructed and modify any parameters per your need Add this code right after … Read more

How to get formidable entry ID by post ID? [closed]

So, after a lot of searching (which is funny, because it’s such a basic function which should apear in the documents) i found that: what you have to do to get the current post entry id is: <?php $entry_id = $wpdb->get_var(“SELECT id FROM $frmdb->entries WHERE post_id='”. $post->ID .”‘”); ?>