show posts to only registered users in wordpress

Some people want to show posts to only registered users in wordpress in site. You just need to create category and publish your posts in private category.

How to show posts to only registered users in wordpress

Use the following code in index.php and single.php and page.php file.


$cat_id = get_cat_ID('private');
$args=array(
  'category__not_in' => $cat_id,
  'post_type' => 'post',
  'post_status' => 'publish',
  'posts_per_page' => 5
);

if(!is_user_logged_in()){
    $cat_id = get_cat_ID('private');
   $args=array(
  'category__not_in' => $cat_id,
  'post_type' => 'post',
  'post_status' => 'publish',
  'posts_per_page' => 5
);

} else {
    $cat_id = get_cat_ID('public');
$args=array(
  'category__not_in' => $cat_id,
  'post_type' => 'post',
  'post_status' => 'publish',
  'posts_per_page' => 5
);

}
// The Query
query_posts( $args );

// The Loop
while ( have_posts() ) : the_post();
	echo '<li>';
	the_title();
	echo '</li>';
endwhile;

// Reset Query
wp_reset_query();
How to show posts to only registered users in wordpress
How to show posts to only registered users in wordpress

Limit excerpt length by characters in wordpress

On wordpress home page many sites are showing the post description or we can say the excerpt. For UI purpose some time we need to control the excerpt character limit.  I already written about this in following article. But some people need the more advanced excerpt. Following code snippet will be helpful to you show the limit excerpt length by characters in wordpress.

First open your functions.php file and put following code in that file.

[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

function get_excerpt($count){
  $permalink = get_permalink($post->ID);
  $excerpt = get_the_content();
  $excerpt = strip_tags($excerpt);
  $excerpt = substr($excerpt, 0, $count);
  $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
  $excerpt = $excerpt.'... <a href="'.$permalink.'">more</a>';
  return $excerpt;
}

[/viral-lock]

Use this function if you’re planning on using it more than once with a different amount of characters.

Call the function plus the amount of characters –

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php echo get_excerpt(125); ?>

Following is my old article link.
https://purabtech.in/set-wordpress-post-excerpt-length-limited-characters/

Limit excerpt length by characters in wordpress
Limit excerpt length by characters in wordpress

wordpress 3.3 version is now ready for testing

WordPress 3.3 is ready for testers. Following changes has been fixed in wordpress 3.3 version.

wordpress 3.3 version is now ready for testing

  • Updated the Blue theme
  • Fixed IE7 and RTL support
  • Improved flyout menu styling and fixed several glitches
  • Finished the Pointers implementation
  • Landed the dashboard Welcome box for new installs
  • Improved contextual help styling
  • Tweaked the admin bar a little more
  • Fixed a bunch of bugs
  • Media uploader
  • Improved admin bar
  • Fly out admin menus

As always, this is software still in development and we don’t recommend that you run it on a production site — set up a test site just to play with the new version. If you break it (find a bug), please report it, and if you’re a developer, try to help us fix it.

If all goes well, we hope to release WordPress 3.3 by the end of November. The more help we get with testing and fixing bugs, the sooner we will be able to release the final version. If you want to be a beta tester,

Download 3.3 Beta 2.

wordpress-3-3
wordpress-3-3

 

wordpress comment preview for box comment without plugin

Showing wordpress comment preview for comment box is always good for attracting the visitors. I shown code here for show the comments preview.

wordpress comment preview for comment box

Many times comments preview will be useful for visitors to see how comments will be looking. Using google Jquery or wordpress jquery you can add the comment preview to your wordpress blog. Showing comment preview is always good for attracting the visitors. Many clients demands for this. I shown you the example code over here for show the comments preview.

In this tutorial I am using the wordpress inbuild jquery.  First open your header. php file from your theme folder and after head tag following code.


<?php wp_enqueue_script(</code><code>'jquery'</code><code>); ?>
<?php if (is_single()) { ?>

<script type="text/javascript">

jQuery(document).ready(function(){

	jQuery("").add("<h3 id='preview-title'>Comment Preview</h3><div id='comment-preview'></div>").appendTo(document.body);
	jQuery("#comment-preview, #preview-title").insertAfter("#comment");

	var $comment = '';
	jQuery('#comment').keyup(function() {
		$comment = jQuery(this).val();
		$comment = $comment.replace(/\n\n+/g, '<br /><br />').replace(/\n/g, "<br />");
		jQuery('#comment-preview').html( $comment );
	});

});

</script>
<?php } ?>

Then Open Your style.css file from your theme folder put the following code in that file.

#comment-preview {
	border: 1px solid #ccc;
	padding: 5px 15px 15px 15px;
	}
h3#preview-title {
	margin-bottom: 5px
	}

After that upload the modified files on server. you will see following functionality for your wordpress commnets section.

wordpress comment preview for comment box
wordpress comment preview for comment box

If you are not wordpress developer then please dont try this.

WordPress has Released with server incompatibility issues

wordpress 3.0 got huge success and after that wordpress 3.2 is downloaded millions of times. This release came after some problem on many hosting company on JavaScript Modul JSon.

WordPress has Released with server incompatibility issues

As well as a few other fixes in the new dashboard design and the Twenty Eleven theme. If you’ve already updated to 3.2, then this update will be even faster than usual, thanks to the new feature in 3.2 that only updates files that have been changed, rather than replacing all the files in your installation.

WordPress has Released with server incompatibility issues
WordPress has Released with server incompatibility issues

WordPress Trac lists all the changes in the new release. If you look at the list you will notice that most are design related. Many fix or improve the Twenty Eleven default theme that ships with WordPress, while others do the same for the new admin interface introduced in WordPress 3.2.

Still no option to change the default font for the admin interface easily, unfortunately.

Updates are makinguse of the new “fast” update mechanism which only updates files that have been changed, instead of all files of a WordPress installation. Users who update via their WordPress Dashboard should notice that the procedure is speedier than before.

Updates are available via Dashboard > Updates. WordPress administrators can download the new version of WordPress from there or update directly if their blog has been configured properly for that.

add ajax pagination in wordpress blog

For without refresh the data from home page if you want to show the pages and pagination in wordpress blog than you can use the following code for add ajax pagination in wordpress blog.

add ajax pagination in wordpress blog

With the help of jquery you can easily add the pagination wordpress blog site. You just need to add the following code into header.php file.

[viral-lock message=”Source code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]


<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php wp_enqueue_script('jquery'); ?>
<script>
jQuery(document).ready(function(){
 // ajax pagination
 jQuery('#wp_pagination a').live('click', function(){ // if not using wp_pagination, change this to correct ID
 var link = jQuery(this).attr('href');
 // #main is the ID of the outer div wrapping your posts
 jQuery('#main-container').html('<div><h2>Loading...</h2></div>');
 // #entries is the ID of the inner div wrapping your posts
 jQuery('#main-container').load(link+' #entries')
 });
}); // end ready function
</script>

[/viral-lock]

just put above code in header.php file in head section. Just make sure that you are putting above code after wp_head function.

add ajax pagination in wordpress blog
add ajax pagination in wordpress blog

If you are not wordpress developer then dont use following code and If you are facing any issue then write to me on support@purabtech.in

wordpress plugins for comments enhancement

Comments is very important way doing interaction with blogger and other world. People like to reading the comments. In comments some people put review also. wordpress provides the default comment functionality with blog but some some client want extra functionality with wordpress comments.

wordpress plugins for comments enhancement

wordpress plugins for comments enhancement
wordpress plugins for comments enhancement

Here I created list of wordpress plugins which are really useful for modify the enhance the wordpress comment functionality.

List of wordpress plugins for comments enhancement

Akismet

Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you review the spam it catches under your blog’s “Comments” admin screen.

Subscribe to Comments

Subscribe to Comments is a robust plugin that enables commenters to sign up for e-mail notification of subsequent entries. The plugin includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts, block all notifications, or even change their notification e-mail address!

Live Comment Preview

This plugin uses only client-side Javascript to format a preview, it does not make any Ajax requests to the server. This provides a smooth live preview as you type.

WP-reCAPTCHA

Integrates reCAPTCHA anti-spam methods with WordPress including comment, registration, and email spam protection. reCAPTCHA is an anti-spam method originating from Carnegie Mellon University which uses CAPTCHAs in a genius way. Instead of randomly generating useless characters which users grow tired of continuosly typing in, risking the possibility that spammers will eventually write sophisticated spam bots which use OCR libraries to read the characters, reCAPTCHA uses a different approach.

Comment Highlighter

Comment Highlighter is a WordPress plugin which can be used to add different style classes to comments. There are already plugins/hacks/alterations that adds a style to all comments written by the blog owner, adds a different style to every other comment, etc. This plugin takes it a bit further.

Depending on which rules you set up, then Comment Highlighter can add style to comments based on the email of the author (of the comment), the name or the URL. These styles can furhter more be locked to a specific post ID.

Facebook Comments for WordPress

This plugin integrates the Facebook commenting system (new, old or both) right into your website. If a reader is logged into Facebook while viewing any comment-enabled page or post, they’ll be able to leave a comment using their Facebook profile.

Comment Rating Widget

This plugin is an add on to the Comment Rating plugin (version 2.9.0 or later). It displays ratings along with the most recent comments in the sidebar in formats of your design. The comment rating and images on display can be “Likes only”, “Dislikes only”, or Both. This is customizable by the “Value for comment_karma” option in Comment Rating.

Admin Commenters Comments Count

Next to all appearances of each commenter’s name in the admin, this plugin shows a count of their total number of comments, linked to a listing of those comments.

By default in WordPress, it is not possible to tell via a single glance whether a particular commenter has commented before, and if so, how many times.

WP Comment Remix

For the readers WP Comment Remix adds a number of great features that you can turn on or off, but they include:

Reply Link You can add a Reply link to each comment, which, when clicked, adds “@OriginalPoster”, and links it to the anchor of that comment. For instance, if Steve left comment #23, and you click the reply link for that comment, WP Comment Remix automatically adds:

Above wordpress plugins will enhance the user experience. Above wordpress plugins are very important for wordpress bloggers.

purabtech.in is made this list. If you want more information or you are facing any issue related wordpress coments then check our site or write to us on support@purabtech.in

how to create gravatar for wordpress

WordPress tip, how to create gravatar for wordpress. Avatar is very important thing in internet world. With creating the Avatar you can create your identity. When you are commenting on any blog that time avatar is appearing. Avatar is presents you. Many people use different types of avatars.

how to create gravatar for wordpress

For creating the Avatar you need to following website.

how to create gravatar for wordpress comments and blogging
how to create gravatar for wordpress comments and blogging

 

  • sign up using the email address you generally use to comment with.
  • upload your picture that you want to show up when you comment.

If you started blogging then you must create your profile. If you are programmer or designer or any internet person then you must create your avatar.

After that you should submit your avatar to following site I like this site so much. So many professional bloggers added there avatars. on this site.

http://www.avatarwall.com/

My friend Walter who is editor of WebdesignerDepot.com, he created this site.

For more information you can check following URL

Introducing Avatar Wall: Show Your Avatar to the World

how to add top button in wordpress website

Adding top button link is always good for users of blog. This is good for SEO also and your blog became more seo friendly this way.

how to add top button in wordpress

You just need to add the following CSS code into style.css file.


#topbutton{display: block;border: 0;position: fixed;  bottom: 20px; right:0;

After this open your header.php file from your wordpress theme folder and after body just add following link code in that file.


<a name="top"></a>

After this open your footer.php file and at the end of body tag add following code in that file.


<a href="#top"><div id="topbutton">
bloginfo('template_directory'); ?>/images/top-button-wordpress.png" />
</a>

put following image in your wordpress theme’s images folder. Just right click and save the image and put that in your images folder.

You can change css as per your requirement. This article is written by purabtech.in. If you are having any dobuts then please write to me.

Your button link will look like as follows:

add top button in wordpress
add top button in wordpress

how to embed google map in wordpress

Google map is common requirement in every website. I worked on google map v3 in javascript. we will how to embed google map in wordpress. we have List of wordpess plugins in this article. As we know more than 18 million sites are created in wordpress. Google map now became very advanced now. Google map version 3 is really great. I worked on google map v3 in javascript.

how to embed google map in wordpress

Now every second site need to google map integration. Here In this article I will show how to add the google map in wordpress site.

how to embed google map in wordpress
how to embed google map in wordpress

Here I created list of google map plugins which can be useful for wordpress. Using following wordpress plugin you can add the google map into your site.

Google Maps Ready!

Google Maps Ready embed google map in wordpress
embed google map in wordpress

Easy to use and powerful Ready! Customize google map and add to the post/page with shortcode or use as a widget. Allow to open maps in pop-up. Add markers with text, images, links description and custom icons. embed google map in wordpress, Categories and sort markers and location points.

Google Maps plugin Features

  • Custom markers. Set marker description, icon and animation
  • Works with any Responsive themes
  • Markers Groups and Clusters
  • Add location by searching or coordinates
  • Fully customizable. All features of the map or marker can be switched off/on
  • Support for localization
  • Works in sidebars, posts, pages, custom post types or as widget
  • Use integrated address search (Google Places API) for quickly finding your places and locations
  • CSV import and export maps and markers data
  • embed google map in wordpress

Inline Google Maps

This is the most complete and advanced Google Maps plugin to be used in your WordPress blog or any other content manager or even plain HTML pages.

It helps you very easily insert simple to complex Google Maps in your pages from a plain Google Maps URL, remote or local KML file.

Google Maps for WordPress

This plugin allows you to easily insert Google Maps into your blog, making use of the new shortCode system in WordPress 2.5. The maps can be configured to offer directions to or from the location, show or hide the zoom/pan controls, show/hide map type (street view, satellite, etc), activate zoom using mouse wheel, and more. PHP5 Required.

XML Google Maps

This plugin allows you to easily insert Google Map or Google Earth Plugin Maps into your blog. You just have to add a link to your self defined Map from My Google Maps, Picasa Webalbum Picture Map, any geoRSS Feed (like Flickr), your uploaded Google Earth file (kmz, kml) or any other dynamic or static Google Earth file (umapper.com, flickr.com, etc.).

Even if you have a GPX-File from your GPS, upload it, link it and it get displayed. For GPX-Tracks you can even display speed, elevation charts (Google Charts API) and a data table with checkpoints (distance, time, average speed, max speed, climb up, climb down).

Multi Google Maps

This is first plug-in that allows you to insert Multi Google Map V.3 Objects into your post/blog, No require Google Map API Key. Next version, this plug-in supports to display Multi Google Map on Popup. By the way , If you have any questions or suggestions, please feel free to contact me. (siripol.n at gmail dot com)

Google Maps v3 Shortcode

This plugin allows you to add a google map into your post/page using shortcodes.

Features:

  • multiple maps on the same post
  • set map size
  • set zoom level
  • set map type
  • set location by latitude/longitude
  • set location by address
  • add marker
  • add custom image as map icon
  • add KML via URL link
  • show traffic
  • support for Google My Maps

Google maps

This plugin will let you easily embed Google maps in your posts. It will produce clean XHTML code without any iframe.

Features:

  • add an embed Google map in your post by using this syntax [map:http://permalink_to_your_Google_map 640 480] “width” (640 in the example) and “height” are optional parameters. You can use px or %,
  • it could be a recorded map or any other map you’re consulting (some complicated map can’t be shown) some examples are availables on my blog,
  • double-click or use your scrolling mouse button to zoom on,
  • internationalization of the plugin,
  • XHTML conform,
  • tested and working on IE6, IE7, IE8, Firefox, Opera, Chrome, Safari,

Here is another article which will help you to add google map in wrodpress.

Add google maps in wordpress post

This list made by purabtech.in. If you need any help about integrating google map into wordpress then please write to me.