Support

Detox Images size and code (7 posts)

Languages

de | fr | es | 日本語

About This Topic

Tags

  1. rss Mieke

    new member


    rss Posted 1 year ago
    #

    I want to add images to posts. When I do that, it automatically turns up at the slider in a big picture and a thumbnail and at the bottom of the homepage. Unfortunately it is not in proportion. How can I add images and take care that every picture is in proportune? What imagesizes should I use? And how can I make sure one post shows the correct image proportion at all locations? Is there anything of a code I should add in the extra fields or something?

    Thanks!!

  2. rss milo

    moderator


    rss Posted 1 year ago
    #

    Post url where the theme can be seen.

  3. rss Mieke

    new member


    rss Posted 1 year ago
    #

    mamawashier.nl But I activated an under construction theme in frontend. I'll put the detox theme up live so you can see the problem. After that I'll replace it again.

  4. rss Mieke

    new member


    rss Posted 1 year ago
    #

    Does anyone have an answer?

  5. rss milo

    moderator


    rss Posted 1 year ago
    #

    Detox theme uses always the first image in post body content,
    you can use the post thumbnail code for small images (info), but then the theme needs to be rewrítten in certain places.

    For example, open left sidebar template, line 21:
    src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>" width="100" height="100"
    and change width & height to your linkings.

  6. rss Mieke

    new member


    rss Posted 1 year ago
    #

    What should the size of the first picture be to ideally fit in the slider?

    It seems the code you pasted is for the thumbnail. I am not a programmer, but I'll give it a try. I conclude it's not possible to add this info at the extra fields per post?

  7. rss milo

    moderator


    rss Posted 1 year ago
    #

    You can have custom fields for the slider images,

    open feature php at detox/inc and search for line 30

    <img src="<?php echo catch_that_image() ?>" alt="<?php the_title(); ?>" ⁄>

    replace this line with

    <?php $image = get_post_meta($post->ID, 'front_image', true); ?>
    <img src="<?php echo $image ?>" alt="<?php the_title(); ?>" ⁄>

    this way you have a custom filed with key front_image and value your img url

Reply

You must log in to post.

Design by milo

Milo designs web sites that strike the perfect balance between professional high-class graphics, functionality, usability, user experience, and high performance.