Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Search vs. Homepage

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 38 total)
  • Author
    Posts
  • #34413
    Faberuna
    Member

    I 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?

    #87536
    Bob
    Member

    How 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.

    #87560
    Faberuna
    Member

    Bob – where would I find the loop code? I will check and post what I find.

    #87561
    chrisburton
    Participant

    In the index.php file

    #87563
    Bob
    Member

    Actually I think you can find it in the loop-page.php file.

    #87565
    Faberuna
    Member

    Here’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 ); ?>

























    #87566
    Faberuna
    Member

    Here’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 ); ?>








      " title="">


















    #87567
    Bob
    Member

    Phew, 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).

    #87568
    Faberuna
    Member

    And 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 ); ?>







      " title="">





















    #87569
    chrisburton
    Participant

    You forgot 404.php

    #87570
    Faberuna
    Member

    Sorry about the code tag omission! I don’t see the 404.php. Does it go by another name?

    #87572
    chrisburton
    Participant

    I was kidding. Did you significantly alter your search.php and what theme are you using?

    #87573
    Faberuna
    Member

    LOL! 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.

    #87576
    chrisburton
    Participant

    What 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="">

    #87579
    Faberuna
    Member

    I only changed the Search form but that was in the searchform.php

Viewing 15 posts - 1 through 15 (of 38 total)
  • The forum ‘CSS’ is closed to new topics and replies.