Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11901

    Hi,

    since I upload nearly all my pictures via flickr straight into the blog entry, I would like to disable the image in the related post section and I would like to have the selection from the same category and not the tags.

    And I was trying to change “related posts” into “Ähnliche Einträge” only to get ? for the “a” – is there a way to change it so I can use ä, ü and ö?

    Thanks a lot

    #73520

    Hi,

    To hide the thumbnail you’ll need to add the code below to your custom.css or Quick CSS.

    .news-thumb { display: none; }

    Could you explain what you meant by “would like to have the selection from the same category and not the tags”? Not sure I follow. As far as the translation, you could try this http://webdesign.about.com/library/bl_htmlcodes.htm but if that doesn’t work I think you may to have use a translation plugin.

    Regards,

    Mya

    #73521

    Re “category/tags” query: Open up includes/related-posts.php and replace:

    $tags = wp_get_post_tags($post->ID);
    if ($tags) {

    $tag_ids = "";
    foreach ($tags as $tag ) $tag_ids .= $tag->name.",";
    $tag_ids = substr_replace($tag_ids ,"",-1);
    $tag_ids = str_replace(" ", "-",$tag_ids);

    if($tag_ids)
    {
    $my_query = new WP_Query(array('tag'=>$tag_ids, 'showposts'=>$postcount, 'ignore_sticky_posts'=>1, 'orderby'=>'rand', 'post__not_in' => array( $this_id ) ) );

    with:

    $categories = get_the_category($post->ID);
    $category_ids = '';

    foreach ($categories as $category){
    $category_ids .= $category->cat_ID;
    }

    if ($categories) {

    if($category_ids)
    {

    $my_query = new WP_Query(array('cat'=>$category_ids, 'showposts'=>$postcount, 'ignore_sticky_posts'=>1, 'orderby'=>'rand', 'post__not_in' => array( $this_id ) ) );

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Related Posts’ is closed to new replies.