Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #755

    If you link a picture to the slider with the same headline as the post, the search results in finding two things.

    One is the slider image and the other is the post.

    How to fix that???

    #32775

    How to change only the menu font to a cufon font and leaving the description font untouched?

    #32776

    Any hint to make a “4 recent Post’s” or “Most popular” Page and attach it with “Main Page Content” feature to the main page….??

    #32777

    Hey, to answer your questions individually:

    1.) You need to add a function to your functions.php file at the very end, do not touch any other code or things will break :) Copy this code to the end of the functions.php file:

    function JMD_Search_Filter($query) {
    if ($query->is_search) { $query->set(‘post_type’, array(‘post’, 'page', ‘portfolio’)); }
    return $query;
    }

    add_filter('pre_get_posts','JMD_Search_Filter');

    This function filters the search so only Posts, Pages and Portfolio entries will show up :)

    2.) Can you post a screenshot highlighting the “description text”? I don’t want to give you incorrect information :)

    3.) How do you want posts to be selected? By most commented / most recent? There are plenty of “related posts” plugins, I suggest starting by having a look through the WordPress Plugins Directory and seeing which plugins suit your needs :)

    #32778

    1.) This function is not helping. See for yourself. http://nurb.de/?s=launch

    One result is the picture from the slider or something, the second is the POST itself.

    See in the screenshot below how I added your function…

    2.) See in the screenshot below !

    3.) I need to detects the most viewed (popular) posts based on the views.

    I need to display this as a page so I can add it under “Main Page Options –>> Main Page Content” to be shown on the front page. NOT as a widget !! (Because if your page have a SIDEBAR or is the Portfolio Page you can’t display it in the mainpage…BUT WHY ???)

    Couldn’t find a plugin for that, all of them displaying as a widget or under a post itself, but not separated to display on the main page.

    See screenshot to No. 1, 2 and 3 !

    Screenshot : http://www.nurb.de/screen-shot.jpg

    #32779

    To No.2

    Example: http://www.berenice.me.uk/

    #32780

    Ok, I fixed No.1

    The problem was when I copied the function from above there was a false punctuation ” ‘post_type’ “.

    Look close at the ” ‘ ” & ” ‘ ” and you will see there is a difference. That caused the function to not work in the first place… :)

    Anyways No.1 is working now.

    Let’s conzentrate on No. 2 and 3 please.

    King regards

    Guido

    #32781

    Good to know that no 1.) is working – thought the function was correct but punctuation mistakes can crop up occasionally :)

    2.) To change the Cufon font replacement text to match berenice.me.uk open up header.php and find this code:

    $applyCustomFontTo = '#top h1, #top h2, #top h3, #top h4, #top h5, #top h6, #top legend, #top .sliderheading, .big_button strong, .dynamicFont';

    change it to:

    $applyCustomFontTo = '#top h1, #top h2, #top h3, #top h4, #top h5, #top h6, #top legend, #top .nav li a strong, #top #head .nav ul li a, #top .sliderheading, .big_button strong, .dynamicFont';

    3.) As I previously mentioned, there’s plenty of plugins capable of achieving this, have a look at the WordPress Plugins Directory.

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

The topic ‘Search result gives two similar results back.’ is closed to new replies.