Browsing Category

WordPress Tips

WordPress Plugins, WordPress Tips

How to bulk delete thousands posts in WordPress

April 30, 2018

Have you been in a case which requires you to delete a ton of posts? If so, I won’t tell you about WordPress reset plugin because it will sweep out all of your site data, not only posts. There should be another way? Sure, let’s check it out in my blog 😉

First, bulk deleting posts by default WordPress function:

Currently, WordPress just display 20 posts per page in Dashboards > All Posts, which means you just can remove 20 posts at once. But you can increase this number easily by open Screen Options > Pagination: enter the Number of items per page as you need. Please note that the value must be less than or equal 999. However, I recommend you just enter the number less than or equal 99 to avoid an infinite page loading if your host is not powerful enough. And don’t forget to revert the posts pagination back to 20 when you’re done.

You can process the delete task more quickly, can’t you? Wait for a second, what’s about a thousand posts at one as I said before? Huh, you still need to do it better than that. Don’t be impatient. You will have the answer right now.

Second, using Bulk Delete plugin:

Actually, the plugin not only allows you to delete posts but also pages, attachments, users and meta fields in bulk based on different conditions and filters. In this example, I will focus on how to delete posts. Now, you can download the plugin at https://wordpress.org/plugins/bulk-delete/

Once the plugin is installed and activated, a Bulk WP menu appears on the WordPress Dashboard. In Bulk Delete Posts, there are many conditions for you to chose how do you want to remove your posts:

  • Delete posts by category
  • Delete posts by tag
  • Delete posts by custom taxonomy
  • Delete posts by custom post type
  • Delete posts by url
  • Delete all draft posts
  • Delete all pending posts
  • Delete all private posts
  • Delete all scheduled posts

The plugin performance is excellent comparate to the traditional delete method of WordPress. I deleted more than 2 thousand posts within minutes. Ahh, don’t forget this warning: “Posts deleted once cannot be retrieved back. Use with caution.”

If you still need more than that. Please take a look at these features of Pro Add-on such as:

  • Delete posts by custom field
  • Delete posts by title
  • Delete posts by duplicate title
  • Delete all scheduled posts
  • Delete all posts from trash

Although the Plugin provides comprehensive options and filters to perform the bulk deletion. You even have one more choice to remove posts by using PHP MyAdmin and it’s indeed a high-speed process. However, since deleting posts in the database needs technical skills, it’s just recommended for advanced users & developers.

 

 

WordPress Plugins, WordPress Tips

How to show/hide content on specific pages?

April 20, 2018

WordPress provides Conditional Tags to control how a content is displayed on template files base on specific conditions. However, when we need to do this on dynamic content, we cannot use original Conditional Tags PHP code. Don’t worry, WP Conditional Shortcodes plugin will help you to accomplish this.

Download and Install

You can install and active WP Conditional Shortcodes directly in WP Admin Dashboard, or download the plugin package from here.

How to use it?

As you know, WordPress has many conditional tags, but this plugin only supports some basic conditionals tags which comes in shortcode format. Every shortcodes would includes its contents if the condition is true.

Here’s the list of supported shortcodes matches with its conditional.

  • is_single – if showing a single post. Use the optional parameter “ids” to specify specific posts.
  • is_singular – if showing a single post or page.
  • is_page – if showing a page. Use the optional parameter “ids” to specify specific pages.
  • is_home – if showing the blog home.
  • is_front_page – if showing the front page of the site.
  • is_sticky – if the current post or page is ‘sticky’.
  • is_category – if showing a category-based archive. Use the optional parameter “ids” to specify specific categories.
  • is_page – if showing a page.
  • is_tag – if showing a tag-based archive.
  • is_tax – if showing a tag- or category-based archive.
  • is_author – if showing an author-based archive.
  • is_archive – if showing any archive.
  • is_year – if showing a yearly archive.
  • is_month – if showing a monthly archive.
  • is_day – if showing a daily archive.
  • is_time – if showing an hourly or shorter archive.
  • is_feed – if generating a feed.
  • is_search – if showing search results.
  • comments_open – if comments are open for the current post or page.

Especially, with  is_page, is_category and is_single shortcodes, you also can use ids=”” attribute to list of the ids that you want to apply the condition.

For example :

[is_page ids="76, 339"]hello[/is_page]

[is_category ids="5, 7"]hello[/is_page]

[is_single ids="94, 63"]hello[/is_single]

In the reverse, you can use prefix not_ before the shortcode name to negative the condition and use it as a if else condition with the positive condition.

[is_single]
This is only shown if showing just this post.
[not_single]
This is shown everywhere else.
[/is_single]
WordPress Plugins, WordPress Tips

Simple Way To Get Free SSL Certificates (HTTPS) For Your Website

March 28, 2018

Google finally released the official SSL Certificates (https) for website with custom domain how I can get it ? just follow this tutorial.

Using plugin: Really Simple SSL 

Description

Really Simple SSL automatically detects your settings and configures your website to run over https.
To keep it lightweight, the options are kept to a minimum. The entire site will move to SSL.

THREE SIMPLE STEPS FOR SETUP:

  • Get an SSL certificate (can’t do that for you, sorry).
  • Activate this plugin
  • Enable SSL with one click

Screenshot:

 

Congrats! Now your website has a unique SSL certificate which will surely enhance an extra layer of security to your website. Now check your website with https:// and enjoy free SSL.

I hope you like this in-depth guide/tutorial, and I’m sure that this tutorial will help you take your blogger blog to the next level and it will improve your ranking in all search engines. If you’ve got any problem or you’ve stuck on any step then feel free to ask in comments, and if you appreciate this post then, please do share this post to let more people know about this trick, after all, sharing is caring.

If you have any question, feel free to comment on the comment section down below.

Wordpress Developer, WordPress Plugins, WordPress Tips

How to use URL field in Visual Composer

February 28, 2018

URL field of Visual Composer is “vc_link” param type. The user can use this field to search and add a link of post/page… link exactly and easy. Besides, that user can type link directly like another text field. Moreover, the user can add target attribute equal “_blank” to open link in a new tab and add rel attribute equal “nofollow” for SEO campaign.
Url Field Setting

1. Add the URL field to your custom element

Visual Composer already has an URL field and we only need to add it to custom code.

2. Manage and edit the HTML

3. Result and Complete Code

WordPress Plugins, WordPress Tips

How can users set avatar in WordPress

February 26, 2018

By default, WP does not allow directly uploading avatar image. So how can users use an image as their avatar?

There are two basic ways so users can set avatar themselves: Use Gravatar and Use a plugin.

  1. Use Gravatar

Gravatar is a service for providing globally unique avatars which be integrated into WordPress. In Dashboard > User area, you can see WordPress suggest you use Gravatar to change avatar.

To change your profile picture, go to https://en.gravatar.com/, sign in by WordPress account, then add your email and the image. The gravatar will be recognized where you use this email.

Moreover, Gravatar lets you add multiple emails.

  1. Use a plugin

Some membership plugins already have integrated uploading user avatar such as Indeed Ultimate Membership Pro, BuddyPress… So you do not need to find other plugins, maybe.

If you don’t like using Gravatar, no need to worry, there are a lot of plugins out there that can help you in this case. One of them is WP User Avatar plugin with interesting features such as:

  • Use image from Media Library as an avatar. This also mean uploading avatar just like uploading an image to Media Library by WordPress default.
  • Choose the avatar for the users who do not have a WP User Avatar image. You can choose showing user’s Gravatar or a default Avatar.
  • Support shortcodes to display or upload new avatar for users.
  • Allow Contributor and Subscriber upload their own avatar with the limitation of upload file size and image dimensions.

Besides, If you need further advanced features, you can consider to upgrade to WP User Avatar Pro version.

After installing WP User Avatar, you can see a section in User editor lets you change avatar.

If user profile page is styled by Theme My Login, that section looks from front end like this:

WordPress Themes, WordPress Tips, WordPress Tutorials

Awesome things you can do with WordPress Widgets in 2017

December 18, 2017

As you know WordPress has released two versions of its adjustment in 2017: version 4.8 “Evans” and version 4.9 “Tipton”. Here are the great features that WordPress upgrades to Widgets:

The New Image Widget

WordPress 4.8 will introduce an image widget which will allow users to easily add images to the sidebar. You will be able to upload or select an image from the WordPress media library. Clicking on the select image will open the WordPress media uploader popup where users can upload or select an image. After inserting the image, users will be able to see a preview of the image in the widget area.

Wordpress Image Widget

The New Video Widget

Similar to the image widget, WordPress 4.8 will also introduce the Video widget. It will allow users to easily upload videos to their sidebar or display any video from YouTube, Vimeo, or any other Oembed provider.  Add the URL of the video you want to embed and then click on the ‘Add to widget’ button. The media uploader popup will disappear, and you will see a thumbnail preview of your video inside the widget.

Wordpress Video Widget

 

The New Audio Widget

Are you a podcaster, musician, or avid blogger? Adding a widget with your audio file has never been easier. Upload your audio file to the Media Library, go to the widget settings, select your file, and you’re ready for listeners. This would be an easy way to add a more personal welcome message, too!

The New Gallery Widget

WordPress 4.9 allows you to have a new Gallery widget to manage it your way. The functionality of gallery widget is as simple as it can get, just simply add images from your WordPress image library by using the Add Images button. You can also use this widget as a temporary way of making people intrigued on your social media platforms like Instagram and Pinterest by viewing thumbnails to create a collage of a single snapshot. So this new gallery widget feature in WordPress 4.9 will definitely create a lot of interest to more of your posts now.

Wordpress Gallery Widget

New and improved text widget

Like it or not, the current default text widget in WordPress is not the most useful thing for the regular user. It supports only raw text (or HTML code) and gives you no formatting tools at all. But the new text widget is set to change that with the inclusion of visual editor. Quite similarly, you will be able to switch between Visual and Text when editing widget content. And, yes, you get some standard formatting tools in both modes. I personally believe that this will finally make the text widget a usable tool for the non-code-savvy user who wants to include some custom content into a widget area. This is overall a great step towards putting the spotlight on the end user and their needs!

Previously, you need to have a basic knowledge of HTML and CSS to use media in Text Widget. With WordPress 4.9, you will have the “Add Media” button so you could insert images, videos, audio in the Text Widget easily.

Shortcodes in Text Widget

WordPress now parses shortcodes, and makes them work in a widget.

 

WordPress Tips

How to get Vimeo Client Identifier and Client Secret

November 7, 2017

Follow below steps to get your Vimeo Client Identifier and Client Secret:

Step 1: If you don’t have an account on Vimeo, self-create a new Vimeo account at https://vimeo.com/join

Vimeo Login

Step 2: Go to https://developer.vimeo.com/apps/ and login.

Vimeo Developer Dashboard

Step 3: If you have already created an app then follow the procedure from Step 5, else follow step 4 to create a new appVimeo Creat App

Step 4: Provide the required info, check I agree checkbox and click on Create App button.Vimeo Create App Fill Field

Step 5: Click on Authenticate tabVimeo Create App Authenticate

Step 6: Click on Generate Token buttonVimeo Generate Token

Step 7: Copy Client Identifier and Client Secret Vimeo Client Identifier and Client Secret

 

Well Done. You can use your Client Identifier and Client Secret in some WordPress Plugins use Vimeo API

WordPress Tips

How to Change Default Post Format in WordPress

November 1, 2017

What is WordPress Post Formats?

Since version 3.1, WordPress has a theme feature called Post Formats, which is a piece of meta information that can be used by a theme to customize its presentation of a post. Post formats is an optional value which would allows developers to define visual representation of a post.

WordPress has a total of 10 post formats, which are :

  • Standard – The default post format
  • Aside – A note like post, usually styled without title.
  • Gallery – A gallery of images.
  • Link – A link to another site.
  • Image – An image or photograph
  • Quote – A quotation.
  • Status – Twitter like short status update
  • Video – A post containing video
  • Audio – An audio file.
  • Chat – A chat transcript

However, not every theme supports all of these formats and some themes or plugins have features or template only for some specific post formats.

How to change default Post Format?

For example, VideoPro is a video-based WordPress theme, so it would use the Video post format mostly, then you will need to select Post format option everytime you want to add a new video post.

In fact, WordPress also give us a Setting to set default Post format for Post, which would save you a lot of time if you usually use another post format not Standard.

Just simply follow these steps (for more details, please find the screenshot below) :

  1. Go to Settings > Writing.
  2. In Writing Settings page, you will find Default Post Format section.
  3. Select the post format that you want to be default.
  4. Save Changes.

Then here you are, you will no longer need to select post format for posts every time you want to create one.