Witam serdecznie.
Mam problem, a mianowicie:
Nie wiem jak zrobić stały obrazek w php w szablonie.
Mam taki oto kod:
<?php
/**
* @package web2feel
* @since web2feel 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('mbox'); ?>>
<div class="post-image">
<?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, 300, 0, true ); //resize & crop the image
?>
<?php if($image) : ?>
<a href="
<?php the_permalink
(); ?>"><img src="
<?php echo $image ?>"/></a>
<?php endif; ?>
</div>
<header class="entry-header">
<h1 class="entry-title"><a href="
<?php the_permalink
(); ?>" title="
<?php echo esc_attr
( sprintf( __
( 'Permalink to %s', 'web2feel' ), the_title_attribute
( 'echo=0' ) ) ); ?>" rel="bookmark">
<?php the_title
(); ?></a></h1>
</header><!-- .entry-header -->
<div class="entry-summary">
<h1 class="entry-title"><a href="
<?php the_permalink
(); ?>" title="
<?php echo esc_attr
( sprintf( __
( 'Przeczytaj i pobierz: %s', 'web2feel' ), the_title_attribute
( 'echo=0' ) ) ); ?>" rel="bookmark"><center><img src="download.png" alt=""/></center></a></h1>
</div><!-- .entry-summary -->
Głównie chodzi o ten kod:
<div class="entry-summary">
<h1 class="entry-title"><a href="
<?php the_permalink
(); ?>" title="
<?php echo esc_attr
( sprintf( __
( 'Przeczytaj i pobierz: %s', 'web2feel' ), the_title_attribute
( 'echo=0' ) ) ); ?>" rel="bookmark"><center><img src="download.png" alt=""/></center></a></h1>
Na stronie głównej wszystko jest idealnie, ale jeżeli url mojej strony zmieni się na kolejną podstronę czyli: xxxx.pl/page/2/
to wtedy w źródle strony pojawia się taki kod:
<img src="http://xxxx.pl/page/2/download.png" alt="">
a chciałbym żeby na każdej stronie, wszystko było na stałe, czyli:
<img src="download.png" alt="">
Serdecznie dziękuje za pomoc.
Ten post edytował Owneds 3.01.2014, 13:02:14