There is a collection of WordPress plug-ins that never gives failure of the functionality of WordPress beyond some defaults to letting webmasters shape their websites, it is WordPress Hacks. It gives the customization capability to webmasters of the tasks that can't be accomplished by any plug-ins. These are establishing a support and receiving a platform as some non-programming webmaster are searching the support of web developers to introduce new features in websites.
Points which user can implement on WordPress Secured website:
Removing a title of a specific page
There are some tools to provide facility to remove titles from the pages of the site whenever user need to remove from particular pages.
RSS Feed contains post's featured image
Using images on the posts gives always some extra force among the viewers to read and further expansion among their circles. A user can also enhance the featured image of the post to make it visually catchier.
Display some personalized widgets
Website's header is advertising area where a user can display noticeable ads. The site admins are not free to control to display the desired elements on a header and thus leads lack of flexibility.
Enable Shortcodes in Widgets
Widgets never stop to give its services that user is searching. They build an essential part of any WordPress website and therefore to enhance its features.
Top Navigation will be visible
On a website, the top navigation bar menu is ignorable probably for its position and therefore the user has to move it.
To move the Navigation menu to Center
It has a possibility that user has decided to realign the logo to place at the center of the header so a user should move navigation menu to the center.
Delay Post Publishing on RSS Feeds
When a post has sent to RSS Feeds then minor mistakes can make it costly and make delay the process. By including some codes user can resist the posts on RSS feed.
Avoid Circular Avatars? Make Squarish
The theme which has chosen by a user for WP websites automatically alter the avatar images to present in the circular form. The webmaster would display their avatars in a square form.
Disable HTML comments
HTML comments can give spam in bulk which can have a serious outcome on the website. Therefore it is essential to disable HTML in a comment section to keep website spam free.
Make Complete Post
If any user is searching a particular post, redirect it to the complete post. So, there is no need of navigation for the users and therefore enhance the user experience.
Display Current Copyright date
Copyright is an essential part of the website contains plenty of useful information that other randomizers can't copy on the web. Thus, it is important to display accurate copyright information with the current year.
Redirect users to log in
When any user is logged into the website then he can be redirected to another URL according to his choice.
Make Dashboard a Personalized logo
Most webmasters are struggling to have personalized logo for a dashboard in WordPress backend.
Set editor as default
A user has the freedom to choose the editor according to his wish to set as default.
The Extraordinarily Useful WordPress Hacks You Probably Haven’t Used as Yet
Today almost every website is powered by WordPress, so as WordPress hacks. Here in this article, you will go to see some code snippets or hacks which user is required to implement on a website so that he or she can take their website in a right direction or in a direction they want to.
1. Enabling Shortcodes in Widget
The edges which we want for our website, Widgets never gave the same. They are considered as an indispensable part of almost every WordPress website and if a user wishes to enhance the features or look of the website then for this shortcodes are here. A filter can also be used for this.
add_filter( ‘widget_text', ‘do_shortcode' );
2. Move the Navigation menu to the Center
Move the navigation menu to the center, hack allows the user to realign the logo and to place the same at the center of the header so that it doesn’t look in such a manner that it is out of the place. And here presents a code to do this:
#navigation {
position: relative;
}
#main-nav {
clear: left;
float: left;
list-style: none;
margin: 0;
padding: 0;
position: relative;
left: 50%;
text-align: center;
}
.nav li {
display: block;
float: left;
list-style: none;
margin: 0;
padding: 0;
position: relative;
right: 50%;
}
.nav li.hover, .nav li.hover {
position: relative;
}
.nav li ul li {
left: 0;
3. Let Your RSS Feed Contain the Post’s Featured Image
If pictures are used in your posts, it always leaves a good impression on your audience and pushes them to read and forward or share the same in your circles. And when posts featured image can be used by you in your RSS Feeds, your reach to the post can be enhanced by making it visible clearly and to perform this task, the following code snippets are useful:
add_filter(‘the_content_feed', ‘rss_post_thumbnail');
function rss_post_thumbnail($content) {
global$post;
if( has_post_thumbnail($post->ID) )
$content= ‘<p>'.get_the_post_thumbnail($post->ID, ‘thumbnail') . ‘</p>'. $content;
return $content;
}
4. Display the Most Accurate and Current Copyright Date
Copyright is a very important part of the website as it contains large relevant information which is confidential too and thus any webmaster doesn’t want to be copied the same by any other randomizers on the internet. Thus, to display the copyright information correct with max accuracy and in synchronization with the current year is very essential. Here the code helps you to do some updating in the copyright information on the constant basis and that too automatically.
function comicpress_copyright() {
global$wpdb;
$copyright_dates= $wpdb->get_results(“SELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate FROM $wpdb->posts WHERE post_status = ‘publish'”);
$output= ”;
if($copyright_dates) {
$copyright= “© “. $copyright_dates[0]->firstdate;
if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
$copyright.= ‘-‘. $copyright_dates[0]->lastdate;
}
$output= $copyright;
}
return $output;
}
5. Set the Editor You Want to as Default
Most of the people have the habit of using HTML Editor as it very user-friendly instead of the Visual Editor so here it allows you to select the option with which you are comfortable and wishes to set as the default one.And to set the preferred editor as default, given hack is to be followed.
# Visual Editor asdefault
add_filter( ‘wp_default_editor', create_function(”, ‘return “tinymce”;') );
# HTML Editor asdefault
add_filter( ‘wp_default_editor', create_function(”, ‘return “html”;') );
6. Cast Away the Primary orTop Navigation
Canvas, in particular, has two navigation bars. One navigation bar is located above the header and it is thereby called the Top Navigation Bar. Then, you have the Primary Navigation that is located below the header. Now, whether you wish to use both or just one is entirely your prerogative, on our end, we can show you how to remove them:
Primary Navigation can be gotten rid of by this code:
add_action( ‘init', ‘remove_canvas_main_navigation', 10 );
function remove_canvas_main_navigation () {
// Remove main nav from the woo_header_after hook
remove_action( ‘woo_header_after','woo_nav', 10 );
}
And to remove the Top Navigation, you will need this:
add_action( ‘init', ‘remove_canvas_top_navigation', 10 );
function remove_canvas_top_navigation () {
// Remove top nav from the woo_top hook
remove_action( ‘woo_top', ‘woo_top_navigation', 10 );
}