Hi,
Now my code is like this:
COPY CODE
add_action('bp_init', 'add_user_images', 2);
function add_user_images () {
if (bp_is_user()){
add_action('kleo_before_main_content', 'show_last_n_images', 99);
}
}
function show_last_n_images() {
$n = 5;
if( $user_id = bp_displayed_user_id() ) {
$model = new RTMediaModel();
$results = $model->get( array( 'media_type' => 'photo', 'media_author' => $user_id ), 0, $n );
if( $results ) {?>
<ul>
<?php foreach( $results as $image ) { ?>
<li>
<div class="rtmedia-item-thumbnail" id="foto-home-perfil">
<a>id ); ?>" title="<?php echo $image->media_title; ?>">
<img />id ); ?>" alt="<?php echo rtmedia_image_alt( $image->id );?>" />
</a>
</div>
</li>
<?php } ?>
<div id="ver-mas-fotos"><a href="/media">Ver más fotos</a></div>
</ul>
<?php
}
}
}
But it still shows the gallery in the top of the cover photo, and i need it UNDER the cover photo. I attach an screenshot.
Attachments:
You must be
logged in to view attached files.