WordPress.org

Ready to get started?Download WordPress

Forums

Custom Community
How to put the "homepage-last-posts" on another page (7 posts)

  1. clem97
    Member
    Posted 1 year ago #

    Hello,

    The home page of my website is the "user activity", and not the most recent posts.
    But I would like to add at the top of my home page (at the top of "user activities"), the summary that appears on the default home page of custom community (div id="default-homepage-last-posts")

    Is it possible ?

    Thanks ! :)

  2. clem97
    Member
    Posted 1 year ago #

    Please ... ! :)

  3. konradS
    Member
    Posted 1 year ago #

    Hi clem97,

    you can create a blank child theme first with just a style.css (and dont forget to add the buddypress tag to make it work with buddypress ;)

    then create a home.php.
    copy all the content of the activity/index.php into it.
    save.

    then, after div class="padder" (should be line 17), copy this here:

    <?php $args = array( 'amount' => '3' );
    
    echo '<div class="default-homepage-last-posts">' . cc_list_posts($args) . '</div>';  ?>

    let me know if it works. konrad

    ** you can find the code above in core/includes/theme-generator.php from line 647 ;)

  4. clem97
    Member
    Posted 1 year ago #

    Thanks for your answer !

    This code shows the latest news, this is what I want to do ! ;)
    But I would like them to appear like this:

    http://www.casimages.com/img.php?i=130626104317664856.jpg

    Is this possible?

    Thank you

  5. konradS
    Member
    Posted 1 year ago #

    hi clem97, cannot access the image :(

  6. clem97
    Member
    Posted 1 year ago #

  7. konradS
    Member
    Posted 1 year ago #

    yes should be possible..

    what happens if you add / use the code above?

    you should create a page template with the structure of page.php.

    then simply add the code above before or after the h2 pagetitle (or remove the title entirely).

    hope this helps, konrad

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.