how-to – muchad https://muchad.com Mukhlish Fuadi Fri, 27 May 2016 15:11:18 +0000 en-US hourly 1 WordPress Post Like without Plugin https://muchad.com/wordpress-post-like-without-plugin/ https://muchad.com/wordpress-post-like-without-plugin/#comments Fri, 27 May 2016 15:11:18 +0000 http://muchad.com/?p=2262 Read more »]]> In muchad.com you can find love picture in every after post. This “post like” is integrated with my theme, medio theme.
Post Like in WordPress

Post Like in Medio Theme


I using Post Like system by Sven Hofmann’s, it’s pretty cool. This is the scenario:
When an anonymous user clicks the like button:
– User’s IP address is stored in the post’s meta as an array.
– These IP addresses are utilized to prevent anonymous users from liking posts more than once.
– Post like count is incremented +1 and stored in post meta.
When a registered user clicks the like button:
– WP User ID in the post’s meta as an array.
– Post like count is incremented +1 and stored in post meta.
– Post ID is stored as user meta.
– User like count is incremented +1 and stored as user meta.
 
If you want use it in your theme, you can read full tutorial in his website from this link or directly read his gist:

]]>
https://muchad.com/wordpress-post-like-without-plugin/feed/ 3
Show Popular or Trending Post in WordPress https://muchad.com/show-popular-or-trending-post-in-wordpress/ https://muchad.com/show-popular-or-trending-post-in-wordpress/#comments Fri, 27 May 2016 14:50:26 +0000 http://muchad.com/?p=2258 Read more »]]> Front page of muchad.com, show popular posts based on comments count. We can do it without plugin. To show some popular posts in WordPress we can do it with this simple script in your theme’s file.

This source code will show 3 popular posts. The problem, it only show posts with many comments count in all of time, so if no another post with comments count more than that posts, this post will be always shown like a static, no other post to show.
 
Trending Posts
To make it more flexible, muchad create a script that not only based on comments count but also “post like count” in a month, so it like trending posts in a month. Post like count is not default from WordPress, you must create it first. About creating “post like count” you can read this.
You can add this script to your theme to show trending posts in a month.

Try it, if you have any problem, just leave a comment. Like it? Please click <3

]]>
https://muchad.com/show-popular-or-trending-post-in-wordpress/feed/ 2
How To Create Shortcode in WordPress https://muchad.com/how-to-create-shortcode-in-wordpress/ https://muchad.com/how-to-create-shortcode-in-wordpress/#respond Fri, 27 May 2016 06:56:09 +0000 http://muchad.com/?p=2243 Read more »]]> muchad.com using medio theme that support shortcode for full width image, like this
 
wordpress-colours.jpg

 
To show this full-width image is like this:
muchad_shortcode.jpg
This is just an example, you can use shortcode for anything what you need in your theme.
 
How to make shortcode in wordpress theme
To make shortcode, edit functions.php in your theme than add this:

 
From this code, every image inside “fullw” we will give <div class=fullw> before the image url and give </div> after the image url. You can try another for your need. Have a question? Leave a comment.

]]>
https://muchad.com/how-to-create-shortcode-in-wordpress/feed/ 0
How To Solve Too Many Failed Login Attempts in WordPress https://muchad.com/how-to-solve-too-many-failed-login-attempts-in-wordpress/ https://muchad.com/how-to-solve-too-many-failed-login-attempts-in-wordpress/#respond Fri, 27 May 2016 06:30:44 +0000 http://muchad.com/?p=2240 Read more »]]> Today my friend get this problem:
Wordpress: Too many failed login attempts

WordPress: Too many failed login attempts


I ask the FTP account, and I found that the problem is because plugin “limit-login-attempts”. Before, I think this alert because any someone or robot try to hack or bypass the login, but from the logs, it’s normal.
To solve it, just access the file manager from your Cpanel or using FTP, than access directory /wp-content/plugins/limit-login-attempts. Open file limit-login-attempts.php and find this code:
add_action('plugins_loaded', 'limit_login_setup', 99999);
just remove it, or make it “comment” with give two slash like this:
//add_action('plugins_loaded', 'limit_login_setup', 99999);
Sorry, just a simple post, I hope useful.
 

]]>
https://muchad.com/how-to-solve-too-many-failed-login-attempts-in-wordpress/feed/ 0