Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw

Support for: Razor: Cutting Edge WordPress Theme

Razor

Public Group  |  active 1 year, 9 months ago ago
Viewing post 1 to 10 (10 total posts)

Zero width and height output with [styled_image] shortcode

  • keyhanjun

    said

    Hi, checking out the page ‘Our Team’ using the demo data gives us the shortcode:

    [styled_image w="190" h="225" lightbox="no" image="5161"]

    But unfortunately on the frontend this is the HTML output:

    <div class="image-bg "><img width="0" height="0" alt="" src="http://domain.com/wp-content/uploads/2013/01/youngman-square.jpg"></div>
    

    So there is no picture visible due to the width & height 0 problem.

    Same happens with the shortcode on the ‘Our Services’ page:

    [portfolio post_type="page" post_parent="3567" content_width="880" columns="6" image_ratio="1:1" posts_per_page="6" paging="false"]

    Any ideas?

    Thanks! ;)

  • andy

    said

    Best guess, the image ID you have entered is for one of the graphics from the demo and that ID does not exist on your install. So the resize function tests the size of the image supplied and finds… it doesn’t exist which means it has no width or height.

    Enter an ID for a real, existing image in your media library and you should get better results.

  • keyhanjun

    said

    Strangely the ID: 5161 is the correct one for this image.

    I checked the permalink of this picture and it states:

    http://domain.com/?attachment_id=5161 which displays the image fine.

    I also tried other IDs of existing images – same result.

  • Steve

    said

    @keyhanjun – out of interest, could you please put in the URL to the image? Not the attachment URL that you posted above but the URL directly to the image.

  • keyhanjun

    said

    @steveholland – yes this works without a problem.

    Will provide you the wp credentials to have a look first hand via a private message.

    Thanks in advance,
    keyhanjun

    Edit01: Seems the private message function is not embedded here. Will write you an eMail via the contact form of themeforest.

  • jeffw

    said

    @keyhanjun

    If you need to send confidential information to the support team you can do so by emailing support@parallelus.net and including in the email a link to the topic so that we know what the email is about.

    Note that we are not able to provide any support via private email, the above facility should be used solely for communicating confidential information to the support team.

    With regard to the [styled_image] issues, I can’t replicate the problem you are having but I am experiencing odd behaviour from this shortcode. No matter what width I set in the shortcode, the result is an image container that is the full width of the enclosing container (i.e. the styled-image container). Eventually I found that adding an align="left" attribute fixed this particular problem. I think this is something that @andy will need to have a look at.

    To be clear, this displays bad:

    [styled_image w="500" h="430" lightbox="no" image="1234"]

    And this displays good:

    [styled_image w="500" h="430" lightbox="no" image="1234" align="left"]

    However I still cannot replicate the issue with the zero width and height attributes being output.

    @keyhanjun Have you have deactivated all plugins to make sure they are not causing any issues?

  • keyhanjun

    said

    Hi jeffw,

    thanks the eMail is sent.

    Already tried the alignment workaround but unfortunately it doesn’t help to fix the issue.

    Yes, all plugins are deactivated except BuddyPress tested on a standard local wordpress installation & a live WP Multisite installation (blog id 1 / main blog).

    Both have the same problem.

  • jeffw

    said

    Hi, keyhanjun.

    Unfortunately I cannot replicate this issue and unless I can replicate it there is not very much I can do to help. This issue (and the issue that I was having) have been logged with Andy.

  • andy

    said

    You’re using the demo images which are copyrighted, and I’m also sure a reason for the problem (incorrect ID links in WP database). If you will upload your own images I doubt the problem will occur. Until you delete the illegal images from your site I cannot assist you further because it would contribute to copyright infringement.

  • keyhanjun

    said

    Thanks Andy for the help, this was only for testing purposes. Understand now why it didn’t worked & I will do what you have advised.

    Best regards,
    keyhanjun

Viewing post 1 to 10 (10 total posts)
Topic tags: images, shortcode