wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog WordPress themes Related posts based on category video tutorial using Twenty Ten theme

WordPress themes

Related posts based on category video tutorial using Twenty Ten theme

Last updated on February 18, 2017
Posted on November 1, 2011

WordPress tutorial how to show Related posts based on category.

Last year, I have made a video tutorial how to display related posts under your blog post based on tags without plugin, two versions.

WordPress related posts for Twenty ten, or other themes, and related posts for Thesis.

Both of those videos did not create related posts based on category, but based on tags.

I have record this tutorial actually a very long time ago, but I forgot to write a post for it.

I usually made several videos all at once, and then plan to write tutorials of them, but I forgot this one.

So I thought I have to post it today, since this question has been asked very long time ago.

Related posts based on category tutorial idea.

One of my visitor asked me if we can actually display related posts based on category on wordpress.

Because I am also a newbie, so i did some Google researches, and try it myself in my wordpress local blog.

I found the functions code in wpengineer.com, and then applied with Twenty ten theme and it did work.

If you are using another wordpress theme, you can follow this tutorial as long as you have functions.php and single.php files.

To display where you want it to be displayed, you should check on what div you want it to show.

Related posts based on category screencast, and the steps.

Screenshot of the result from this tutorial

related post category
The result

Video:

Steps:

1. First of all, you can visit this page, http://wpengineer.com/1476/related-posts-on-category/ where the code is originally coming from.

I have to write a note, I have tried this with Thesis theme, it messed up my comment system.

Therefore, I suggest you to try first offline in a local wordpress installation, and once you are sure it works 100% with your theme, you can use it in your online blog.

2. We are using Twenty Ten theme in this tutorial, so paste this code or directly from wpengineer page, to your functions.php file. (see this screenshot, basically after “<?php” )

related posts based on category
Where to paste the code in functions php (right highlighted is the code)

3. After pasting it, we have to call this function in single.php file, where we want the theme to display these “related posts based on category” links.

I recommend you watch the video on this step, because instead of pasting echo fb_cat_related_posts();, we should paste echo fb_get_cat_related_posts(); as the correct one. (watch video for the explanation)

related post based on category
Missing "get" in the code

4. After saving the file, refresh your single post page, and you will see the list of the related posts based on category, watch the video for more clear step.

category post twenty ten

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← Hide All Text Above Twenty Eleven’s header
→ Twenty Eleven Menu Background Color WordPress Video

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • Twenty Nineteen theme tutorialTwenty Nineteen Theme Full Tutorial - Creating a Website
  • Twenty Seventeen One Page ParallaxTwenty Seventeen One Page Parallax Scrolling Website Style
  • Twenty Seventeen Proudly Powered By WordPress codeTwenty Seventeen Footer "Proudly Powered By WordPress" Text
  • Where your child theme folder should be located inside themesHow To Create WordPress Child Theme Manually or With Plugin
  • How to Remove Twenty Fourteen Author Name or Link
  • How I add thumbnails with Twenty Twelve theme
  • Change Default Green Color WP 2014 Theme
  • Showing Twenty Fourteen Thumbnail in A Smaller Size
  • How To Style WordPress Caption in WP Twenty Fourteen Child
  • Proudly Powered By WordPress Twenty Fourteen

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept