Jump to content
Sign in to follow this  
3rdstreet

Custom Posts Footer

Recommended Posts

3rdstreet

I would like to add the following PHP code to the posts footer, next to the social icons: <?php // For horizontal button: if(function_exists("tweet_button")) { echo tweet_button('3rdstmarketing'); } ?> <?php facebook_ilike(); ?> Where might I be able to include that?

Share this post


Link to post
Share on other sites
bryan-hadaway

Appearance > Editor > template.postloop.php Try adding it just below: ` <?php pagelines_register_hook( 'pagelines_loop_clip_excerpt_end', 'theloop' ); //hook ?>

Share this post


Link to post
Share on other sites
3rdstreet

Thanks Bryan, looks like that worked for the posts page. Unfortunately I need to put the custom footer elements on the single posts page, right next to the social icons. The image below will clarify: Fo3QB.jpg

Share this post


Link to post
Share on other sites
3rdstreet

Interesting use of hooks, I watched the entire video and managed to drop in the php code where I needed it using the posts hook. I know this is getting really picky, but are we able to put the "facebook like" and "tweet" in the same area as the social icons? I've tried multiple hook options and it appears to go either above or below that area. Link here: http://3rdstreet.com/wp/2010/12/12/intro-custom-wheels/

Share this post


Link to post
Share on other sites
bryan-hadaway

We'll start by taking more control over the widgets, update your functions.php to this: <div class="tweetw"> <?php // For horizontal button: if(function_exists("tweet_button")) { echo tweet_button('3rdstmarketing'); } ?> </div> <div class="likew"> <?php facebook_ilike(); ?> </div> and then add this to base.css: ` .tweetw, .likew{} .tweetw{} .likew{} ` Then update me and I'll go in and style it. Thanks, Bryan

Share this post


Link to post
Share on other sites
3rdstreet

All set Bryan, the PHP code has been added to the funstions.php (I replaced the code I inserted earlier). And I have added the classes to base.css (line 66). Thank you.

Share this post


Link to post
Share on other sites
cmunns

little css to match those new selectors: ` .tweetw { float: left; width: 102px; } .tweetw, .likew { left: 10px; position: relative; top: 82px; } `

Share this post


Link to post
Share on other sites
3rdstreet

Perfect, this is exactly what we wanted. Looks like the div collapsed once I removed the rest of the icons, but I figured a way around it. Thanks again.

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  

×