Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #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
    Lyse

    #1065612

    Hey 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,
    Victoria

    #1065629

    Hi Victoria,

    See below the temporary access credentials.

    Lyse

    #1066712

    Hi,

    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,
    Ismael

    #1066716

    Hi Ismael,
    I resetted the password. It should work now.
    Lyse

    #1067979

    Hi,

    I still cant access at all.
    Can you double check?

    Best regards,
    Basilis

    #1068055

    Hi Basilis,

    I just logged in successfully with the credentials I provided.

    Lyse

    #1068791

    Hi,

    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,
    Ismael

    #1069036

    Hi Ismael,

    Can this post meta info be moved as well on the blog listing page?

    Thanks
    Lyse

    #1069788

    Hi,

    Where is that page? Please post an actual link.

    Best regards,
    Ismael

    #1069810
    #1070201

    Hi,

    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,
    Ismael

    #1070406

    Hi 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
    Lyse

    #1071044

    Hi
    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
    Lyse

    #1071055

    Hi
    For the time being, I put the old script code so that my images (for products & posts) display correctly live.

    Lyse

    #1071231

    Hi,

    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,
    Ismael

    #1071365

    Hi 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
    Lyse

    #1071382

    You can also see that the single product page displays other information about the product incorrectly ie. the tab area….

    #1071567

    Hey!

    I added a condition to the script so that it only affects the default posts. ( see private field )

    Cheers!
    Ismael

    #1071570

    Hi Ismael,

    Ah yes!!! All looks perfect on my live site!

    Thank you so very much for your patience and wonderful support!

    Lyse

    #1071573

    Hi 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
    Lyse

    #1071577

    Hi
    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
    Lyse

    #1071605

    Hi
    I removed the script code snippet from the production site because it was causing too many display and search function issues.
    Lyse

    #1072103

    Hi,

    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,
    Ismael

    #1072114
Viewing 25 posts - 1 through 25 (of 25 total)
  • You must be logged in to reply to this topic.