Zax
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pagesThat’s what I hinted in one of my previous posts here that it wouldn’t make sense adding hero related arguments to header action but you said that you would be adding it anyway.
Either way, thanks for suggestion, that’s what I was using for a while now.
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pagesThanks for adding
$typeargument toblocksy:hero:after(andblocksy:hero:before) in latest update. Unfortunatelyblocksy:header:afterdoesn’t seem to be covered by this change, is it still planned?Forum: Themes and Templates
In reply to: [Blocksy] Footer contact info icons disapearedWow, sorry I was checking all posts on first page during the last few days, no idea how I could’ve missed it. Feel free to mark it as resolved.
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pagesI understood that the HEADER action wouldn’t be called when HERO is disabled but if its not the case then its fine.
I don’t call the hero action when hero is disabled, although from what see in code the title with meta is considered “hero” internally, so type-1 is “disabled” and type-2 enabled, its never truly disabled? Sorry to bother you with these questions.
Any ETA when we can expect next update? Weeks, days, month?
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pagesSo both
blocksy:header:afterandblocksy:hero:afterwill have hero-type passed as argument? Out of curiosity, whyblocksy:header:after(header) wouldn’t be called when hero is disabled? Can hero be even disabled or type-1 means disabled (visually)?—
PS. About default values, what I meant is that the default values are usually hardcoded or read from settings (in programming in general) so you, as the framework author have the access to these values but I don’t. I would be guessing what hero-type is default for what page because I have no means to access that data, other than reading your code and hardcoding these values myself.
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pages1. I checked the result of
blocksy_get_page_title_sourceand it wasn’t null, at least for search and blog pages. These are some returned values (it returns customizer even though I wasn’t in customizer, not sure if intended):customizer,single_page customizer,single_blog_post customizer,blog customizer,search customizer,categoriesThe last 3 page types (blog, search, categories) returned NULL hero-type. All examples returned the correct hero-type in customizer. The page title was enabled for all of them, disabling page title makes it return NULL everywhere even in customizer.
2. I can’t rely on default return value here because it would be pure guessing (I can’t predict if some random blog post wasn’t set to different type) – correct me if I’m wrong please.
I need some reliable method that works with unique pages, blog, search, archive etc. All my test results were with page titles enabled BUT I plan to have title disabled for some random pages, is there no way to get the correct result if “page title is disabled”?
3. Hero type as an argument to the
blocksy:hero:afteraction could work but I’m also usingblocksy:header:afterand it wouldn’t make sense adding hero-type to some unrelated header action/event?add_action('blocksy:header:after', 'add_content_after_header', 20); function add_content_after_header() { $type = blocksy_akg_or_customizer('hero_section', blocksy_get_page_title_source()); if ($type == 'type-1') { $breadcrumbs_builder = new Blocksy_Breadcrumbs_Builder(); echo $breadcrumbs_builder->render(); } } add_action('blocksy:hero:after', 'add_content_after_hero', 20); function add_content_after_hero() { $type = blocksy_akg_or_customizer('hero_section', blocksy_get_page_title_source()); if ($type == 'type-2') { $breadcrumbs_builder = new Blocksy_Breadcrumbs_Builder(); echo $breadcrumbs_builder->render(); } }If page name is inaccessible by other means (with page title is disabled), perhaps adding page-title as additional argument for some events would make more sense?
Forum: Themes and Templates
In reply to: [Blocksy] Function returns NULL type for blog/search pagesDone but no answer yet, so can’t say if its bug or something on my end.
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs below hero section using hooksExactly what I needed, thanks! Added padding-top: 20px and it looks good now.
I modified the code snippet from my first post to only work on type-2 style:
add_action('blocksy:hero:after', 'add_content_after_hero', 20); function add_content_after_hero() { $type = blocksy_akg_or_customizer('hero_section', blocksy_get_page_title_source()); if ($type == 'type-2') { $breadcrumbs_builder = new Blocksy_Breadcrumbs_Builder(); echo $breadcrumbs_builder->render(); } }Wondering if it wouldn’t be better to generate breadcrumbs for type-1 separately on different action/event? blocksy:head:end ? Not sure how it would work with sticky header though.
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs below hero section using hooksUnfortunately its hosted locally so can’t post the link but generally I’m trying to achieve breadcrumbs placed in this position: https://imgur.com/a/yI8Jav2 – it seems to be the most popular breadcrumbs placement on most pages today(?)
blocksy:hero:after – places them exactly here but all the way left (full width)
blocksy:single:top – good but its same row as sidebar not above
blocksy:content:before – its before the hero section, so nopeForum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs below hero section using hooksHey, this isn’t “blocks hooking” feature available in pro version. I’m just hooking manually with code snippets by registering to actions. 🙂
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs below hero section using hooksI forgot to mention that I’m using style 2 of hero section (with featured image as background and transparent header. So with “blocksy:content:before” it goes on top of whole page, behind the header.
What I’ve tried so far is:
- blocksy:single:top
blocksy:single:content:top - blocksy:hero:after
both place it on top of page text but it doesn’t go above left sidebar.
this is just below hero but uses the width of hero which is full page in style 2 and I need it to be the same width as ct-container.
Any suggestions?
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs shows wrong page nameYes thanks, its fixed in latest update.
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs shows wrong page nameI noticed that it happens only on main BLOG page, nested Breadcrumbs on each individual posts has the correct custom blog page name, ie: Home > News > Post
I fixed this issue with this code snippet:
add_filter( 'blocksy:breadcrumbs:items-array', function ($items) { if (blocksy_is_page()) { $items[1]['name'] = get_queried_object()->post_title; return $items; } return $items; } );- This reply was modified 3 years, 9 months ago by Zax.
Forum: Themes and Templates
In reply to: [Blocksy] Breadcrumbs shows wrong page nameThanks, I will most likely use your second answer as workaround (hopefully temporarily), but I think that its more of a bug than feature and should be passed to dev team for fixing.
For example switching to Breadcrumb NavXT engine detects the page name correctly, but I would rather not use additional dependencies.
- blocksy:single:top