Jump to content
WebIT

Featured Image On Search Results Template

Recommended Posts

WebIT

Is there a way to display the featured image as a thumb on the search page template in framework?

Share this post


Link to post
Share on other sites
James B

Hi there, you could use a hook/filter to do this. However this plugin might be easier, try it and if it doesn't work as expected let us know and we'll help you with the hook.

http://wordpress.org/extend/plugins/get-the-image/


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
WebIT

I'm guessing I add <?php get_the_image(); ?> to the search.php file? That's what I'm going to try.

Share this post


Link to post
Share on other sites
WebIT

Found this bit of code from a wp forum. Says to place in the search.php

[color=#000000][font=Consolas, Monaco, 'Courier New', Courier, monospace][size=3][background=rgb(243, 243, 247)]<div class="results">[/background][/size][/font][/color]

<div class="thumbs"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( function_exists( 'get_the_image' ) ) { get_the_image('width=150&height=150&image_scan=true&default_image=http://yoursite.com/default.jpg' ); } ?></a></div>

<div class="blogposts">

<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

<?php the_time('F jS, Y') ?> by <?php the_author_posts_link(); ?><br />

<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

</div>

</div>

Where should this go?

Share this post


Link to post
Share on other sites
catrina

search.php is the search form file WP provides in themes by default (located in the theme folder directories), but PageLines does not use this file since the structure is a bit different, adding that code to any of the PageLines files may not work. In this case, a different code solution may be needed.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
WebIT

James, or anyone know how to do the hook/filter method?

Share this post


Link to post
Share on other sites
James B

I'll check with one of the developers to see if there's an easier way to do this for you.

I can point you in the right direction to find the hooks api and the reference files but you'll need to know the correct PHP to enter to pull through the content. The code you've pasted above doesn't look like it would work inside the framework, as we'd have our own structure which would differ from the standard wordpress setup.

A list of the pagelines hooks can be found here http://api.pagelines.com/hooks.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
James B

Hi there, i've checked with the dev team. Apparently you can now add the thumbs automatically to the search page by checking a radio box in Pagelines>site options>blogs and posts. Scroll down to the 'thumbnail placement section', you'll see a radio box for 'search page'.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
WebIT

Great feature. Works wonderfully. Thank you! Resolved.

Share this post


Link to post
Share on other sites
Rob

The topic was marked as resolved.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • Jessica McCabe Lawson
      By Jessica McCabe Lawson+
      I'm building a product catalog site. The featured image is set correctly, but the woocommerce placeholder image is displaying instead. If I click on the placeholder image, the featured image appears, and the featured image works fine as a thumbnail.
      Please view the site here: http://www.directmat.net/product/power-lock-logo-mat/
      Note: I deleted the placeholder image via FTP to see if that would inspire Quick Shop to look for the featured image. No such luck. Please help!
    • Kedark
      By Kedark+
      Hello, I need help. Can and how to do it. I need to add more page appearance templates (page attributes). At the moment it's default and FRAMEWORK A, FRAMEWORK B etc. I need to add two more. How can I do this.
      Unfortunately, I did not find such a thread on the forum.
      Regards
      Radoslaw
    • dougalperman
      By dougalperman+
      Hi there,
      I'm a big fan of Pagelines, and have been for years.
      I'm trying to control the size of video embeds and having some difficulty. I see that I can just paste the Vimeo video URL into the post and an embed widget will automatically appear, which is great. But the embed box created is much taller that the video (689 x 1000 pixels) so the content sits in the middle of a tall black box, which looks awkward.
      I tried using the full iFrame embed code from Vimeo, which solved the disproportionate embed frame size (or aspect ratio) issue, but despite specifying the dimensions I want (690 x 388), the videos displayed on the post are sized at 300 x 150 pixels.
      I can't work out how to change either.
      I'm using the latest version of Pagelines Framework (Pro) with the Agency them.
      Any help or advice very much appreciated.
      Thanks,
      Dougal
    • globalnative
      By globalnative+
      Hi there!
      I'm trying to create a featured image for my new blog post. It has text in it, and when I add it as a featured image some of the text is cut off on the right.
      Could I get the ideal dimensions for featured images? Or, a way to customise the dimensions so that they are easier to fit in the way I need?
      Thank you kindly
      Nate
       


    • BlueSkyCreative
      By BlueSkyCreative+
      Hi there
      I have postgrid on a new site I am developing and want to try using png images as a featured image, but they are rendering on the page as a black square?
      Any ideas as to why? 
      the site example is here http://orionglobalms.com/ scroll down to our services section and the first one has a png image as a featured image
       
      Many thanks
      Paul

×