
-
AuthorPosts
-
January 3, 2023 at 9:17 am #1377436
I created a new wordpress site with enfold and imported the enfold settings from a identical page.
Afterwards I imported also all blog posts, media data and so on from the old page.
The problem is, that I always see a 404 error on all pages except homepage & blog (with postname under permalinks).
The funny thing is that it works with the simple permalink structure (*****/?p=123).I already tried everything but it did not worked and now I have no more ideas.
I am a senior frontend developer and have already implemented dozens of pages with enfold but I don’t know what to do here.
See private content for further informations.
Thanks in advance.
-
This topic was modified 2 years, 3 months ago by
wwwdesignquartierde. Reason: remove url
January 3, 2023 at 1:57 pm #1377461Hey Markus,
Thank you for the link to your site, I found that you have this custom code in your functions.php:function pix_only_last_week( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } $query->set( 'date_query', array( array( 'after' => '12 months ago' ) ) ); return $query; } add_action( 'pre_get_posts', 'pix_only_last_week' );
I disabled it and now your pages show correctly, please clear your browser cache and check.
Best regards,
MikeJanuary 3, 2023 at 2:06 pm #1377464@Mike: Now it works, crazy. I was pretty sure that I tried it also to empty the functions.php for the child theme.
Awesome. Thank you so much and happy/healthy new year 2023 :).
P.s.: Is there any other solution to show only the blogposts from the last 12 months?
-
This reply was modified 2 years, 3 months ago by
wwwdesignquartierde.
January 3, 2023 at 2:38 pm #1377467Hi,
Glad to hear this helped, I don’t know of another solution without causing similar issues. Typically the entries are sorted by date, I see your blog page shows 10 posts and then pagination, try showing 12 posts and no pagination, assuming that you make one post a month, this will show a rolling year of posts.
You can set the number of posts at WordPress ▸ Settings ▸ Reading Settings to the number 12, and use this css to hide the pagination with this css:#top.blog .bloglist-excerpt .pagination { display: none; }
After applying the css, please clear your browser cache and check.
Best regards,
Mike -
This topic was modified 2 years, 3 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.