Thursday, 13 March 2014

jQuery selectors


In this tutorial we are discussing jQuery selectors.
The jQuery selectors are one of the main feature in jQuery library .These selectors uses CSS syntax to allow page developer to easily identify the elements of page to operate upon with jQuery library methods. For using JQuery library most effectively , you must be familiar with  jQuery selectors.
Syntax pattern of jQuery selector :
$.(selector).methodName();
The selector is a string expression that identify the element on which the the method has to be implemented. For example :
$("p").click();
You can also hide the paragraph as follows :
$("p").hide();
You can also apply the CSS class to any element as :
$("p").addClass('box');
Types of jQuery selectors :
There are three categories of jQuery selector :
1.Basic CSS Selector
2.Positional Selector
3.Custom jQuery Selectors.

how to Find .htaccess File on Your WordPress Site

Recently, we advised a user to delete .htaccess file from their site to solve a common WordPress error. The user was unable to find their .htaccess file and thought that there was something wrong with his website. For beginners, things like this can be very confusing. In this article, we will show why you can’t find .htaccess file on your WordPress site, and how to create one when needed.
What is .htaccess file?

.htaccess file is a server configuration file which tells your server how to handle certain things on your website. Like how to redirect users, password protect admin area, or protect some directories, etc.
The dot before the file name indicates that it is a hidden file. When you are accessing your web server through FTP, you will not be able to see .htaccess file unless your FTP client is forced to show hidden files.

Why You Can’t Find .htaccess File?

The most common reason for this is that your WordPress site has not generated a .htaccess file yet. WordPress generates .htaccess file for the first time when you set up pretty permalinks on Settings » Permalinks screen. All you need to do is to click on Save Changes button on the permalinks screen and WordPress will generate a .htaccess file in your site’s root directory.


Monday, 10 March 2014

How to Remove Numbers from WordPress page and posts URLs



Permalink URL Structure

WordPress has built in support for SEO friendly URL structure. All you need to do is to open Settings » Permalinks page in the admin area and choose a URL structure for your site. There are a number of options available. We recommend choosing a URL structure that shows your post title in the URL because it is SEO friendly and will help others discover your site in search engines. Once you have setuppermalinks you need to save your changes.

Sunday, 9 March 2014

How Removing Dashboard Menus

I don't know about you, but there's some parts of the Dashboard I never use, meaning they're just left to bulk up the menu. This is unnecessary, and can easily be fixed by removing them with a function. It's a very common tweak that I use in almost most cases with my own blogs.
In the example below, we've removed the Links item, but you simply have to add in another item to the array to remove another.

function remove_menus () {
global $menu;
        $restricted = array(__('Links'));
        end ($menu);
        while (prev($menu)){
            $value = explode(' ',$menu[key($menu)][0]);
            if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
        }
}
add_action('admin_menu', 'remove_menus');
 
for example to remove Links and media menu on damin dashboard
 
$restricted = array(__('Links'), __('Media'));
 

how to Removing Dashboard Widgets

Just as we can add our own custom dashboard widgets, we can remove specific dashboard widgets with ease.
function disable_default_dashboard_widgets() {
 
    remove_meta_box('dashboard_right_now', 'dashboard', 'core');
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'core');
    remove_meta_box('dashboard_incoming_links', 'dashboard', 'core');
    remove_meta_box('dashboard_plugins', 'dashboard', 'core');
    remove_meta_box('dashboard_quick_press', 'dashboard', 'core');
    remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core');
    remove_meta_box('dashboard_primary', 'dashboard', 'core');
    remove_meta_box('dashboard_secondary', 'dashboard', 'core');
}
add_action('admin_menu', 'disable_default_dashboard_widgets');

How to add custom dashboard widgets



The WordPress dashboard is a layout for widgets, but some of them are, quiet frankly, useless. I certainly remove quite a lot of them from my dashboard, such as the WordPress news and under-featured QuickPress.

With the code below, we can add our own widgets to the dashboard. This can be useful to add custom stats, or maybe to provide contextual help. It's pretty simple to do so, simply place whatever you want to appear within the second function. Make sure you replace your name with the third parameter of the function on line 3 too.


function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'My Widget Title', 'custom_dashboard_help');
}
function custom_dashboard_help() {
echo 'My widget content';
}
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');


Friday, 7 March 2014

Customizing Your Mobile Theme in WPTouch Pro3

https://asmclk.com/click.php?aff=105539&camp=148221&sub1=



By default WPTouch Pro 3 comes with one mobile theme pre-installed. You can download and install additional themes from WPTouch Pro » Themes & Extensions. Bauhaus, CMS, Classic Redux, and Simple are the themes available with all licensing plans. To install a theme simply click on the Install button below the theme. WPTouch Pro will download the theme from the cloud and install it. Once a theme is installed, you can click on the activate button to use that theme.

Customizing Your Mobile Theme in WPTouch Pro3

Once you have selected the theme for your mobile site, you may want to customize it to meet your needs. To do that you need to go to WPTouch Pro » Theme Settings. WPTouch Pro’s mobile themes are highly customizable. You can fine tune every aspects of your mobile site from the theme settings screen. We will walk you through different sections of Theme Settings.
On the top menu tab, you can see the different areas of your theme that you can customize. You will start from the General tab which contains options for some basic settings like the number of posts to show on the front page, enable category slider, enable featured posts slider, etc. The default settings should work for most sites, but you can make changes as needed. You will also notice an info icon next to some options, taking your mouse over to the icon will show you contextual help for that option.
Once you have made the changes to your theme, you can preview those changes by clicking on the Preview Theme button at the bottom of the page. When you are satisfied with the changes you have made, you need to click on Save Changes button to save your theme settings. There is also a reset button in case you want to revert back to default settings.
After configuring the General settings for your mobile theme, switch to theBranding tab. This is where you can upload your own logo, background, custom fonts, social media icons, etc. You can also change theme colors to meet your logo and your brand colors.

Turning Your Site into a Mobile Web App

WPTouch Pro allows you to take full advantage of mobile device features by turning your site into a web app. First you need to click on Bookmark Icons tab on Theme Settings screen. You would need to upload two icons, one for Android devices and the other for iOS devices (iPhone, iPod, and iPad).
After that, click on the Web-App Mode tab in theme settings. Simply check the box to enable iOS web-app mode, and this will display advance settings for the web-app mode. You can use the default settings, or you can upload your own custom start up screens.