Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #207859

    For SEO purposes I named my blog with a longer name/title. The side effect to this is that my breadcrumb is long and the page title in the header next to the breadcrumb is long. I read your other post on this issue (http://www.kriesi.at/support/topic/changing-blog-name-only-in-breadcrumbs-of-enfold/), and I changed class-breadcrumb.php to

    
    /* If $show_home is set and we're not on the front page of the site, link to the home page. */
    if ( !is_front_page() && $show_home )
    	$trail[] = '<a href="' . home_url() . '" title="Blog" rel="home" class="trail-begin">' . $show_home . '</a>';
    

    And nothing changes. If possible, chaning this in functions PHP would be awesome- I just need to manually change the blog heading and breadcrumb name to “Blog” instead of what I have as the page title.

    Thanks for all of the help you guys are amazing.

    #208091

    That changed the home text to blog.

    You can see an example here: https://www.virginiaseo.org/blog/seo-email-scam-artist-hurt-your-reputation/

    The breadcrumb should read:

    You are here: Home / Blog / SEO Tips / Post Title

    Right now it is reading: Blog / Full Blog Title / SEO Tips / Post Title

    #208631

    Hey!

    You can try following code – insert it into the functions.php file.

    
    if(!function_exists('avia_modify_blog_breadcrumb'))
    {
        function avia_modify_blog_breadcrumb($trail)
        {
    
            foreach($trail as $key => $data)
            {
                    $search = 'SEO Tools to Equip Your Business – Blog';
                    if(strpos($data, $search) !== false)
                    {
                                      $data = str_replace($search, "Blog", $data);
                                      $trail[$key] = $data;
                    }
            }
            return $trail;
        }
    
        add_filter('avia_breadcrumbs_trail','avia_modify_blog_breadcrumb');
    }
    

    Regards,
    Peter

    #208741

    I see what you are trying to do, but it unfortunately does not work. I have put the code in and nothing is changed.

    #208856

    Hey!

    I’m trying to find a solution here and I’m so glad Dude provided one. Dude’s code works on my end. Please replace this line with the exact Blog title that you have:

    $search = 'SEO Tools to Equip Your Business – Blog';

    I have a page named “Blog” then I replace the breadcrumb trail to “Awesome Blog”. This is the result:

    Best regards,
    Ismael

    #210220

    Here is my code:

    
    // Change Breadcrumb
    
    if(!function_exists('avia_modify_blog_breadcrumb'))
    {
        function avia_modify_blog_breadcrumb($trail)
        {
    
            foreach($trail as $key => $data)
            {
                    $search = 'SEO Tools to Equip Your Business – Blog';
                    if(strpos($data, $search) !== false)
                    {
                                      $data = str_replace($search, "Blog", $data);
                                      $trail[$key] = $data;
                    }
            }
            return $trail;
        }
    
        add_filter('avia_breadcrumbs_trail','avia_modify_blog_breadcrumb');
    }
    

    And here is my unchanged blog title. Not sure what is going on here…

    http://cl.ly/image/1g3z2s1k3V1L

    I of course dumped all my cache and stuff. I dont know if it matter but the class of my span is trail-end, while the PHP looks like it calls for trail.

    #211523

    Hi!

    Where in your functions.php file did you add the new filter? If its at the top, put it at the bottom and if at the bottom put it at the top.

    Best regards,
    Devin

    #211630

    I moved it from the bottom to the top. No dice, no change.

    Any more ideas? I don’t mind a core hack if that is what is needed to make this work.

    #211776

    Hi!

    Do you have a cache plugin? Please flush the settings after you added the code above, see if that works. If not, please post the login details here. Set it as a private reply.

    Best regards,
    Ismael

    #211878
    This reply has been marked as private.
    #212167

    Hey!

    It works now – I had to replace the dash ( – ) with & #8211;

    Regards,
    Peter

    #212316

    Awesome thank you very much!!!!

    I have one more question. I have changed the blog a bit- it was set in theme options to a page, and this would not allow me to add content to it over the blog roll. So per your instructions on another post, I turned off the log page in theme options and instead set it up using the advanced editor, which let me also add a title.

    This has made the breadcrumb act funny. Perhaps you can explain what I need to do to fix it.

    Blog is root/blog
    Permalinks are set to custom /blog/
    Blog pages are coming up as root/blog/post which is what I want.

    One the blog page, the breadcrumb is set back to what it was before your hack from above. I am thinking this is because I changed the page from is_index to a single page. So, how can I now change this breadcrumb to also say Blog instead of the page title?

    Second, when I go to posts, the blog page is not in the breadcrumb. So instead of the breadcrumb being You Are Here: Home / Blog / Post it is reading You Are Here: Home / Post

    Is this something I can work with? I also read somewhere in here about having to fix my permalinks for some reason?

    • This reply was modified 2 months, 4 weeks ago by  Imburr. Reason: Further Questions
Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Rename Blog Title and Breadcrumb’ is closed to new replies.