Support » Theme: Rambo » Display Category Below Post Title

  • Resolved sarkarijankari

    (@sarkarijankari)


    I want to display category with hyperlink below post tile just after Date, leave a Comment and Author

    :For example – Sep 20,2017 Leave a comment By Amit Pathania In “Category”

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • First of all, I hope you have created a child theme already. If you haven’t here is how to <a href="https://codex.wordpress.org/Child_Themes" rel="noopener" target="_blank">Create a Child Theme</a>.

    WordPress by default uses a file called page.php for displaying page contents for homepage, front page and post pages. To display category hyperlink you need to use built in WordPress function the_category(). This will display the category name/s associated with your post and create hyperlinks for each so that users can click on a category to go to another page with list of posts which are under that category.

    According to WordPress template hierarchy, post detail page can use a file called single.php which you can modify according to your requirement without hampering home page or front page layouts. Good news is Rambo already provides a separate single.php for you!

    So I recommend you to copy single.php from Rambo’s original theme folder inside your child theme folder. Then after line number 20, add the following code: <?php the_author();?>. That’s it! You should be able to see the categories coming up with links to their respective pages.

    Remember, the categories will come up as list items by default. So you need to make adjustments in your CSS in order to make them inline with other elements.

    Let me know if this helps!

    Hi @sarkarijankari

    Another more easy solution as follows:

    1) First simply, you need to create the child theme of Rambo via Plugin( Orbisius Child Theme Creator )
    or you can download it from link: https://wordpress.org/plugins/orbisius-child-theme-creator/

    2) Afer plugin activated successfully, you need to go through your admin panel: Apperance->Orbisius Child Theme Creator
    and create child theme of RAMBO theme via click on ‘Create Child Theme’ button .

    3) You will see a new folder created as rambo child theme in your theme directory .

    4) In your new child theme directory, you have to simple create a file with name single.php (file extension should be in .php).
    Open the file and paste the code from the fallowing link: https://pastebin.com/7qwVGvWg

    5) Now visit the customize section as fallows:
    a) Open your customize section from your admin panel: Appearance->customize.
    b) Then, select Header settings->Custom CSS from Left sidebar.
    c) Copy and paste the following code in custom css field :

    <!–start–>
    .cat-links a {
    padding: 5px 0px 5px 0px;
    }
    <!–end–>
    d) Finally, click on “Save & Publish” button above to save the changes.

    6) Now, need to activate your new rambo child theme to see the results.

    Regards
    Imraj khan

    Hi @sarkarijankari

    Let me know if the above solution has worked for your query or not.

    Regards
    Imraj khan

    Theme Author webriti

    (@priyanshumittal)

    I am closing this ticket since there is no activity from past 1 month.

    You can always reopen the ticket if the above solutions did not work.

    Regards
    Priyanshu

    Tickets Closed!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Category Below Post Title’ is closed to new replies.