Menu bar

Showing posts with label PAGES. Show all posts
Showing posts with label PAGES. Show all posts

Friday, 26 December 2014

Remove HTML unwanted comment tags from comment section.

REMOVE HTML COMMENT TAGS

By default WordPress includes basic HTML tags in the post comment form in order to allow commentators to use it for formatting there comments.

As you can see in the  image, comment form is listing some HTML tags in the below section.


But, many times it is not necessary to show these HTML tags in the form.

Moreover, with design perspective, displaying these tags doesn’t look good in the comment forms. So you can either remove or hide it from the comment form.

You can perform that task easily by CSS.
i.e. Display none that block.

Place this code in function.php file of your theme.

<?phpadd_action('init', 'unwantedtags');function unwantedtags() {global $allowedtags;// remove unwanted tags$unwanted = array('abbr','acronym','blockquote','cite','code','del','strike','strong','b','em','q');foreach ( $unwanted as $tag )unset( $allowedtags[$tag] );}?>


Monday, 22 December 2014

How to show or hide specific widget on specific page?


SHOW OR HIDE SPECIFIC WIDGETS ON SPECIFIC PAGES

Did you ever think to show or hide your WordPress widgets on selective pages...of course you can thought of.Because there are some wordpress widgets that should be display on certain pages to make websites look better then before.

You can do this task by putting this snippet in your function files....

Here you have to change the widgetname to name of the widget to show or hide and you can get that name by inspecting your code..

Change the pagename to the name of page on which the widget to be show or hide and this is the slug name of your page...

//Show widget on particular page..
add_filter( 'widget_display_callback', 'show_hide_widget', 10, 3 );
function show_hide_widget( $instance, $widget, $args ) {
  if ( $widget->id_base == 'widgetname' ) { 
     if ( !is_page( 'pagename' ) ) {
         return false;
     }
  }
}

//Hide widget on particular page..
add_filter( 'widget_display_callback', 'show_hide_widget', 10, 3 );
function show_hide_widget( $instance, $widget, $args ) {
  if ( $widget->id_base == 'widgetname' ) { 
     if ( is_page( 'pagename' ) ) {
         return false;
     }
  }
}

Even there is a plugin used to perform this task and the name of the plugin is "Display Widgets".

Wednesday, 16 July 2014

Best places to put the keywords for Search Engine Optimizarion!

How to increase your website rank? Through SEO?
Yes..But how to work with it?

SEO especially work with the words.
For that we should know our website relevent words and WHERE TO PUT IT.
So here are the text which indicate where to put your website relevent words.




Here is a list of places where you should try to use your main keywords. 
  1. Keywords in the <title> tag(s). 
  2. Keywords in the <meta name="description"> 
  3. Keywords in the <meta name="keyword"> 
  4. Keywords in <h1> or other headline tags. 
  5. Keywords in the <a href="http://yourcompany.com">keywords</a> link tags.
  6. Keywords in the body copy. 
  7. Keywords in alt tags. 
  8. Keywords in <!-- insert comments here> comments tags. 
  9. Keywords contained in the URL or site address, e.g., http://www.keyword.com/keywordkeyword.htm.