Apr 8 09:50
I am sorry, I was on vacation the last week. We still weren't able to fix the problem. But it happened, that the sub categories should be resolved at all.... lol
So problem fixed for now, but yeah, still not getting the real reason...
Mar 26 19:59
Just in case he cannot find an issue: what would you recommend with the last point? Going back to the count you initially provided (which I thought it would solve my problem in the beginning)?
Mar 26 19:55
@VonC, thanks 🙏🏻 I have forwarded your ideas to the colleague who has access to the database.
Mar 25 13:29
All caches cleared, no changes ... It's enough to make you tear your hair out
Mar 25 07:57
Hi @VonC, thank you for all of the ideas above. Yes, there was a non-unique slug before, due to the migration of content from different sites. I have changed it later, but maybe this is still an issue. Renaming categories and slugs does not help at the moment (as the category cannot remain as "TestA", but must be "A").
From you experience: do you know a plugin that could help clearing the (server-side) cache?
Mar 24 14:57
PS, @VonC, what I still don't understand is the fact, that the function (even the original one) is counting correctly as soon as I rename the problematic categories, e.g. from "A" to "TestA" and "B" to "TestB".
Mar 23 10:07
Morning!
I tested your code, but it still displays the wrong amount of posts. And even with the EXCLUDE information added, it displays now ALL off the categories, even the sub cats and the main cats, that I wanted to hide from the list.
It's difficult... :-/
Mar 22 16:40
PS: assigning the posts only to one category is not an option as I need to filter them and can't use tags for this. i also need a category overview for the sub cats
Mar 22 16:37
Hi @VonC ! Thank you for your offer to help.... I really appreciate this, as I am really frustrated meanwhile.... t looked as if we had the solution!

The generated code was as follows:

function get_all_category_post_counts() {
$category_args = [
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 0,
'post_status' => 'publish',
'pad_counts' => true,
];

$categories = get_categories($category_args);
$category_post_counts = [];

foreach ($categories as $category) {
// Only count posts for parent categories
Mar 22 16:15
it's crazy: as long as I am only displaying the count, it's all fine. When I start adding cat name and id to the output, the code somehow changes and the result is wrong again :-(
Mar 22 16:15
Will do, as soon as I've fixed the latest issues
Mar 22 16:15
I was able to ask CoPilot for a comparison between my old code and yours. He explained the differences and re-wrote your code by using WP's built-in functions. And it works like a charm!! So, your code did the trick and opened the door, saved my weekend... whatever :-D Thank you very much for your help, I would not have been able to solve it alone (or with CP alone... ;-))
Mar 22 16:15
Ahhhh, with this approach I see the correct amount of posts for the first time! "Category ID 70 has 204 posts." Yeah! But... isn't it of a risk to use the code like this on a public site? Why was the initial approach not working, what's the difference here?
Mar 22 16:15
I was able to combine the two codes. Anyway, your code results in a count of 184 posts. As before. No difference :-(
Mar 22 16:15
Hi VonC Thank you for your idea. I need to have a function that gets the amount of posts in ALL categories, not only the "buggy one". How do I adjust your code?
 
Jan 11, 2021 07:18
And for you! Thanks again and stay healthy!
Jan 8, 2021 15:46
I just had another look and did only one additional change to your code.
I have removed the line
align-self: flex-start;
for the smaller screens. Just left the padding-top in there.

Codepen is updated. For me it does look good (until the screen is down to around 230px height, but.... who has such a small screen??)

If you do see any problem with the new code I am happy to receive your note.
Meanwhile HAVE A GOOD WEEKEND and thanks again for your time!
You definitly had the right idea!
Jan 8, 2021 10:54
Sure, no hurry! I will be off for my lunch break in a few minutes anyway
Jan 8, 2021 10:32
just added that line before you answered :-)

"But still ... the position of the content is not always correct when resizing the browser window. At some point the content is right below the hero. To be seen in the given sample above"

If this is somehow to be fixed the solution would be perfect!
Jan 8, 2021 10:20
that should not happen
Jan 8, 2021 10:20
no
Jan 8, 2021 10:17
But still ... the position of the content is not always correct when resizing the browser window. At some point the content is right below the hero. To be seen in the given sample above
Jan 8, 2021 10:16
ah, just changed z-index from 1 to -1 and that problem is fixed
Jan 8, 2021 10:12
Salut koder! Once again, thank you for the time taken to find a better solution for my problem.

Your sample looks good. But now I have tried to set up another sample with the elements like before. And as soon as I include the background image (with: position: fixed) the content dissapears. Any idea why this is happening? In the dev console I can see the content is there. Just not visible. No idea what I am overseing...

https://codepen.io/SchweizerSchoggi/pen/WNGKrJO
Jan 8, 2021 08:56
Morning @koder613 ! Well yeah, this is pretty close to what I would like to achieve. When resizing the window the hero is not always placed on the bottom of the viewport (there sometimes are a few pixels offset) but in general that looks like a really promising idea! Have to check with a real data sample. What I don't understand: why is the height of the hero-container only 98vh ?
Jan 8, 2021 08:56
That's exactly what I need to achieve. Or let's say: it's done. But the absolute position of the below content and footer is causing some headaches...
Jan 8, 2021 08:56
...that's why I would love to find another solution
 
Feb 26, 2015 08:33
ok, I'm having a conf call in a few minutes so I say bye for now. Have a great day!
Feb 26, 2015 08:27
lol :-D
Yeah, I have to think about the cockpit thing. Maybe I remove the curved border on the left and add a fade out or something like that..
Feb 26, 2015 08:17
Do you agree it looks more like a rocket? :-D
Feb 26, 2015 08:17
It's me who has to thank you
Feb 26, 2015 07:50
My plane looks more like a rocket right now... :-D
Feb 26, 2015 07:47
I really like the wings now. But I have to find a nice solution for the plane front (cockpit)
Feb 26, 2015 07:42
Giacomo, good morning! Thx again for your great help yesterday! I think I will currently use a combination of both answers (yours and the one from wf4).
http://jsfiddle.net/SchweizerSchoggi/0Lu4vspq/20/
Feb 25, 2015 18:00
@GiacomoAlessandroni: these wings look awesome! Unfortunatly it is not cross browser compatible. e.g. does not work in IE11 :-/ And regarding the positioning: I cannot use PHP in this project. EDIT: OK, I see.. you just forgot the standard definition in there. I have added transform: skew(20deg); and it looks nice everywhere. New version here: jsfiddle.net/SchweizerSchoggi/0Lu4vspq/15
Feb 25, 2015 18:00
@GiacomoAlessandroni: Aside from the positioning problem, it would stilll be interesting how these rectangles could look more like a wing?
Feb 25, 2015 18:00
The idea itself is not that bad. I just have to think about how I can position the wings dynamicly. I get the position of the wings from a datebase and currently write it down into a tablerow. So I know that seat 5 or 34 or eg.. is above the wings.