-
AuthorPosts
-
March 1, 2018 at 4:31 pm #919732
Is there a Snippet I can use to move the date position to be above the post title when using the the Avia Blog element on a page?
thanks!March 1, 2018 at 9:50 pm #919956Hey jomo5280,
You can try 2 different solutions
One with CSSand one with some JS
https://kriesi.at/support/topic/move-date-below-title-in-magazine-element/Best regards,
BasilisMarch 1, 2018 at 9:59 pm #919972For my case – I need to move the date ABOVE the title in the avia blog element. Not the blog template page, but the avia blog element.
thanks!March 2, 2018 at 7:25 am #920119Hi,
Thanks for the feedback. Could you post a link to the site in question so that we can take a closer look please?
Best regards,
RikardMarch 3, 2021 at 12:24 am #1284893I would like to do the same thing. Can you please tell me how to move the date above the title in the avia blog element?
March 4, 2021 at 5:50 am #1285218Hi Dependable,
What Blog Style are you using?
If you’re using Grid Layout then please add this code in your child theme’s functions.php file:function move_post_meta(){ ?> <script> (function() { var gridposts = document.querySelectorAll('.avia-content-slider .slide-entry'); gridposts.forEach(function(el) { var header = el.querySelector('.entry-content-header'); var postMeta = el.querySelector('.slide-meta'); header.insertBefore(postMeta, header.childNodes[1]); }); })(); </script> <?php } add_action('wp_footer', 'move_post_meta');
Then go to Enfold > General Styling > Quick CSS, then add this CSS code:
#top .slide-content .slide-entry-title { margin-bottom: 0; padding-bottom: 0; } #top .slide-content .slide-meta { margin: 0; padding: 0; float: none; } #top .slide-content .blog-categories { top: 0 !important; margin-bottom: 12px; }
Let us know if this helps.
Best regards,
NikkoMarch 12, 2021 at 10:07 pm #1287886Hi there,
Using a custom blog page built with the avia layout builder. Here’s a link: https://loramchenry.com/i-must-be-a-mushroom/
I added the code you provided but it doesn’t seem to have done anything.
Thank you!
– Brad
March 13, 2021 at 12:37 pm #1287937Hi Brad,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoMarch 18, 2021 at 8:36 pm #1289048This reply has been marked as private.March 22, 2021 at 7:58 am #1289564Hi Dependable,
Thanks can you try to change the code I gave to this one:
function move_post_meta(){ ?> <script> (function() { var gridposts = document.querySelectorAll('.avia-content-slider .slide-entry'); gridposts.forEach(function(el) { var header = el.querySelector('.entry-content-header'); var postMeta = el.querySelector('.slide-meta'); header.insertBefore(postMeta, header.childNodes[0]); }); })(); </script> <?php } add_action('wp_footer', 'move_post_meta');
Best regards,
NikkoMarch 22, 2021 at 11:55 pm #1289737Hi Nikko,
This is the same code you provided above and it didn’t work.
-Brad
March 23, 2021 at 3:57 pm #1289924Hi Brad,
I tried to check on the PHP code (link) but it returns:
Sorry, you are not allowed to access this page.
Then I checked on the site and it seems it’s still using the old code. (screenshot in private content)
The new one has 0 inside it and not 1:header.insertBefore(postMeta, header.childNodes[0]);
Best regards,
Nikko- This reply was modified 3 years, 9 months ago by Nikko.
March 24, 2021 at 10:13 pm #1290236Ok, I didn’t notice that number change. I’ve switched out the code but it still doesn’t move the date above the blog title. See screenshot in private content.
March 25, 2021 at 2:38 am #1290258Hi Dependable,
It may just be due to cache.
I checked it just now and it seems to be working properly (please check the screenshot in private content).Best regards,
NikkoMarch 25, 2021 at 3:43 am #1290264This changes it on the blog element, but how do I move the date above heading on the actual post itself?
March 25, 2021 at 6:33 pm #1290433Hi Dependable,
For single posts, you can use this code:
function move_single_post_meta(){ if (is_single()): ?> <script> (function() { var header = document.querySelector('.single-post .entry-content-header'); var postMeta = header.querySelector('.post-meta-infos'); header.insertBefore(postMeta, header.childNodes[0]); })(); </script> <?php endif; } add_action('wp_footer', 'move_single_post_meta');
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.