How To Add Related Post In Carrington Mobile Theme Without Plugin

I will put you through on how to display related post in carrington mobile theme without using any plugin, most of us are addicted to using plugins for everything forgetting most of the cheap plugins we use daily can actually be written in just 5 lines of codes. 🙂

If you finding it difficult to install or how to use carrington mobile framework i have written a article about that, i have been seeing a lot of people looking for a way to add related post in carrington mobile theme easily in different forums.

Carrington mobile is built in a every easy way that don’t require deep knowledge to make use of this framework.

The small grid of related articles below a blog post has become widely used. It is so commonplace and effective that many online advertising platforms have modeled the display for their ad units.

Related post functionality is one place where I recommend you DON’T use a plugin. It is straightforward to hard-code a nice related post system.

Here is most of the commonly used carrington mobile themes online.

How To Add Related Post In Carrington Mobile Theme Without Plugin

You can perform this operation offline using your laptop or online from your cpanel.

This would require you logging into your cPanel > File manager so as to edit the core single.php file of your carrington theme.

  • Login to cPanel
  • Click Filemanger then follow the path public_html/your site/wp-content/themes/carrington-mobile-1.2 .or if you using it as only mobile theme then access it from /wp-content/plugins/carrington
  • In this directory, you’ll see all the theme files, right click on the single.php file and click on Edit.
  • Once the page loads to edit, Search using CTRL + F for “cfct_content();” without the quotes and in the line after the code paste the below code.
  •  ?>
    //for use in the loop, list 5 post titles related to first tag on current post
    $tags = wp_get_post_tags($post->ID);
    if ($tags) {
    echo 'Related Posts';
    $first_tag = $tags[0]->term_id;
    'tag__in' => array($first_tag),
    'post__not_in' => array($post->ID),
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
  • 4. Then Click on Save at the top right corner of the screen.

This is a safe method to add related post to your carrington mobile theme.

About Ayorinde Ayodeji

An Experienced web designer/designer and also a certified digital marketer and always love sharing useful information with people who are ready to learn. Am crazy about technology i don't mind having my own world.

View all posts by Ayorinde Ayodeji →

Leave a Reply

Your email address will not be published. Required fields are marked *