Support » Allgemeine Fragen » Title Icons Plugin Modifikation

  • Servus,

    ich habe bereits Artikelbilder auf meiner Website, nun habe ich noch dazu das Plugin: Title Icons installiert.

    Nun wird das ausgewähle icon auch angezeigt.

    Ich möchte es allerdings ein wenig verändern und brauche da mal euere hilfe bitte.

    Wie mein post aussieht:

    (Titel-Icon)Headline
    Posted on datum
    ————
    Artikelbild
    ————

    Wie ich es mir vorstelle:

    Headline
    (Title-Icon)Posted on datum
    ————
    Artikelbild
    ————

    Die Ausgabe im Plugin sieht aus wie folgt:

    /*********************************
            Add icon to title
    *********************************/
    add_filter('the_title', 'add_title_icon', 1, 2);
    
    function add_title_icon($title, $id){
        //Only display icon in "the loop" and not in admin pages
        if ( in_the_loop() && !is_admin() ) {
            return $title . '<img src="'.plugins_url('icons/', __FILE__ ).title_icon($id).'" class="titleicon"/> ';
        }
        else
            return $title;
    }

    Die in der content.php so:

    <?php
    /**
     * @package patrick
     * @since patrick 1.0
     */
    ?>
    <div class="grid_2">
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    	<header class="entry-header">
    
    		<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'patrick' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    
    		<?php if ( 'post' == get_post_type() ) : ?>
    		<div class="entry-meta">
    
      <?php patrick_posted_on(); ?>
    
    		</div><!-- .entry-meta -->
    		<?php endif; ?>
    
    <?php
    					$thumb = get_post_thumbnail_id();
    					$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
    					$image = aq_resize( $img_url, 280, 200, true ); //resize & crop the image
    				?>
    
    				<?php if($image) : ?>
    					<a class="box-image" href="<?php the_permalink(); ?>"><img src="<?php echo $image ?>"/></a>
    				<?php endif; ?>	
    
    	</header><!-- .entry-header -->
    
    	</article><!-- #post-<?php the_ID(); ?> -->
    </div>

    Weis jemand raat? Ich verzweifel dadran :S
    Danke!

  • Das Thema „Title Icons Plugin Modifikation“ ist für neue Antworten geschlossen.