Site Logo

Hi, this maybe a daft question but here goes anyhow.

For our company presentation (in PowerPoint) some clever dude enabled our logo which is present on each page to rotate around it’s Y-axis…looks quite funky.

Is there anyway to incorporate this motion feature to our logo on our website homepage?

Kind Regards,

Lawrence

Dear Lawrence,

There is no an instant way to achieve it through site’s options panel. You need to manually animate the logo image by using CSS3 animation. This is an example: https://codepen.io/kvagtholm/pen/kLBzj; you could take it for your reference. To include the code in your site, you can insert it into your site’s additional CSS option (Appearance > Customize > Additional CSS) or child theme’s style.css.

Regards,
Kharis

Hello Kharis…many thanks.

May I ask you a quick kind of unrelated question…remember this discussion https://athemes.com/forums/topic/attachment-page-customisation/#post-701514??? all is fine and again many thanks for your assistance.

I also run another site which uses the Sydney free theme…the funny thing is when I implement the fix to get rid of the Leave a Reply / Post Comment items from the attachment page it doesn’t work…although it does work on the Sydney Pro site.

Any idea’s

Kind Regards,

Lawrence

Did you adjust the attachment ID in this part of code?


// Different button URL for attachment with ID 1778
if( $('body').hasClass('attachmentid-1778') ){
  buttonURL = '#other-link';
}

Regards,
Kharis

Hi Kharis, I did and the code I am now using is below. I upgraded the site this morning to the Sydney Pro theme thinking that it may have been an issue as previously I was using the free theme…but even after the upgrade I still have the same problem. It is strange how it works on one site but not the other.

(function($){

"use strict"

if( $('body').hasClass('attachment') ){

  var buttonURL   = '#';
  var buttonLabel = 'Back to Publications';
  
       
  if( $('body').hasClass('attachmentid-3957') ){
    buttonURL = 'http://euhcm.com/publications/';
  }
  if( $('body').hasClass('attachmentid-3965') ){
    buttonURL = 'http://euhcm.com/publications/';
  }
  if( $('body').hasClass('attachmentid-3966') ){
    buttonURL = 'http://euhcm.com/publications/';
  }
  
  // Remove comment section
  $('#comments').remove();

  // Add button below attachment page
  $('.post-wrap').append('<a href="'+buttonURL+'">'+buttonLabel+'</a>');
  

}

})(jQuery);

Hello there,

Please share me the link to the attachment page of your other site where you tried to apply the code, so I can debug and troubleshoot it.

If you want to share privately, you can email me at kharisblank@gmail.com; mention the link to this thread.

Regards,
Kharis

Hello Kharis, below is the link to the publications page on the other site…which works just fine i.e. you click on a publication and it takes you to a clean page with the publication. Something else I noticed on the new site is that the Back To Publications doesn’t work but it does on the site below.

Kind Regards,

Lawrence

Hello there,

I noticed you have different setup on euhcm.com. All attachment links on publications page refer to regular page. You need to do class names adjustment. For instance, replace attachmentid-3957 with page-id-3957. This class name can be found from the web browser’s inspector tool. On Firefox, click on Tools menu > Web Developer > Inspector. So you can correct this on your other pages you might have.

Please replace the code with this one:


(function($){
      
    "use strict"

    if( $('body').hasClass('attachment') ){

      var buttonURL   = '#';
      var buttonLabel = 'Back to Publications';
      
           
      if( $('body').hasClass('page-id-3957') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      if( $('body').hasClass('page-id-3965') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      if( $('body').hasClass('page-id-3966') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      
      // Remove comment section
      $('#comments').remove();

      // Add button below attachment page
      $('.post-wrap').append('<a class="roll-button more-button" href="'+buttonURL+'">'+buttonLabel+'</a>');
      
    
    }

})(jQuery);

Regards,
Kharis

Many thanks Kharis, how would I change attachments links to behave as they do on the working site?

Kind regards and thank you for your help and patience.

Lawrence

Dear Lawrence,

Your publications should be linked to the respective attachment page URLs. For URL itself can be found from media library (Media > Library), click on the thumbnail, visit the link that says “View attachment page”.

Regards,
Kharis

Hello Kharis, I understand that. I am still not clear on how I managed to make the attachments behave differently on the sites and how to fix the euhcm.com site to behave like the other site. Is there some setting I should use when I upload the files to the media library?

Kind Regards,

Lawrence

Hello there,

Sorry, I forgot to tell you one thing. Once you updated the URL to the attachment page, you can use the below code again.



(function($){
      
    "use strict"

    if( $('body').hasClass('attachment') ){

      var buttonURL   = '#';
      var buttonLabel = 'Back to Publications';
      
           
      if( $('body').hasClass('attachmentid-3957') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      if( $('body').hasClass('attachmentid-3965') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      if( $('body').hasClass('attachmentid-3966') ){
        buttonURL = 'http://euhcm.com/publications/';
      }
      
      // Remove comment section
      $('#comments').remove();

      // Add button below attachment page
      $('.post-wrap').append('<a class="roll-button more-button" href="'+buttonURL+'">'+buttonLabel+'</a>');
      
    
    }

})(jQuery);


Verify the attachment IDs.

Regards,
Kharis

Hello Kharis, many thanks. My issue is I don’t know how to change the URL’s to the attachment pages. Can you spoon feed me with the process.

Kind Regards,

Lawrence

Hi Lawerence,

For efficiency reason, I thought it would be better If I could record a screencast. Please grant me to access the admin area to euhcm.com. Email me the username and password at kharisblank@gmail.com.

Regards,
Kharis

Hello Kharis, email sent.

Regards,

Lawrence

Hello Kharis, an updates on my problem?

Regards,

Lawrence