Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Nelio Software

    (@nelio)

    Hi! What theme are you using? If we could take a look at it, we’d be able to tell you what to change.

    Thread Starter magdy aboelmagd

    (@magdy-aboelmagd)

    Official v1.4.1

    Plugin Author Nelio Software

    (@nelio)

    It looks like this theme is not available for free. If you want me to take a look at its source code, send us a zip copy of the theme via e-mail (customers AT neliosoftware DOT com); I’ll try to figure out how to fix the compatibility issue.

    Thread Starter magdy aboelmagd

    (@magdy-aboelmagd)

    Plugin Author Nelio Software

    (@nelio)

    Hi! Thanks for the link. It is very complicated to offer a proper solution for this theme; there are many, many different files that have to be edited in order to be able to use external featured image. Nonetheless, I found a simple workaround that should do the trick. Please note you’ll have to edit a couple of files (using the Theme Editor in WordPress).

    Warning: Before editing any PHP files, make sure you have a backup of your WordPress installation. If anything goes wrong, you’ll want to have it ??

    File 1: admin/bdayh.php. Lines 2336-2343 have the following code:

    function bd_post_image($size = 'thumbnail'){
      global $post;
      $image = '';
      $image_id = get_post_thumbnail_id($post->ID);
      $image = wp_get_attachment_image_src($image_id,
      $size);
      $image = $image[0];
      if ($image) return $image;

    Just add the following code after the previous fragment, without deleting any existing code:

    // ******************************************************************
      // ******************************************************************
      $image = get_the_post_thumbnail( $post->ID, $size );
      if ( $image ) {
        $image = str_replace( '<img src="', '', $image );
        $image = str_replace( '" />', '', $image );
        return $image;
      }
      // ******************************************************************
      // ******************************************************************

    File 2: aq_resizer.php. Lines 26-27 have the following code:

    //validate inputs
      if(!$url OR !$width ) return false;

    Just add the following code after the previous fragment, without deleting any existing code:

    // ******************************************************************
      // ******************************************************************
      if ( strpos( $url, 'data:image/gif;' ) === 0 ) {
        if ( !$height )
        $height = int( $width * 2 / 3 );
        $size = sprintf( 'style="width:%spx;height:%spx;', $width, $height );
        return str_replace( 'style="', $size, $url );
      }
      // ******************************************************************
      // ******************************************************************

    I’ve tested it on a local installation and it looks good (there are external featured images in the Latest Posts page). There might be some cases in which you’ll need to tweak your CSS files.

    Please let us know if this works!

    Thread Starter magdy aboelmagd

    (@magdy-aboelmagd)

    the first code has error
    Parse error: syntax error, unexpected ‘&’ in themes/official/admin/bdayh.php on line 2347

    sorry i am not coder ??

    Plugin Author Nelio Software

    (@nelio)

    Please, send us your e-mail (via e-mail, do not post it here) and I’ll send you a modified copy of your theme.

    Thread Starter magdy aboelmagd

    (@magdy-aboelmagd)

    have been solved thank you so much

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘theme problem’ is closed to new replies.