Jump to content
Sign in to follow this  
wpfun

Recent posts, Recent Comments in Featured Boxes on Home Page.

Recommended Posts

wpfun

Hello, Is there any chance i could make the 3 featured boxes display stuff like this: 2r5es7a.jpg Thanks in advance,

Share this post


Link to post
Share on other sites
Andrew

yes, anything is possible. Something like this would require expert-level custom php though.. are you up to it? Did want to go the shortcode route or the php route?

Share this post


Link to post
Share on other sites
wpfun

Can you guide me a bit? I guess that i can't add any PHP code to the Featured Panel in Admin Panel? Where exactly should i start adding some code?

Share this post


Link to post
Share on other sites
wpfun

Oh, and btw, did you think guys about coding some built-in theme widgets like: Recent Posts (with thumbnails) Popular Posts (with thumbnails) Some competitive theme designers have them in their themes and its pretty cool. What do you think about it? :)

Share this post


Link to post
Share on other sites
wpfun

One more question: How can i make the feature boxes to execute PHP scripts?

Share this post


Link to post
Share on other sites
Andrew
How can i make the feature boxes to execute PHP scripts?
The current versions of the themes can be modified slightly to work with shortcodes.. want to try and make the mods? (future versions will have this by default)
Oh, and btw, did you think guys about coding some built-in theme widgets like: Recent Posts (with thumbnails) Popular Posts (with thumbnails) Some competitive theme designers have them in their themes and its pretty cool. What do you think about it? :)
Yes, we'll be adding this at some point. Its as easy as adding a custom widget to our framework.

Share this post


Link to post
Share on other sites
wpfun
The current versions of the themes can be modified slightly to work with shortcodes.. want to try and make the mods?
Sure, I will really appreciate some help.
Yes, we'll be adding this at some point. Its as easy as adding a custom widget to our framework.
Cool! :)

Share this post


Link to post
Share on other sites
akuefer

Really need to add the latest posts to one of those feature boxes... how can i twist the code to allow php? Thanks!!!

Share this post


Link to post
Share on other sites
akuefer

found out how to include shortcode:

In the template_fboxes.php file that's in the pro folder I replace <div class="fboxcopy"> <div class="fboxtitle"><?php echo $fbox['title'];?></div> <div class="fboxtext"><?php echo $fbox['text'];?></div> </div> with.,.. <div class="fboxcopy"> <div class="fboxtitle"><?php echo do_shortcode($fbox['title']);?></div> <div class="fboxtext"><?php echo do_shortcode($fbox['text']);?></div> </div>

Share this post


Link to post
Share on other sites
wpfun

Thanks! Could you please share the code you used for displaying lastest posts? Regards,

Share this post


Link to post
Share on other sites
wpfun

Well, I read whole bunch of this stuff, but I'm at the newbie lvl to the PHP thing. :( Any chance to help me a bit more detailed? Thanks in advance,

Share this post


Link to post
Share on other sites
Andrew

doing this type of stuff isn't really too simple. Did you look for a plugin to help? Here is the code we use on the pagelines homepage: ` <?php foreach(get_posts('numberposts=3&offset=0') as $key => $post):?> <?php setup_postdata($post);?>

  • <?php if(has_post_thumbnail()): ?> <?php the_post_thumbnail(array( 35, 35 ),array( 'class' => 'list_thumb list-thumb' ));?> <?php else: ?> pagelines-65x65.jpg <?php endif;?>
    <?php echo $post->post_title; ?> <?php the_date(); ?>
    <?php the_excerpt(); ?>
  • <?php endforeach;?> `

    Share this post


    Link to post
    Share on other sites
    wpfun

    Thanks guys for all the tips: First box working! :)najnowsze.png

    Share this post


    Link to post
    Share on other sites
    wpfun

    Update... Made all three boxes work :)udalo.png Thanks again,

    Share this post


    Link to post
    Share on other sites
    Jackey

    @wpfun How exactly did you made that into a shortcode?

    Share this post


    Link to post
    Share on other sites
    wpfun

    @jackey Well, I was killing the code for several hours :) It's maybe not 100% valid or so, but I'm not a specialist. It just does what it should. I placed some code to functions.php 1st box - Recent Posts: http://pokazkod.pl/0d8d7691b95d4d7a464a8c4bb23359e5115735734b0d3a68c2 2nd box - Recent Posts from one category http://pokazkod.pl/a4359e07b3382c81bc29a8aca31fa81e39b998daf8881328bc 3rd box - Recent Comments http://pokazkod.pl/06ca321d544fd746e08c63f76deb537df2d6f43d9c8bd0e6c1 Btw. it would be so cool if someone from PageLines could just checkout this code and just highlight the invalid code. :) Regards,

    Share this post


    Link to post
    Share on other sites
    cmunns

    You can run it through a validator, also make sure you test it in multiple browsers...If it passes these two tests then it's probably valid. http://validator.w3.org

    Share this post


    Link to post
    Share on other sites
    wpfun

    Well, The point is, it shows several errors :x But it looks properly in FireFox, Chrome, Safari & Opera. :)

    Share this post


    Link to post
    Share on other sites
    cmunns

    Then you're probably fine...especially if it works in IE? Are you scared to test it there hahaa?

    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  

    ×