Category: Wordpress Tips

Customize wordpress excerpt ellipsis with post permalink 0

Customize wordpress excerpt ellipsis with post permalink

Copy and Pase the given blow code in your functions.php file. This code will replace the ellipsis with post permalink. function new_excerpt_more($content) { return ‘<div><a href=”‘. get_permalink() .’”>Read More…</a></div>’; } add_filter(‘excerpt_more’, ‘new_excerpt_more’); You can...

Show wordpress search result in Ascending order 0

Show wordpress search result in Ascending order

WordPress shows search result always in descending order to change it into Ascending order follow the given blow instruction. Change this line <?php if(have_post()): ?> to <?php query_posts(‘order=ASC’); if(have_post()): ?> Now you are done...

Show Top Comments or Commentators In WordPress Without A Plugin 0

Show Top Comments or Commentators In WordPress Without A Plugin

Here is a simple code snippet to show the top commentators or comments in the wordpres without any plugin. The code are given blow. function top_comment_authors($amount = 5){ global $wpdb; $results = $wpdb->get_results(‘ SELECT...

Add custom or extra fields on registration page in wordpress 0

Add custom or extra fields on registration page in wordpress

Open your theme’s function.php file and drag this PHP code in. <?php // This function shows the form fiend on registration page add_action(‘register_form’,’show_first_name_field’);   // This is a check to see if you want...

Adding custom user profile fields in wordpress 0

Adding custom user profile fields in wordpress

Open your theme’s “functions.php” file and this PHP code in your file. <?php add_action( ‘show_user_profile’, ‘show_extra_profile_fields’, 1 ); add_action( ‘edit_user_profile’, ‘show_extra_profile_fields’, 1 ); function show_extra_profile_fields( $user ) { ?> <h3><?php _e(‘Your Hotel Address’, ‘frontendprofile’);...

Remove admin color scheme picker from profile 0

Remove admin color scheme picker from profile

Add this script to the functions.php of your wordpress theme will remove the admin color scheme picker from the profile page. if(is_admin()){ remove_action(“admin_color_scheme_picker”, “admin_color_scheme_picker”); }