ThemeShaper Forums » Thematic

[closed]

Add page link to search results?

(16 posts)
  • Started 4 years ago by whiteweazel21
  • Latest reply from whiteweazel21
  • This topic is resolved

Tags:

  1. whiteweazel21
    Member

    Hi, does anyone know how to add a page link to the search results?

    For instance, if I type Merlin in the search box, it takes me to the results, and displays only text. How could I add a link above the text so that someone could click on it from the search results and get to that specific page about Merlin?

    Posted 4 years ago #
  2. whiteweazel21
    Member

    Any ideas? I've tried searching the web with many various terms, but I can't seem to find any related material.

    I would like to somehow add a link to the bottom of each search entry that leads to the relative page. It seems rather simple but I've not found any leads...

    My other option would be to try Google Custom search. I think it will link pages the way I'd want them to link, but at the expense of having people on my site forced to see the Google Adwords Ads. That or pay $100 a year to remove the ads, which I can't justify at the moment..Also, Google's search is rather cluttered. I like the minimalist look of the default search, just need the directed links in there somehow.

    Would appreciate any help, links to information, or leads
    Thanks.

    Posted 3 years ago #
  3. whiteweazel21
    Member

    I tried making a faux "tags" inside my post with the links directing to the specific page. However, the search results remove links and just shows text, so that idea doesn't work.

    Is this a simple thing to do, or is it incredibly complex? Aside from the google search engine, are there any other similar options?

    Thanks

    Posted 3 years ago #
  4. whiteweazel21
    Member

    Is it as simple as editing the searchform.php? I've spent a lot of time searching, and tried to look at the searchform.php, but I am not sure how I could edit it or if I even need to (perhaps it is something else?)

    I've look at a few wordpress sites, and almost all of them have the search results linking to their respective page. I am thinking it is something relatively simple...

    Do people not answer because they are clueless about what I am asking? Or is this forum only for a small circle of developers who only help each other and ignore new people? I realize it is a public forum for a public theme, but I am really shocked and sad how unhelpful and unfriendly the community is.

    Posted 3 years ago #
  5. @whiteweazel21
    i dont think anyone is trying to be either unhelpful or unfriendly.

    "For instance, if I type Merlin in the search box, it takes me to the results, and displays only text. How could I add a link above the text so that someone could click on it from the search results and get to that specific page about Merlin?"

    isn't the title of the post already a permalink that links to the full post?
    can you provide a link to your site and i'll take a look and try to help

    Posted 3 years ago #
  6. whiteweazel21
    Member

    Hey Jonny, sorry I vanished without a word. It has been a very difficult month for me between work, my dad's surgery, the aftermath etc.

    The titles in the search results do not permalink to the "full post". Actually, most my page is comprised of pages and not posts. Could that be the reason, and is it possible to modify?

    Let me know if you are still around. So far I have been working offline because there is still a ways to go before I get the site online. I've never done it before, but if you'd be willing to take a look I'd try and get it up and running.

    Thanks,
    Michael

    Posted 3 years ago #
  7. "but I am really shocked and sad how unhelpful and unfriendly the community is."

    that is a touch insulting to the people who VOLUNTEER their time helping people with their thematic issues. so to echo jonny, no one is trying to be unhelpful or intentionally ignore you, but damn bro, sometimes posts get missed or buried b/c no one knows the answer.

    i don't totally understand what you are asking either (which could also explain why you didn't get any answers), b/c like Jonny there is already be a permalink to the post. the default search loop behaves almost exactly the same as the other loops in that unless modified it returns a permalinked title, the post meta, the post image, the excerpt and the post utility.

    i would probably start by removing all your functions from your functions.php file and seeing if that resolves the issue. you can then add them back piece by piece to identify what the problem is.

    also i came across this tut the other day that might or might not be helpful. i think google search is better at searching, but would agree with you that it is horridly ugly.

    http://tutorialzine.com/2010/09/google-powered-site-search-ajax-jquery/

    Posted 3 years ago #
  8. whiteweazel21
    Member

    Sorry, I was a bit frustrated...

    I just upgraded my hosting plan from one domain, so it will take 24 hours before I get access to the account and begin playing with trying to host the site.

    I am not sure why, but my search results just show unlinked white text from the page being searched. I tried deleting the functions.php and inserting a widget to the sidebar, but I get the same results. Could the problem also be from the style.css?

    Until I get the website up and running, the best I can do is this screenshot:
    http://img153.imageshack.us/img153/7273/34176171.jpg

    Could I have somehow messed up the permalinks in general? I must have done something wrong if permalinks show in the search results by default. Could it have anything to do with the way I have my pages and posts set up?

    Thanks,
    Michael

    Posted 3 years ago #
  9. ok... well knowing that permalinks do show up by default is a start. if you've emptied out functions and that doesn't solve it, then it almost has to be CSS. my first thought was that the title links are black by default.. and well your background is black. could they just be blending in?

    have you tried viewing the source or using getfirebug.com to examine if the post title actually appears in the source code? if it in the source code you can safely assume you are hiding it w/ CSS somehow. if not that i'd suggest starting from a clean/empty child theme until you isolate the problem.

    Posted 3 years ago #
  10. whiteweazel21
    Member

    Thanks for the help, it turns out when I deleted all the styling in style.css, the search does function properly. Perhaps I used "display:none" with adverse effect, or possibly something else, I will narrow it down and solve the problem.

    I have one more somewhat related question that has been bothering me. I've been wanting to display tags at the bottom of my pages in the entry-content for keywords/searching. I looked up two plugins that allow you to add tags to pages as opposed to posts, "TagPages" and "tags4page". With these installed (either or), I'm able to add tags to pages in the pages section of the admin console. However the tags themselves are not visible on the site/page itself. How would I go about actually making the tags display in the entry content of the related page? Would that be css related or would I be looking at more serious code?

    Thanks,
    Michael

    Posted 3 years ago #
  11. whiteweazel21
    Member

    I narrowed down the problem to the following line of code

    .entry-title {
    	display:none
    }

    It is stupid, I know, but bear with me as I am really new to this. Now the reason I had done this earlier because the entry title was messing up the layout on the majority of pages. So now my question is, is there any way to have the entry-title display only for the search page/function? All the other pages have page-ids, so it is simple if the search results had a page-id, but they do not.

    If I search for "merlin" I would get localhost/?s=merlin&searchsubmit=Search. So the search page has a dynamic url depending on what you type. Is there any way to disable the entry-content for all pages minus the search results page? Alternatively I suppose I could disable the entry content for all pages except the search results, however I have about 60 pages and am not familiar with how I would do that in an array, so my .css file would be even larger than it already is!

    Thanks,
    Michael

    Posted 3 years ago #
  12. don't you sort of need the entry title? just for general site navigation? how do you link to your posts if not w/ the title? whatever layout problem is being caused can probably be solved. what was the problem?

    also the type of 'conditional' css you are talking about pertains to thematic's dynamic body classes. body classes (classes on the body tag) allowed for increased specificity

    you could

    .entry-title {
    	display:none;
    }

    and

    .search .entry-title {
          display: block;
    }

    and the .entry-title ought to show on the search page. however, i am going to reiterate that you should probably keep the page titles. they are good for navigation (people expect to see them) and SEO.

    Posted 3 years ago #
  13. whiteweazel21
    Member

    Thanks Helga, I will give the .search .entry-title a shot in the evening. Perhaps I can get the website online tonight or tomorrow as well, just so I can give people a better idea of what I am trying to accomplish.

    The reason for not having page titles is because I am trying to emulate a faux real website, as opposed to a blog. I have a blog page, but I want the rest of the website to look like a standard html website. With the layout of the header and footer left pretty much untouched, there is relatively small space for content. I like the look because it keeps everything clean and simple all around. If I add titles, the content ends up getting skewed downwards, however I can see how it would not be the best option for SEO. Perhaps I could enlarge the content area subtracting from header and footer, and adjust the entry content font size, but at this moment I sort of like the look as is.

    Here is a screenshot of a product page:
    http://img151.imageshack.us/img151/4132/53735218.jpg

    I think that having the entry-title on a page like that would be unnecessary clutter and subtract from the overall look.

    I will still need to play with the tags a little. I found how to add tags to the sidebar via the tag cloud widget (which is not a bad option, although it seems to show all tags as opposed to tags particular to a certain page), is it possible to add the widget into the content? I suppose I would need to concoct some php code in the function to add a widget area into the content area correct? Then perhaps find a widget that allows page specific tags as opposed to global tags...

    Thanks,
    Michael

    Posted 3 years ago #
  14. whiteweazel21
    Member

    Also, I was thinking of adding breadcrumbs for navigation, perhaps that can fill in for SEO/Navigation. I haven't gotten really far into that procedure yet as it is seems rather complicated, probably will be one of my last steps.

    Posted 3 years ago #
  15. whiteweazel21
    Member

    Hey Helga,

    I implemented the code you suggested and it works great, thanks so much! I fixed the text color as well so that it doesn't blend into the black background. I will need to experiment with different plugins to optimize the search results, but other than that my search issues are over.

    Do you suggest I start a new thread regarding my tags question?

    Thanks

    Posted 3 years ago #
  16. whiteweazel21
    Member

    Apparently I am a genius, I figured out how to do the page specific tags, lol. (Kidding about the genius part :)

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.