Jump to content
Sign in to follow this  
ryangangan

Help with post layout

Recommended Posts

ryangangan    0
ryangangan

I am more of a designer than doing some codes but I'm trying and I don't know what php commands are used on certain stuff. The lay out is something like this: post layout I assume that customising the layout is at template.postloop.php <div class="post-header fix <?php if(!pagelines_show_thumb($post->ID)) echo 'post-nothumb';?>" style="<?php if(pagelines_show_thumb($post->ID)){ echo 'margin-left:'.$thumb_space.'px';}?>" > <?php pagelines_register_hook( 'pagelines_loop_post_header_start', 'theloop' ); //hook ?> <div class="post-title-section fix"> <div class="post-date"> <?php the_time(get_option('date_format')); ?> </div> <div class="post-title fix"> <?php pagelines_get_post_title();?> </div> <div class="author_cat_bar" <?php ???????????????????????????; ?> </div> </div><?php if(pagelines_show_excerpt( $post->ID )): // Post Excerpt ?> <div class="post-excerpt"><?php the_excerpt(); ?></div> <?php if(pagelines_is_posts_page() && !pagelines_show_content( $post->ID )): // 'Continue Reading' link echo get_continue_reading_link($post->ID); endif; pagelines_register_hook( 'after_pagelines_excerpt', 'theloop' ); //hook ?> <?php endif; ?> </div> </div> <?php endif;?> <?php if(pagelines_show_content( get_the_ID() )): // Post and Page Content ?> <div class="entry_wrap fix"> <?php pagelines_register_hook( 'pagelines_loop_before_post_content', 'theloop' ); //hook ?> <div class="entry_content"> <?php the_content(__('<p>Continue reading »</p>','pagelines'));?> <div class="clear"></div> <div class="pemarmalink_share_comment_bar"> <?php ????????????????????????????; ?> </div> how to add the 'hi' image after the comment??? Where to place my links (pemarmalink, share, comment) after the post of my blog but won't appear on my other pages???

Share this post


Link to post
Share on other sites
timlinson    3
timlinson
Where to place my links (pemarmalink, share, comment) after the post of my blog but won't appear on my other pages???
Not quite sure what you mean. What other pages? The postloop is only for post pages. Find these 2 lines: `<?php` `endif; // End of Full-Width Post Area` and you can put your links right before those lines.

Share this post


Link to post
Share on other sites
ryangangan    0
ryangangan

Hi Tim, I added this after <?php endif; // End of Full-Width Post Area <div class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'pagelines' ), __( '1 Comment', 'pagelines' ), __( '% Comments', 'pagelines' ) ); ?></div> It's working fine on my blog page but when I go to my portfolio and about page, it says "comments off" Check it at redchimera.com And what are the php commands for my post to get the author, day, time and category as you can see on my post layout. Also the php commands for permalinks and sharing. This is the post layout I want to recreate....

Share this post


Link to post
Share on other sites
Kate    3
Kate

Hi Ryan, Regarding the "comments off": On those pages, are you sure you've enabled comments? On their edit screen, look for a checkbox that says "Enable Comments", and make sure it's checked.

Share this post


Link to post
Share on other sites
ryangangan    0
ryangangan

Hi Kate, I'm sorry, I meant to hide "comment off" in 'about' and 'portfolio' pages. I just want them on my blog page after the post. They seem to appear on other pages and I want them disappear. Thanks.

Share this post


Link to post
Share on other sites
ryangangan    0
ryangangan

Is there any easier way to place 'leave comment' under the post without appearing in other pages and without editing the template.postloop.php??? thx xx

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

Can't you just use the Template Setup to remove the comment section from the PAGE CONTENT AREA, but not from the SINGLE POST CONTENT AREA section respectively?

Share this post


Link to post
Share on other sites
ryangangan    0
ryangangan

Hi Adam, I tried but it didn't work. I think I used wrong post comment command in the template.postloop. which I think is not recommendable anyway. Can I use fuction instead to place the post-comment link under my post. I think I've seen some in the forum but I couldn't figure things out and I really have a hard time understanding hooks even though I watched the videos about it 4 times. I'm a quite dense. All I want is 'Leave a Comment' under my every post that won't appear on other pages. I used the function below that I've seen from other topic but it still shows from my other pages like 'About' function post_comments($content) { $content .= '[post_comments]'; return $content; } add_filter('the_content', 'post_comments');

Share this post


Link to post
Share on other sites
catrina    103
catrina

You'll need a different hook to add the "Leave a Comment" link to where you want it. Have you already seen the list of hooks under Settings > Template Setup > Posts Pages > Advanced Setup?


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
ryangangan    0
ryangangan

Hi, yeah I've seen that and I want it placed in pagelines_after_maincontent (or is it suppose to be pagelines_after_theloop) but how will I do it? what are the codes or commands used? I'm very confused :((

Share this post


Link to post
Share on other sites
cmunns    16
cmunns

You can do this using the `pagelines_after_excerpt` hook. Remember that you need to use the -Base child theme and add the hook to the functions.php file The code would be like this: ` add_action('pagelines_after_excerpt','sharethis'); function sharethis(){ //Add your content here; } ` Now this will place it at the end of the excerpt on the blog page....for adding to the single post pages you could use this hook `pagelines_loop_after_post_content` instead. ....what is the exact code you want to add?

Share this post


Link to post
Share on other sites
ryangangan    0
ryangangan

Hi Adam, The code I want to use is the post_comment but I just don't know how to construct it. All I know, is that I have to place it on the child theme. Lol. I've been searching ways to place comment link under my post in the forum for ages but everytime, they show on my other pages as well. What is exactly the code I have to use to have the post_comment after the post? Thanks so much....

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  

×