Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
historiek
tagDiv Member

It only works for captioned WordPress-images. Adsense will open normally.

Regards, Yuri

historiek
tagDiv Member

Thanks for diving in this Lucian. It’s working on our site as well.

historiek
tagDiv Member

Maybe it has something to dot with a child-theme.

In which functions.php did you add the code? In the one in folder ‘Newspaper’ or folder ‘Newspaper-child’?

historiek
tagDiv Member

It should work when you follow these steps:

1) Place this code in functions.php

// include theme.js
//
wp_enqueue_script( 'theme-js', get_stylesheet_directory_uri() . '/js/theme.js', array( 'jquery'), NULL, TRUE );

2) Create a theme.js-file with this code:

jQuery( document ).ready( function ($) {

if ( $( document.body ).hasClass( 'single' ) ) {

$( '.td-post-text-content figure > a img' ).addClass( 'td-modal-image' ) ;

}

} ) ;

3) Upload theme.js to the specified folder (i.e.: wp-content/themes/Newspaper/js/)

That’s all.

historiek
tagDiv Member

@ned4spd8874 We have thousands of posts af well. We’re using the code and all WP-images now automatically get ‘modal on’. You don’t have to through every single post. Doing that wasn’t an option for us as well. That’s why we created the code.

historiek
tagDiv Member

@ned4spd8874

You should create a small .js-file with the code above and place it in a folder (like js or something). After that you’ll have to activate the script in functions.php. Like:

// include theme.js
//
wp_enqueue_script( 'theme-js', get_stylesheet_directory_uri() . '/js/theme.js', array( 'jquery'), NULL, TRUE );

historiek
tagDiv Member

We fixed it using this:

jQuery( document ).ready( function ($) {

if ( $( document.body ).hasClass( 'single' ) ) {

$( '.td-post-text-content figure > a img' ).addClass( 'td-modal-image' ) ;

}

} ) ;

historiek
tagDiv Member

Hi, just found out that the LinkedIn button doesn’t work. When pushed LinkedIn comes up with:

We’re sorry. Something unexpected happened and your request could not be completed. Please close this window and try again.

Also happens on the demo-site http://gdgtarena.com/2014/09/16/ecobee-3/

Any idea what may be causing this?

historiek
tagDiv Member

I checked functions.php and changed

`/* ----------------------------------------------------------------------------
content width
*/

if (!isset($content_width)) {
$content_width = 700;
}`

To:

`/* ----------------------------------------------------------------------------
content width
*/

if (!isset($content_width)) {
$content_width = 1200;
}`

The full width images now come up the way the should: http://historiek.net/graphic-novel-over-de-eerste-wereldoorlog/46305/

Also the responsive layout is still working. Could this change cause any other errors or is it ok to edit this line in functions.php ?

Thanks in advance, Yuri

  • This reply was modified 11 years by historiek.
  • This reply was modified 11 years by historiek.
historiek
tagDiv Member

Thanks for pointing me in the right direction. This problem seems to come up with the Photon-function in Jetpack enabled. But I’m still not quite sure why it is re-sizing the full size image to a width of 700px.

Maybe it has something to do with the content_width setting for the theme?

This thread seems to be interesting: https://wordpress.org/support/topic/photon-resizing-full-size-images-to-400px

Do you no where I can change the content_width setting? And do you have any idea if that would be a wise thing to do?

Turning off Photon isn’t really an option for us.

Thanks, Yuri

historiek
tagDiv Member

Thanks for the plugin. Its a nice addition.

Question: is it possible to make the Facebook-button show the amount of FB-likes? Right now it shows the amount of FB-shares. Or is it possible to make the button show the sum of shares and likes?

I’m using ShareMetric in Chrome: https://chrome.google.com/webstore/detail/sharemetric/lhnijlahkclijpefbcimahdcgcjbmnnp
(to check the amount of FB shares and likes)

Viewing 11 posts - 1 through 11 (of 11 total)