-
AuthorPosts
-
July 26, 2017 at 7:33 pm #830314
Hi,
I cannot figure out where the Default Archive (archive.php) gets the parent page for the breadcrumbs string.
In my Environment it seemst to me that it takes “any” page, it finds first. At the Moment this is an drafted
page!I read some of your comments about the Default blog and so on, but no of your Support threats fits for my Problem.
Hopefully you can tell me the (theme?) function, where the parent page is set to the Default blog page Archives.php.
Thank you,
Regards,
MichaelJuly 30, 2017 at 3:52 am #831652Hey zwachm,
Have you set the blog page as blog on Enfold > Theme Options > Where do you want to display blog? option.
This sets the the breadcrumbs stringBest regards,
MikeJuly 30, 2017 at 10:11 am #831769Hi,
yes, I have already tried to change this setting. But this will not remove the entry “Homepage ÖBFV – Duplikat”,
which has status “DRAFT”.Breadcrumbs with active Blog set to page “Aktuelle beim ÖBFV”:
Sie befinden sich hier: Startseite/Aktuelles beim ÖBFV/Homepage ÖBFV – Duplikat/2017/JuliBreadcrumbs without any Setting at Enfolg-Blog page (“select page”):
Sie befinden sich hier: Startseite/Homepage ÖBFV – Duplikat/2017/JuliRegards,
MichaelJuly 30, 2017 at 2:54 pm #831826Hi,
Try disabling your plugins. If that resolves the issue, reactivate each one individually until you find the cause.
Can you please include a admin login in the private content area so we can take a closer look.Best regards,
MikeJuly 31, 2017 at 7:49 am #831983Hi,
ok, I have disabled all plugins and the issue keeps there.In the meantime I digged into the enfold theme code and found this:
in the function avia_breadcrumbs_get_parents( $post_id = ”, $path = ” ) {
the wordpress function get_page_by_path( $path )The Problem seems to be, that the function get_page_by_path does not evaluate the post_status and Returns also pages in status draft.
So I have added this if case further down in function avia_breadcrumbs_get_parents:
if ($page->post_status != ‘draft’)
{
/* Add the formatted post link to the array of parents. */
$parents[] = ‘‘ . get_the_title( $post_id ) . ‘‘;
}Do you think that this is the right solution for my Problem. It seems to get rid of pages in Status DRAFT in my breadcrumbs.
Regards,
Michael- This reply was modified 7 years, 3 months ago by zwachm.
August 3, 2017 at 8:54 pm #834002Hi,
That is a proper solution yes, but the drafts are not visible on users – so even if you fix it like that, it is only for your eyes noone else will be checking the drafts.
Breadcrumbs so the title, and the title does include the word Draft inside, that is wy you do see it.Best regards,
BasilisAugust 3, 2017 at 9:16 pm #834022Hi Basilis,
thank you for your answer.
The guest user (not logged in) CAN SEE the page within the breadcrumbs. But if he clicks on it it Fails (of Course).
Exactly this was my Problem…Regards,
MichaelAugust 8, 2017 at 8:55 pm #836047Hi,
That would need some changes – but as long as it is draft I think you need to enable if it is visible generally or only with link share.
Best regards,
BasilisAugust 8, 2017 at 9:30 pm #836056Hi,
sorry, but I don’t understand your answer.
The Problem is, that the Code generates breadcrumbs, which includes a (random?) page which is in Status DRAFT.There are two questions for me:
– why such a page is selected at all in the breadcrumbs for the blog?
– and: why a page in DRAFT Status is selectedHopefully you can see my issues now?
Thank’s a lot!
Regards,
MichaelAugust 13, 2017 at 7:55 pm #838313Hi,
That happening because the Draft is visible for the logged in users, so you can see those posts, because you are either logged as admin
or you created that post. So they are there.if you want to remove them, you would have to edit the function of breadcrumps to remove them from the loop.
Best regards,
BasilisAugust 13, 2017 at 9:59 pm #838349Hi Basilis,
thank you for replay.
Maybe you can read my comment from Aug, 3rd again:The guest user (not logged in) CAN SEE the page within the breadcrumbs. But if he clicks on it it Fails (of Course).
Exactly this was my ProblemSo a not logged in user can see this (any by random?) page, which is in draft Status.
So my two questions still remain not answered:
– why such a page is selected at all in the breadcrumbs for the blog?
– and: why a page in DRAFT Status is selectedI think you still have the Login and can test it?!
Regards,
MichaelAugust 16, 2017 at 6:46 am #839711Hi,
I drafted a page and accessed it while logged out. The breadcrumb shows the “404 Not Found” text. Could you please re-create the issue so that we can inspect it? The previous page is already published.
Best regards,
IsmaelAugust 16, 2017 at 8:23 pm #840069Hi,
you cannot see the fault, since my wokaround was active.
I disabled my code-Change!Regards,
MichaelAugust 17, 2017 at 7:48 am #840278Hi,
I’m sorry but I’m getting a bit confused here. Did you remove the page “Homepage ÖBFV – Duplikat”? I can’t find it anywhere in the Pages panel. What is the “xxxx” page for?
Best regards,
IsmaelAugust 17, 2017 at 1:56 pm #840374Hi,
maybe I did remove the page, I was not Aware, that it was for your test!
The xxxx page is a random? selected page, chosen by your enfold code to generate the breadcrumbs.As mentioned a few times, I don’t know why this page is selected as “path” for the breadcrumbs and why the post Status is also not evaluated to prohibit pages in the breadcrumbs in Status DRAFT.
Hopefully I was able to clarify some bits?
Regards,
MichaelAugust 21, 2017 at 5:47 am #841841Hi,
The “wp-admin” page has been disabled. This is the notification in the login page.
This has been disabled
Best regards,
IsmaelAugust 23, 2017 at 10:17 pm #843305Sorry, hopefully you can get me now more Information!
Regards,
MichaelAugust 24, 2017 at 1:24 pm #843471Hi,
Thank you for the update.
We’d like to try this filter in the functions.php file but the “Update” button in the Appearance > Editor panel is disabled. Please add this code in the functions.php file.
add_filter('avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 100, 1); function avia_breadcrumbs_trail_mod( $trail ) { if( is_archive() ) { unset( $trail[1] ); } return $trail; }
Best regards,
IsmaelAugust 25, 2017 at 5:46 pm #844078Hi Ismael,
thank you very much for the Code. This solves my Problem ;-)
Regards,
MichaelAugust 26, 2017 at 7:18 am #844303 -
AuthorPosts
- You must be logged in to reply to this topic.