- This topic is empty.
-
AuthorPosts
-
September 19, 2011 at 4:28 am #34413
Faberuna
MemberI have the home page http://www.faberunashop.com posts set up so that when you click on each individual post you get redirected to another site. I just noticed that when you search or use the categories, the posts ignore my custom code and let you enter the post instead. How do I fix that?
September 19, 2011 at 9:46 am #87536Bob
MemberHow does your loop code look like? I can see you have the images wrapped in a anchor tag linking to the appropriate website. However, the link on your categories/searches lead to the post indeed. My guess is your loop code on your home page is different than the loop code on your categories page, so try checking that or post them here.
September 19, 2011 at 3:08 pm #87560Faberuna
MemberBob – where would I find the loop code? I will check and post what I find.
September 19, 2011 at 3:09 pm #87561chrisburton
ParticipantIn the index.php file
September 19, 2011 at 3:14 pm #87563Bob
MemberActually I think you can find it in the loop-page.php file.
September 19, 2011 at 3:14 pm #87565Faberuna
MemberHere’s the index.php:
if ( has_post_thumbnail() ) { ?>
$imgsrcparam = array(
'alt' => trim(strip_tags( $post->post_excerpt )),
'title' => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
Posted: ˑ
September 19, 2011 at 3:16 pm #87566Faberuna
MemberHere’s the archive.php:
if ( has_post_thumbnail() ) { ?>
$imgsrcparam = array(
'alt' => trim(strip_tags( $post->post_excerpt )),
'title' => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
September 19, 2011 at 3:16 pm #87567Bob
MemberPhew, please put it between code tags :)
Edit your post, select the code and press the ‘Code’ button (4th button from the left on this comment box).September 19, 2011 at 3:16 pm #87568Faberuna
MemberAnd search.php:
Search Result for post_count; _e(''); _e('“'); echo $key; _e('”'); _e(' — '); echo $count . ' '; _e('articles'); wp_reset_query(); ?>
if ( has_post_thumbnail() ) { ?>
$imgsrcparam = array(
'alt' => trim(strip_tags( $post->post_excerpt )),
'title' => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
September 19, 2011 at 3:41 pm #87569chrisburton
ParticipantYou forgot 404.php
September 19, 2011 at 3:55 pm #87570Faberuna
MemberSorry about the code tag omission! I don’t see the 404.php. Does it go by another name?
September 19, 2011 at 4:15 pm #87572chrisburton
ParticipantI was kidding. Did you significantly alter your search.php and what theme are you using?
September 19, 2011 at 4:25 pm #87573Faberuna
MemberLOL! Don’t mess with a Monday morning brain. I am using the Imbalance theme from http://www.wpshower.com and I only changed the text in the search.php, that is all.
September 19, 2011 at 5:36 pm #87576chrisburton
ParticipantWhat exactly do you mean, “I only changed the text”?
I think the problem resolves in the search.php template and I’m not sure why you have your h2 like this:
" title="">
September 19, 2011 at 6:04 pm #87579Faberuna
MemberI only changed the Search form but that was in the searchform.php
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.