Category Archives: Wordpress

Redirection Plugin: How to give editor users access to redirection plugin page in wordpress panel

WordPress Redirection plugin is one of the most important wordpress plugins specially for big websites.

Sometimes you need to give your editors an access to this plugin so they can redirect the deleted posts or pages.

By slight modification for the following lines this can achieved easily:

In the plugin directory folder open redirection.php and change the code in line 118

From

118
add_management_page( __( "Redirection", 'redirection' ), __( "Redirection", 'redirection' ), "administrator", basename( __FILE__ ), array( &$this, "admin_screen" ) );

TO

118
add_management_page( __( "Redirection", 'redirection' ), __( "Redirection", 'redirection' ),"delete_others_pages", basename( __FILE__ ), array( &$this, "admin_screen" ) );

 

Then open the file ajax.php in line 36 change the following

36
if ( current_user_can('administrator') ) {

TO

36
if ( current_user_can('delete_others_pages') ) {

FancyBox for wordpress – using custom expression

I am big fan of the WordPress plugin Fancybox for WordPress  which using the Fancybox Jquery plugin.

one day i want to apply the group option for each gallery shortcode on the same page.

I used the the custom expression to achieve the task by going to wordpress admin => setting => Fancybox for WP => galleries => custom expression and changing the code to the following

1
2
3
4
var posts = jQuery(".gallery");
posts.each(function() {
jQuery(this).find(thumbnails).addClass("fancybox").attr("rel","fancybox"+posts.index(this)).getTitle();
});

snapshot for the setting page fancybox-customexpression