Jump to content
Sign in to follow this  
kowski

Recent posts widget only showing the article pictures

Recommended Posts

kowski

Could anyone of you friendly guys help me getting anything done like this ? 1yCof.png to only show the "article picture" of the recent articles ?

Share this post


Link to post
Share on other sites
kastelic

Have you already found the plugin you want to use, you just need help configuring it? If there's an option to display the post's "feature image" then use that. You just have to go to edit your post and in the right sidebar click "set featured image".

Share this post


Link to post
Share on other sites
kowski

the this is that I haven't found a widget which can actually do that. could anybody help me with this ?

Share this post


Link to post
Share on other sites
kowski

Unfortunately these two didn't work like I was hoping to. Maybe someone got an idea how I could get a plugin like this here, with four sections: xIIx4.png

Share this post


Link to post
Share on other sites
kowski

Something else but related :) I got a slider widget for recent posts. How can I put it directly under the post content. I want to put it just beneath the facebook like button. NH1Ko.png

Share this post


Link to post
Share on other sites
catrina

According to the installation instructions, you can add the PHP code

<?php if (function_exists('rps_show')) echo rps_show(); ?>
to your theme using a hook. Since you want it to appear below your sharebar in the individual posts, you should use the hook
pagelines_after_sharebar

.


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
kowski

so I should insert the "hook" in the platformbase functions.php ? pagelines_after_sharebar. and the other code directly into the plugin ? <?php if (function_exists('rps_show')) echo rps_show(); ?>

Share this post


Link to post
Share on other sites
kastelic

Basically, the "hook" is a piece of code that resides within the theme and you use a function in functions.php to "hook into" that code, which means you are placing your code in that area within the theme. So its just the same as if you went into the theme where the hook is and typed in your code, but it allows you to put all your custom functions in one place that wont be overwritten. So what you want to do is write a function that targets the hook you want in functions.php, and within that function place the code that calls your plugin. Also, if you are writing your function, you will already be within <?php ?> tags, so you can remove them from your line of code to call your function. http://www.pagelines.com/docs/base-child-theme

Share this post


Link to post
Share on other sites
kowski

thanks for all this very detailed info. I watched the DOC for using hooks too, but just can't seem to get it right. sorry for that. would someone of you be so kind and show me exactly what to put where ? :) thanks for all your extraordinary help

Share this post


Link to post
Share on other sites
kowski

i did insert this just below another hook/filter: function rps_show(){ if (function_exists('rps_show')) echo rps_show(); } add_action('pagelines_after_sharebar', 'rps_show'); and got this error: Parse error: syntax error, unexpected $end in /var/www/web155/html/wp-content/themes/platformbase/functions.php on line 127

Share this post


Link to post
Share on other sites
timlinson

Paste your functions.php into something like http://pastie.org/ but I don't think you can name your hook function rps_show if your plugin's function is also called rps_show

Share this post


Link to post
Share on other sites
kowski

and how can this help me to find the mistake in the hook/function ? sorry but I'm completely new to this

Share this post


Link to post
Share on other sites
Kate

Hey Jakob, I believe he was suggesting you do that so that we could see it. Also, please take note of the last part of his comment. You may want to rename your function first.

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

Sign in to follow this  

×