Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #184021

    Team Kriesi has done a great job building the breadcrumb script, I read about the origins of this way back in 2008.

    There are situations where it would be desirable to be able to designate a parent breadcrumb to a page which may not have any hierarchy. Based on previous posts regarding breadcrumbs I think this could be useful for many Kriesi theme owners.

    I have figured out the process to do this, however I have not found the exact location to set the parent post ID in enfold/framework/php/class-breadcrumb.php

    I’m using advance custom fields to optionally assign a parent breadcrumb post ID – ‘parent_breadcrumb_postid’

    This field can then be used to assign a parent breadcrumb in enfold/framework/php/class-breadcrumb.php

    <?php
     
    if(get_field('parent_breadcrumb_postid'))
    {
    	$post_id = get_field('parent_breadcrumb_postid');
    }
     
    ?>

    Should the above code for retrieving the parent_breadcrumb_postid (if assigned) be placed in the class-breadcrumb.php file before the function starting line 521 function avia_breadcrumbs_get_parents( $post_id = ”, $path = ” )

    Thank you Team Kriesi for providing outstanding support for the best wordpress theme … Enfold

    #184950

    Hi ttem!

    I think that could be done with JavaScript, you want this in one page only or many of them?

    Regards,
    Josue

    #184961

    Hola Josue gracias para ayuda!

    Yes for many. To be able to assign a breadcrumb hierarchy to a page which doesn’t have one clear parent or category. Example:

    http://www.example.com/orphan-page
    would normally have this breadcrumb
    Home > Orphan Page

    and the intent is to have this:
    Home > Assigned ‘Parent’ Page > Orphan Page

    Thank you for your assistance!

    #185888

    Hello,

    I understand what you want, but unfortunately that is out of the scope of the support we can offer. If you really need it try hiring a freelancer for the job.

    Best regards,
    Josue

    #186006

    Ok thanks I will try to figure it out. Based on what I described do you think the method I’m proposing should work? – assigning a parent postid in class-breadcrumb.php ?

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘How to manually assign a 'parent' breadcrumb to a page’ is closed to new replies.