How can I implement a notification system in wordpress?

If you look through the definition of wp_insert_post(), you’ll see do_action( ‘wp_insert_post’, $post_ID, $post, $update ); at the end of it. So you can hook into this and perform whatever task you want to after creating a post. Something like this in your theme’s functions.php or in your plugin file: do_action( ‘wp_insert_post’, ‘send_notification’); function send_notification($post_ID, … Read more

Is there a way to alter the order in which the plugins appear in the page?

From your comment it looks like you almost got it, Plugins that add something under your content usually use the_content filter by calling a function using add_filter for example outbarin plugin calls it like this: add_filter(‘the_content’, ‘outbrain_display’); so the way your can order them is by passing the priority parameter add_filter(‘the_content’, ‘outbrain_display’,99); But changing it … Read more

How to add pagination with page numbers rather than next/previous links?

It depends on which pagination you’re talking about: Archive Index pagination Single-Post pagination Comments pagination In all three cases, the answer is yes, but the implementation is different. Archive Index Pagination WordPress provides a function, paginate_links(), for post-archive pagination links. It’s use isn’t exactly straightforward, but fortunately, implementation is mostly cut-and-paste from the Codex example. … Read more

Display comments of users on single page

You can use the get_comments function to retrieve comments from a specific user. $comments = get_comments( array( ‘user_id’ => 1 ) ); foreach( $comments as $comment ) { $post_id = $comment->comment_post_ID; $post = get_post( $post_id ); setup_postdata( $post ); echo ‘<a href=”‘ . get_permalink() . ‘”>’ . get_the_title() . ‘</a>’; echo $comment->comment_author . ‘<br />’ … Read more

Let user subscribe to specific categories

You can give them this url http://www.example.com/?cat=42&feed=rss2 This one if permalinks are enabled http://example.com/category/categoryname/feed Replace the site url & also the cateogries id or slug with the correct one UPDATE IN RESPONSE TO COMMENT Display a list of categories to the user maybe with wp_dropdown_categories. Save the id of the category the user subscribed to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)