-
AuthorPosts
-
February 10, 2019 at 3:34 am #1065039
Hi
I found the following instructions on how to move the post meta data just below the post title here and I’m testing it on my staging server for now:I added the code snippet to my functions.php file like so:
//—————————
// JS – move Meta after title
// ————————–function metaAfterTitle(){
?>
<script>
jQuery(“.template-blog .post-entry”).each(function(i) {
var postTitle = jQuery(this).find(‘.blog-categories.minor-meta’);
var metaInfo = jQuery(this).find(‘.post-meta-infos’);
jQuery(metaInfo).insertAfter(postTitle);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘metaAfterTitle’);and the CSS as follows plus I removed the borders:
/*—————————————–
// CSS – place Blog meta after post title
//—————————————-*/
#top .post-meta-infos {
margin-top: 0px !important;
border: none !important;
}It does not seem to work. See here on the single blog post itself: http://silviafindings.staging.wpengine.com/merry-christmas-from-team-silviafindings (hosted on WPengine)
and here on the blog list: http://silviafindings.staging.wpengine.com/jewellery-corner
Any insight to make this work correctly and consistently would be greatly appreciated.
Thanks
LyseFebruary 11, 2019 at 7:04 pm #1065612Hey tremblayly,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaFebruary 11, 2019 at 7:46 pm #1065629Hi Victoria,
See below the temporary access credentials.
Lyse
February 14, 2019 at 1:48 am #1066712Hi,
Thanks for the update.
The login credentials are invalid. Please check it carefully. I also noticed that the page markup is minified. Did you toggle the minification, or purge the cache after adding that code?
Best regards,
IsmaelFebruary 14, 2019 at 1:58 am #1066716Hi Ismael,
I resetted the password. It should work now.
LyseFebruary 17, 2019 at 8:25 pm #1067979Hi,
I still cant access at all.
Can you double check?Best regards,
BasilisFebruary 17, 2019 at 10:40 pm #1068055Hi Basilis,
I just logged in successfully with the credentials I provided.
Lyse
February 19, 2019 at 7:56 am #1068791Hi,
Thanks for the update.
We added this script in the functions.php file:
// move post meta info add_action('wp_footer', 'avf_move_post_meta'); function avf_move_post_meta(){ ?> <script type="text/javascript"> (function() { var body = document.getElementsByTagName( 'body' )[0]; var entry = document.querySelectorAll(".entry-content-wrapper"); var meta = null; var title = null; if( entry ) { if( body.classList.contains( 'single' ) ) { meta = entry[0].querySelector(".post-meta-infos"); title = entry[0].querySelector(".av-heading-wrapper"); title.parentNode.insertBefore(meta, title.nextSibling); } else { for (var i = 0; i < entry.length; ++i) { meta = entry[i].querySelector(".post-meta-infos"); title = entry[i].querySelector(".av-heading-wrapper"); title.parentNode.insertBefore(meta, title.nextSibling); } } } })(); </script> <?php }
Please purge the cache and disable the minification prior to checking the page.
Best regards,
IsmaelFebruary 19, 2019 at 5:23 pm #1069036Hi Ismael,
Can this post meta info be moved as well on the blog listing page?
Thanks
LyseFebruary 21, 2019 at 6:44 am #1069788February 21, 2019 at 7:31 am #1069810Hi Ismael
Here
http://silviafindings.staging.wpengine.com/jewellery-corner (hosted on WPengine)Thanks
LyseFebruary 22, 2019 at 4:41 am #1070201Hi,
Thanks for the update.
The script above has been adjusted, so it should work for both the single post and the blog listing page.
Best regards,
IsmaelFebruary 22, 2019 at 5:37 pm #1070406Hi Ismael,
I have updated the script in the functions.php file on both my staging and production sites.
When looking at the blog list page on my staging server: http://silviafindings.staging.wpengine.com/jewellery-corner (hosted on WPengine)
or on my production site here: https://silviafindings.com/jewellery-corner
the post meta seem to display correctly on the first post, but none of the others.Also the first post is not displaying the image any longer?
The single post displays perfectly!
Thanks
LyseFebruary 24, 2019 at 11:12 pm #1071044Hi
I also just noticed that the single product images no long display. Here’s a link to a product so you can see for yourself:Can someone look at this urgently please because it’s happening on the production site!
Thanks
LyseFebruary 25, 2019 at 12:11 am #1071055Hi
For the time being, I put the old script code so that my images (for products & posts) display correctly live.Lyse
February 25, 2019 at 11:27 am #1071231Hi,
Thanks for the update.
We added the following css code and then modified the snippet in the functions.php file a bit.
.big-preview a { height: auto; width: 100%; }
Best regards,
IsmaelFebruary 25, 2019 at 5:30 pm #1071365Hi Ismael,
I’ve applied the fix to the production site as all worked well on the staging server.
The only problem is that the product image on the product single page does not display at all when using the script.
Here’s a link to a live product so you can see:
You can use the same credentials on the production site as on the staging one.
Thanks
LyseFebruary 25, 2019 at 5:57 pm #1071382You can also see that the single product page displays other information about the product incorrectly ie. the tab area….
February 26, 2019 at 12:44 am #1071567Hey!
I added a condition to the script so that it only affects the default posts. ( see private field )
Cheers!
IsmaelFebruary 26, 2019 at 12:55 am #1071570Hi Ismael,
Ah yes!!! All looks perfect on my live site!
Thank you so very much for your patience and wonderful support!
Lyse
February 26, 2019 at 1:08 am #1071573Hi again….
I got too excited and noticed that the section on my home page that displays “Most Recent Shows” (recent posts) no longer display the posts:
production: https://silviafindings.com/And on the single post, the section “You might also like….” posts also does not display the posts.
Thanks
LyseFebruary 26, 2019 at 1:22 am #1071577Hi
There are other areas on of the website that the text no longer displays within sections:Also many display issues on the customer services page where icons don’t display:
Thanks
LyseFebruary 26, 2019 at 3:47 am #1071605Hi
I removed the script code snippet from the production site because it was causing too many display and search function issues.
LyseFebruary 27, 2019 at 1:36 am #1072103Hi,
Could you apply the modification in the staging site and provide direct links to the pages with the issue? We just noticed that you’re using different kinds of blog layout, but the script that we provided is only compatible with the “single author, big preview” style because that was the only layout or style that we’ve seen before.
If possible, please open a new thread because this one is getting a bit too long.
Best regards,
IsmaelFebruary 27, 2019 at 2:09 am #1072114Hi Ismael,
Here’s the new thread link: https://kriesi.at/support/topic/move-post-meta-data-below-post-title-2/#post-1072113
Lyse
-
AuthorPosts
- You must be logged in to reply to this topic.