Filter posts by Alphabets in wordpress

Once again, we are continue going to filter the posts. This time we will “Filter posts by Alphabets in wordpress”. As we hve discussed about filter many times in the previous posts so we will directly starts with the tutorial. To filter the posts by alphabets in wordpress, follow these simple steps:

Step 1:

Add the following code where you want to show the filtered data. You can make a template for that or you can show that data on homepage of your website. Lets make  template with name say “dcs_filter_alphabets.php”

Step 2:

Our template is ready with the UI. Now we will go ahead toward the jquery and ajax work so that we can call the ajax function to do some filtration so that we can Filter posts by Alphabets. Copy and paste the following code into your footer.php file.

Note: we have used the document.ready function two times so that you guys can understand that we can use this function as many times as we want inside a single file or template.

Step 3:

As we had called  function in our jquery code to Filter posts by Alphabets, so now we have to define that function inside function.php file:

Continue to filter posts by Alphabets

Step 4:

Till now, we are ready with all the functionality. We have to just give the following styles in the last.

Note: Remove the <style> tag if you are adding this style to the .css file.

Filter posts by Alphabets

The above mentioned post was made for the developers of wordpress who want to filter posts by Alphabets in wordPress. You can find other posts from the sidebar or find some useful wordpress codes here