Forum Replies Created

Viewing 15 replies - 91 through 105 (of 128 total)
  • Thread Starter Franz92

    (@franz92)

    Hi!
    That’s nice to hear.

    I now put it like that:

    <div id="post_holder">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <div class="post_dets">
    <div class="post_author"><?php if(get_the_author_meta('userimg') != ""): ?>
    <img class="Autorenbild" src="<?php the_author_meta( 'userimg' ); ?>" width="40" height="40" />
    <?php else: ?>
    <img src="<?php echo get_template_directory_uri(); ?>/images/no_user_img.jpg" alt="<?php the_title(); ?>" width="40" height="40" />
    <?php endif; ?>
    <span>Geschrieben von:</span><span class="post_details"><?php the_author_posts_link(); ?></span></div>
    <div class="post_time"><span>Geschrieben am:</span><span class="post_details"><a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?>"><?php the_time('F j, Y') ?>
     </a></span></div>
    
    <?php if (!empty($post->post_password)) {?><?php }else { ?><?php if ( comments_open() ) : ?><div id="comments_option">Meinungen<br  /><a href="<?php the_permalink() ?>/#leave-comment">Kommentiere</a><div class="comments-counter"><?php comments_popup_link('0', '1', '%', '', ''); ?></div></div><?php ; else : ?><div id="comments_option">Die Kommentare sind geschlossen.</div><?php endif; ?><?php } ?></div>
    
    <?php $attachments = get_posts(array('post_type' => 'attachment','post_parent' => get_the_ID(), 'post_mime_type' => 'image/jpeg'));
    $src = wp_get_attachment_image_src($attachments[0]->ID, 'medium');
    echo "<img src=\"$src\">";?>
    
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>><?php the_excerpt('Lesen Sie mehr...'); ?>

    It certainly fetches an image, but it is broken. It gives me this source code:

    <div id="post_holder">
    <h2><a href="http://see-online.info/fantastisches-seenachtsfest-feuerwerk-in-konstanz-hunderttausend-sahen-es-live/" rel="bookmark" title="Fantastisches Seenachtsfest-Feuerwerk in Konstanz: Hunderttausend sahen es live">Fantastisches Seenachtsfest-Feuerwerk in Konstanz: Hunderttausend sahen es live</a></h2>
    <div class="post_dets">
    <div class="post_author"><img class="Autorenbild" src="http://waltraudkaesser.alfahosting.org/wp-content/uploads/2012/11/wak_pr_seite-e1352281476111.jpg" width="40" height="40" />
    <span>Geschrieben von:</span><span class="post_details"><a href="http://see-online.info/author/wak/" title="Beiträge von wak" rel="author">wak</a></span></div>
    <div class="post_time"><span>Geschrieben am:</span><span class="post_details"><a href="http://see-online.info/2013/08/11/">August 11, 2013 </a></span></div>
    
    <div id="comments_option">Meinungen<br  /><a href="http://see-online.info/fantastisches-seenachtsfest-feuerwerk-in-konstanz-hunderttausend-sahen-es-live//#leave-comment">Kommentiere</a><div class="comments-counter"><a href="http://see-online.info/fantastisches-seenachtsfest-feuerwerk-in-konstanz-hunderttausend-sahen-es-live/#comments" title="Kommentiere Fantastisches Seenachtsfest-Feuerwerk in Konstanz: Hunderttausend sahen es live">3</a></div></div></div>
    
    <img src="Array">
    <div id="post-94533" class="post-94533 post type-post status-publish format-standard hentry category-konstanz category-kreuzlingen"><p>Konstanz. Schätzungsweise 40.000 bis 50.000 Besucher haben das Seenachtsfest-Feuerwerk in Konstanz gesehen. In Kreuzlingen waren es ebenso viele. Das karibische…</p>
    
    <div class="post_category"><span>In der Kategorie:</span> <a href="http://see-online.info/category/orte/konstanz/" title="Alle Beiträge in Konstanz ansehen" rel="category tag">Konstanz</a>, <a href="http://see-online.info/category/orte/kreuzlingen/" title="Alle Beiträge in Kreuzlingen ansehen" rel="category tag">Kreuzlingen</a>    </div>
    
    </div>

    The interesting part is here:
    <img src="Array">
    It tries to fetch an image, but does not succedd. I didn’t change the ‘medium’ yet, because the size shouldn’t give the code troubles, should it?

    Thread Starter Franz92

    (@franz92)

    Hi!

    To generate the 20-words-excerpts for the other posts I am using:

    <div class="posts_bellow">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <div class="post_dets">
    <div class="post_author"><span>Geschrieben von:</span><span class="post_details"><?php the_author_posts_link(); ?></span></div><div class="post_time"><span>Geschrieben am:</span><span class="post_details"><a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?>"><?php the_time('F j, Y') ?>
     </a></span></div>
    
    <?php if (!empty($post->post_password)) { ?><?php }else { ?>
    <?php if ( comments_open() ) : ?><div class="comments-counter"><?php comments_popup_link('0', '1', '%', '', ''); ?></div><?php ; else : ?><div class="comments-off">Die Kommentare<br />sind geschlossen.</div><?php endif; ?>
    <?php } ?>
    </div>
    <a href="<?php the_permalink(); ?>" rel="bookmark">
           <?php the_post_thumbnail(); ?></a><div class="post_bellow_text"><?php the_excerpt(); ?>
    <a class="read_more" href="<?php the_permalink() ?>">Lesen Sie mehr...</a>
    
    </div>
    <div class="post_category"><span>In der Kategorie:</span> <?php the_category(', ') ?><?php the_tags('<br /><span>Tags:</span>',' , ','<br />'); ?>    </div>
    </div>

    In functions.php I pasted:

    function custom_excerpt_length( $length ) {
    	return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    It is exactly as I said – It did to the text what I wanted, but the image disapparead.

    I think this approach could be useful and working. Could you spare the time?

    Thread Starter Franz92

    (@franz92)

    Hi! Thank you very much for your help. Please let me know, if I can do anything for you.

    Exactly. I just want to change how the first post is displayed. Everything should stay the same, except that the displayed excerpt should be reduced to 20 words. The image should stay as it is – currently it is the first image found in the post (not the featured image!).

    Thread Starter Franz92

    (@franz92)

    Thank you very much for your answer!

    However, I am a bit troubled – the code I posted doesn’t call an image. But one is displayed. Why?

    Do you mean, I should just use the_excerpt() and put the function wp_get_attachment_image() above it?

    Thread Starter Franz92

    (@franz92)

    Bot-activity should be picked up by the webmasters-tool, but it isn’t.

    The plugin also shouldn’t count visit of spiders, should it?

    I am following this post.

    Thread Starter Franz92

    (@franz92)

    Argh, I am sorry, how could I not look there >.>

    Thank you very much!

    Thread Starter Franz92

    (@franz92)

    Oh, it also does work badly in Internet Explorer :-/

    Thread Starter Franz92

    (@franz92)

    Hi whiletrue!

    Thank you or the two solutions. I will go with the first one. I also like the second one, because of the astethics of the button and the flyout, but the flyout appears under my content.

    Franz92

    (@franz92)

    I am interested in this as well.

    Franz92

    (@franz92)

    So you just changed the slider duration directly in the slider folder?

    Well, not the clean way, but it works.

    Better would be a change of duration in the function which calls the slider. However I couldn’t get a hold of a how-to

    Thread Starter Franz92

    (@franz92)

    Thanks, that was not bad – however I can not understand why I can’t point my clients to a subpage of my site which pulls the content from the feed, but is styled via css.

    Thread Starter Franz92

    (@franz92)

    Hi!
    Thank you for looking, totally forgot that post here!

    I solved it: Just pulled up the image file where those arrows are stored and erased the other icons around them. Voila, not a clean solution, but a effective one.

    Thread Starter Franz92

    (@franz92)

    However those are not completly translated.

    See: http://baustelle.matratzen-lagerverkauf.de/?p=145

    “One comment…”

    I guess I should translate the missing strings myself with POEdit?

    Thread Starter Franz92

    (@franz92)

    Thank you very much! This will also help me in the future.

Viewing 15 replies - 91 through 105 (of 128 total)