Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP: How To Add Breadcrumb On My Site
#1
Hello guys.
Please I need help on how to add breadcrumb To my WordPress site. To be more precise I need exactly this type on https://www.civilenggnotes.in/ . I have attach the screenshot below..

I need a code that I can add to my single.php to give exactly that or something similar and stylish.

@Dealwap, @deelino


Attached Files Thumbnail(s)
   
I am a proud member of NIgerian Coders Team
#2
Okaay, @samspon_soil 

Add this to your function.php
PHP Code:
/**
 * Generate breadcrumbs
 */
function get_breadcrumb() {
 
   echo '<a href="'.home_url().'" rel="nofollow">Home</a>';
 
   if (is_category() || is_single()) {
 
       echo "&nbsp;&nbsp;»&nbsp;&nbsp;";
 
       the_category(' &bull; ');
 
           if (is_single()) {
 
               echo " &nbsp;&nbsp;»&nbsp;&nbsp; ";
 
               the_title();
 
           }
 
   } elseif (is_page()) {
 
       echo "&nbsp;&nbsp;»&nbsp;&nbsp;";
 
       echo the_title();
 
   } elseif (is_search()) {
 
       echo "&nbsp;&nbsp;»&nbsp;&nbsp;Search Results for... ";
 
       echo '"<em>';
 
       echo the_search_query();
 
       echo '</em>"';
 
   }





Now add the style below to your header.php or you can remove the style tag and paste the code in your styles.css
PHP Code:
<style>
.
breadcrumb-samspon {
 
   border-styleinset;
 
   border-width2px;
 
   border-colorred green blue rgb(2552550);
}

</
style


Add the code below to your single.php
PHP Code:
<div class="breadcrumb-samspon"><?php get_breadcrumb(); ?></div> 


Drop feedback if it works
[-] The following 1 user Likes Deelino's post:
  • Hackinubee
Reply
#3
Nice tutorial, thanks for sharing.
Reply
#4
It works perfectly well, but from the screenshot, the 'HOME' and 'OTHERS' are red color, mine is black color, how can I make mine green in color..
@deelino

Thanks..
I am a proud member of NIgerian Coders Team
Reply
#5
(10-28-2019, 02:37 PM)Sampson_soil Wrote:
It works perfectly well, but from the screenshot, the 'HOME' and 'OTHERS' are red color, mine is black color, how can I make mine green in color..
@deelino

Thanks..


That means you will create a add a new link css

.breadcrumb-samspon a {
color: green;
}
[-] The following 1 user Likes Deelino's post:
  • Hackinubee
Reply
#6
(11-01-2019, 01:19 PM)Deelino Wrote:
That means you will create a add a new link css

.breadcrumb-samspon a {
color: green;
}

Thank you so much.
It works fine, just exactly what I needed.
I am a proud member of NIgerian Coders Team
[-] The following 1 user Likes Sampson_soil's post:
  • Deelino
Reply
#7
(11-02-2019, 04:11 AM)Sampson_soil Wrote:
Thank you so much.
It works fine, just exactly what I needed.


You welcome
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  HELP: How To Allow Users Create Posts In A Site Using Php Aaron 18 1,140 08-22-2017, 06:47 AM
Last Post: Hackinubee
  TUTORIAL: How Can Sum1 Create A Wap Builder Site Like Wapka, Xtgem, Wapact Etc Olawole Steven 0 364 08-19-2017, 08:58 PM
Last Post: Olawole Steven
  HELP: How To Send Mail From A Php Site Temitope Emmanuel 2 459 12-05-2016, 02:05 PM
Last Post: dealwap



Users browsing this thread: 1 Guest(s)

About Nigeria's Creative Talents

Nigeria's Creative Talents is an online community where every creative Nigerians can share ideas with themselves.

For any more information, please use our contact form.

              User Links

              Advertise