Jump to content
Sign in to follow this  
matador18

how to add a button below every post title on post lists and post search result lists page?

Recommended Posts

matador18

this is a question i asked month ago on pagelines lite version forum, and now i have upgraded to paid version. pls i am asking for help again now. ~~~~~~~~~~~~~~~~~~~ i could do this on platformpro easily, just added the code below pagelines_get_post_metabar() in the template.postloop.php file. but now on pagelines framework it didn't work any more because the template.postloop.php disappeared. i searched the forum again and again to find new solution for editing postloop, it seems can be done by add new postloop section, but don't know how. this is the code i need to insert: <?php if (function_exists('wpfp_link')) { wpfp_link(); } ?> this is the whole content of the section.php: <?php /* Section: newPostLoop Author: PageLines Author URI: http://www.pagelines.com Description: The Main Posts Loop. Includes content and post information. Class Name: PageLinesPostLoop Workswith: main */ /** * Main Post Loop Section * * @package PageLines Framework * @author PageLines */ class PageLinesPostLoop extends PageLinesSection { /** * Section template. */ function section_template() { //Included in theme root for easy editing. $theposts = new PageLinesPosts(); $theposts->load_loop(); } } how should i insert the code to realize a favorite button below every post title in lists page? pls help....i am newbie...not a programmer thanks in advance:) ~~~~~~~~~~~~~ the original post link is http://www.pagelines.com/forum/discussion/19951/how-to-add-a-button-below-every-post-title-on-post-lists-and-post-search-result-lists-page#Item_4

Share this post


Link to post
Share on other sites
Danny
Hi, What is this favourite button for and do, can you provide more information please.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
matador18
hi Danny, thanks for your response. this favorite button works as a vote, if click, the post will be counted and value added 1 so people can vote for more than 1 posts, directly on the post list page the plugin i am using is wp favorite posts, you can find it on wordpress.org hope there's enough info for you

Share this post


Link to post
Share on other sites
catrina
The file structure in PageLines Framework differs slightly from PlatformPro. Is the code you need to add some kind of PHP code?

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
matador18
hi, Catrina thanks for your response, yes it's php code, just one line: can you tell me where to put it into? thanks in advance

Share this post


Link to post
Share on other sites
Stefan
Hey there You can read more about adding custom code to your website here: http://www.pagelines.com/wiki/How_to_Add_Customization The PHP will have to be added via the child theme. Instructions are in the wiki above, but let us know if you encounter any difficulties!

Share this post


Link to post
Share on other sites
matador18
rangelone June 12 Thanks @rangelone This answer was Accepted. Unfortunately, support for this topic is only available for PageLines Framework 2.1.6. You should consider upgrading to the paid version in order to obtain help, or, you may engage one of our professional developers at http://www.pagelines.com/pros. ---------------- i asked this question for help and got above reply month ago, and i think it's reasonable to pay first, so i upgraded to pro version. now, i found still no body can help me. every body came into this post, asked a question, then disappear. no real conversation at all. i did some research on this at beginning and found i can't solve it by myself, then i came here for help and i said i am not programmer..... but all i get is just a link which can instruct me to work out by my self. but if i can work out just by reading that so easily, why i was bothering to go so long way to "obtain help"? No one really listen carefully at all, from one month ago till now.... frustrating!!! may be i misunderstand the forum support service for paid users ?it's in fact only to programmer? and i need to upgrade to plus membership first to get this help?

Share this post


Link to post
Share on other sites
Danny
Hi Matador, I think the best course of action would be to contact of one the PageLines Pros - http://www.pagelines.com/pros/

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny
Hi Matador, Add the following code to your child theme function.php file and the add favourites link will display on all posts, including search pages. [code]// ------- Adds WP Favorite Posts to excerpt ------- // add_action('pagelines_loop_before_excerpt', 'favourite_excerpt'); function favourite_excerpt(){ ?>

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
matador18
hi???Danny thanks for your code, it's cool....the link displayed on lists pages and single post now. no time to fully test, have to go sleep now. i will feed back more detail tomorrow. thanks again for your patience:)

Share this post


Link to post
Share on other sites
Rob
Let us know...

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
matador18
hi, there i need a little adjustment. how to make the favorite link display in excerpt? i saw there are two parts in your code, 1 to add link before excerpt and 1 before content but seems only the second part works. i unchecked all items under " full post content" setting in the Blog and Post tab, then the favorite link in search lists disappeared, though i kept all items under "Post Excerpt or Summary Handling" in the same tab checked.. in fact, i don't want to show the favorite link before content(), that make the link show on every page. Some page need show content but don't need the favorite link. looking forward to your help:)

Share this post


Link to post
Share on other sites
matador18
the favorite link is only for posts or post excerpts.....not for pages.

Share this post


Link to post
Share on other sites
Danny
Hi Matador, When you unchecked all the options in Full Post Content, did you then check the options in Post Excerpt or Summary Handling ? As I am sure the favourites were displaying in Excerpts.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
matador18
yes, i checked those, it's weird

Share this post


Link to post
Share on other sites
Rob
Matador, have you seen this? http://demo.pagelines.com/framework/theming/ It includes some info that you may find helpful.

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

Sign in to follow this  

×