Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #572152

    Hi,

    I want to display the title and meta info above the feature image. My current solution works ok, but when the page loads the title + meta appears first below the feature image and then jumps up. I would like to stop the jumping and display it above the feature image all the time.

    Here is a link so you can see what I mean:
    http://www.lovelifesolved.com/blog

    Here is the code that I use:

    In my child theme’s function.php:

    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 1 );

    In my child theme’s avia.js:

    jQuery('article.post').each(function(){
    
    jQuery(this).find('.entry-content-header').after(jQuery(this).find('.big-preview').detach());
    
    })

    Thanks!

    #573364

    Hey!

    You can go to Blog Layout > Blog Styling and select “Elegant”, that will put the title above the image.

    Regards,
    Josue

    #573661

    Could you tell me what code makes the title appear above in the “Elegant” Blog styling? I don’t want to change the rest of my blog’s styling.

    #573665

    Line 174 in /includes/loop-index.php, you could try changing that to:

    if( $blog_global_style != 'elegant-blog' )
    

    So it applies when non-elegant blog style is selected, additional adjusting may be needed.

    #573852

    Sorry Josue, but that won’t solve it. My problem isn’t that I want to display the title above the feature image, I already got that to work. My problem is, that the title and meta info jumps from below the feature image above it while the page is loading.

    There seems to be an issue with the right queuing of the child theme files and it would be amazing if you or someone else from the support team could take a look at that.

    Here is the code that I use again:

    In my child theme’s function.php:

    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 1 );

    In my child theme’s avia.js:

    jQuery('article.post').each(function(){
    
    jQuery(this).find('.entry-content-header').after(jQuery(this).find('.big-preview').detach());
    
    })

    Thanks!

    #574030

    Hey!

    You are correct. Due to the queueing of the files there is a flash of style change. You cannot change the queuing of files easily it is out of our support scope.However there is a much easier way to achieve this effect.

    Please undo the changes and follow the steps provided by josue. You can go to Blog Layout > Blog Styling and select “Elegant”, that will put the title above the image.

    It will produce close results you are trying to achieve and it will be much easier to tweak it.

    Cheers!
    Vinay

    • This reply was modified 8 years, 3 months ago by Vinay.
    #574442

    I know what you mean, however, changing the blog style is not practical for me, as it would change the whole look of the blog.

    thx for your help anyway!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Title and meta info "jump".’ is closed to new replies.