ViewedYuzo and AMP pages

  • Author
    Posts
  • Paul Sutherland
    Participant

    Is it possible to prevent the related posts from appearing on the AMP versions of posts as they can look a bit of a mess. e.g. http://www.skymania.com/wp/2015/06/rosetta-metalhead-matt-picks-up-golden-gods-award.html/8773/amp/

    screenshot

    #4547
    Paul Sutherland
    Participant

    I have not had a reply to this, which is a shame as I would like to leave a positive review on WordPress. I suggest that it would be useful to add an option for the related posts not to appear on URLs that include the string */amp/*

    #4550
    iLen
    Keymaster

    Hello, I was giving the university exams.
    Please go to: Yuzo setting -> Styling -> Add custom css And place the following code:
    .yuzo_related_post .yuzo_wraps{ overflow: hidden; }

    I await your response

    #4565
    Paul Sutherland
    Participant

    Thank you! But I’m not sure it is working. I thought they might still be appearing due to caching, but a separate instruction I’ve added IS working (hiding of share buttons using functions.php).

    Here is an example page: http://www.skymania.com/wp/2016/02/hubble-analyses-super-earth-atmosphere.html/9303/amp/

    #4567
    iLen
    Keymaster

    Hi, I see that you are not reflecting the change that indicates you above.
    Video: http://recordit.co/U0i9IEcEAu

    Please go to: Yuzo setting -> Styling -> Add custom css and place the following code:
    .yuzo_related_post .yuzo_wraps{ overflow: hidden!important; }
    save changes and clean cache..
    I await your response

    #4569
    Paul Sutherland
    Participant

    Hi. I did that, and cleaned the cache. I wonder if the problem is that WordPress’s Amp plugin uses its own CSS?

    Screenshot

    #4570
    iLen
    Keymaster

    Yuzo and AMP should work independently. Somehow the Yuzo css is not being printed inside AMP, you can request AMP support because yuzo normally prints its style correctly

    #4571
    suthers
    Participant

    Thank you for your help. I shall contact the WordPress AMP developers.

    Paul

    #4575
    iLen
    Keymaster

    Any news you let me know 🙂

    #4576
    suthers
    Participant

    I shall do. I’ve posted a request for support here: https://wordpress.org/support/topic/related-posts-conflict/

    #4577
    Paul Sutherland
    Participant

    Just a thought, but I was able to disable a misbehaving share buttons plugin on AMP posts by adding this to my functions.php file, so I wonder whether a similar piece of code would do the same for Yuzo?

    add_action( 'pre_amp_render_post', 'my_amp_add_custom_actions' );
    function my_amp_add_custom_actions() {
    remove_filter( 'the_content', 'show_share_buttons' );
    }
    #4581
    iLen
    Keymaster

    If you want Yuzo not to appear below the contents you can deactivate
    Automatically append to the post content

    #4591
    suthers
    Participant

    I seem to have solved this now by disabling the automatic inclusion of the related posts after a post, and instead adding your code directly to the single.php file in the theme.

    #4639
    iLen
    Keymaster

    Yes, that is an elegant solution

    #4655
Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.