• Hi,

    I am trying to make the header.php of an Astra’s child theme installed on my website to accept the following code:

    <div class=”breadcrumbs” typeof=”BreadcrumbList” vocab=”https://schema.org/”&gt;
    <?php if(function_exists(‘bcn_display’))
    {
    bcn_display();
    }?>
    </div>

    It is refuses to accept the code.
    See screenshot: https://postimg.cc/CZcWmTcD

    What is causing this and how can it be resolved?

    Kind regards,

    Yunis

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author John Havlik

    (@mtekk)

    Try splitting the code out to multiple lines, at first glance the code looks correct. So, my guess is the issue the parser in the theme editor. For reference, below is the exact code I use for calling the breadcrumb trail on my site:

    <div class="breadcrumbs" vocab="https://schema.org/" typeof="BreadcrumbList">
    	<?php
    		if(function_exists('bcn_display'))
    		{
    			bcn_display();
    		}
    	?>
    </div>
    Thread Starter Yunis777

    (@yunis777)

    Hi,

    Thanks, it worked.

    Is there a way to display the breadcrumb under the page title instead of above it?
    Also, is there a way to hide the breadcrumb on the homepage?

    Kind regards,

    Yunis

    • This reply was modified 5 years, 9 months ago by Yunis777.
    Thread Starter Yunis777

    (@yunis777)

    Hi,

    There is still a remaining issue. In the breadcrumb, there is an unexpected “search” link added to the breadcrumb after clicking to the next page of a post.
    When I click on the “nice software component” on the following page, the breadcrumb doesn’t show ” Druzal.com > Reviews > Review: nice software component”, it shows ” Druzal.com > Search > Reviews > Review: nice software component”
    See screenshots:
    https://postimg.cc/YGGWw0JQ
    https://postimg.cc/PCR95FCY

    How do I get rid of the unwanted “search” link of the breadcrumb?

    Kind regards,

    Yunis

    Plugin Author John Havlik

    (@mtekk)

    Can you post the markup generated by Breadcrumb NavXT on that page (a picture or pastebin or something)?

    Thread Starter Yunis777

    (@yunis777)

    Hi,

    The following are 4 screenshots of the Breadcrumb NavXT dashboard settings:
    https://postimg.cc/gn7X4HLs
    https://postimg.cc/nC3Jbn4c
    https://postimg.cc/Lq1bhDLb
    https://postimg.cc/Z9tm5CX4

    After clicking on the “nice software component” link on this page https://postimg.cc/MnTysGG0, the “search” link in the breadcrumb of this page needs to go: https://postimg.cc/mPtmPj7G

    How can it be resolved?

    Kind regards,

    Yunis

    • This reply was modified 5 years, 9 months ago by Yunis777.
    Plugin Author John Havlik

    (@mtekk)

    For the two pages pictured, it would really help to see the actual HTML generated by Breadcrumb NavXT for the breadcrumb trail.

    Thread Starter Yunis777

    (@yunis777)

    Hi,

    The HTML for the above pages are included in the text displays of the following links:

    https://pastebin.com/7jkw1hpY
    https://pastebin.com/FbR1kFdv

    Kind regards,

    Yunis

    Plugin Author John Havlik

    (@mtekk)

    So it looks like the “Search” page is set as the parent of “Reviews”. Having it show up only when “Reviews” is a root page, but not when on “Reviews” seems odds odd. My only guess as to why this happens when “Reviews” is added as a root page rather than just on that page is due to something messing with what is returned by get_post() for that post’s ID on that page (it has a parent that is “Search” on the one page and on the other it does not).

    Thread Starter Yunis777

    (@yunis777)

    Hi,

    Maybe you can tell me how:
    1. the white space between the breadcrumb and page title can be reduced on a small mobile screen?
    2. the white space between the breadcrumb and top blue bar can be reduced on a small mobile screen?
    3. the location of breadcrumb can be moved slightly to the left?

    See screenshots: https://postimg.cc/YGZwPfs4
    https://take.ms/oZEWq

    I have no experience with CSS language.

    Kind regards,

    Yunis

    • This reply was modified 5 years, 8 months ago by Yunis777.
    • This reply was modified 5 years, 8 months ago by Yunis777.
    • This reply was modified 5 years, 8 months ago by Yunis777.
    Plugin Author John Havlik

    (@mtekk)

    I suggesting using your web browser’s built in inspector tool to adjust the CSS styling on the breadcrumb trail. Once you get the desired styling, add your CSS modifications to your child theme’s style.css.

    For physically moving the breadcrumb trail, you can play with the padding or margin for the div surrounding the breadcrumbs. Targeting mobile screens requires media-queries. I suggest reading up on these (css-tricks is a good resource).

    @media srceen and (max-width:?px) {

    div.? {margin:?;padding:?;}/* or position:relative; top:?; left:? */
    }

    I can’t give a proper example because I have use PHP setting the position. That’s why the container div is for me unique. You apparently have used widget, and I don’t know the id of the container widget.
    max-width depends on the theme. My theme use mobile menu until 782px. For me the turning point is 782/783 but you apparently have another turning point. Look a the CSS file of the theme.

    • This reply was modified 5 years, 8 months ago by tapiohuuhaa.
    • This reply was modified 5 years, 8 months ago by tapiohuuhaa.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Child theme’s header.php refuses NavXT code code’ is closed to new replies.