Showing posts with label blogging. Show all posts
Showing posts with label blogging. Show all posts

Tuesday, November 8, 2016

WordPress OutBoundLinks

In many cases we need the links of external website which are present in the content should open in new tab as the original website is not lost. Every time is not possible to add a target blank attribute to the external link while adding the content in the blog post.

Also it helps with the SEO of the website. This plugin automatically adds the target blank attribute to external links present in the content.

Features of the plugin are as follows:

  • It Works with all WordPress posts.
  • It Opens all external links of a post in a new tab.
  • It adds a query string parameter "?rel=outbound" to an hyper-link.
  • The Links which refer within the site are excluded.

You can download and install this plugin at WordPress plugin repository

URL: https://wordpress.org/plugins/outboundlinks/

Monday, May 16, 2016

Get Logged In user ID in WordPress

To get the currently logged in user ID in WordPress use the following code.

<?php
$current_user_id = get_current_user_id();

echo $current_user_id;
?>


$current_user_id will give you the ID of the currently logged in user.

Update Wordpress without FTP

Sometimes when WordPress site is updated ftp details are asked while updating. We can surpass the FTP authentication and directly update WordPress, Plugins and Themes to latest version.
To do so open your wp-config.php file (file is present on the root of wordpress installation).

After opening the file in an editor find the following line

require_once(ABSPATH . 'wp-settings.php');


After you find the above line in the wp-config.php file place the following line below it.

define('FS_METHOD','direct');


So, your final file should look like below.

require_once(ABSPATH . 'wp-settings.php');
define('FS_METHOD','direct');


After this save you wp-config.php file and upload back to server. Now WordPress, Plugins, Themes can be updated to their latest version without the need to enter FTP details.

Wednesday, December 23, 2015

Wordpress home url

As we know WordPress is a very powerful blogging open source CMS, so is development easy and flexible.

To get the home page URL use the following function.

$home_url = home_url();

<?php echo $home_url; ?>

You will get the home URL in the above variable.

MS SQL : How to identify fragmentation in your indexes?

Almost all of us know what fragmentation in SQL indexes are and how it can affect the performance. For those who are new Index fragmentation...