Before you ask please READ THIS

A selection of albums for the frontpage

edited February 2013 in Hypershot Posts: 58
Hi Air,

it's me again. ;)

I want to show only certain albums on the frontpage and all albums on a separate page. Possible?

I can mark albums as background only, but then they won't be seen on the frontpage and (!) on the separate page.

The perfect solution would be a function to show only a certain genre on the frontpage, but that's not possible atm.

Thanks in advance,

Marcus
Post edited by Mgatzke on

Comments

  • AirAir
    Posts: 10,970
    Hello

    Why it is not possible? This is exactly what you should do :-)
    Here is how to create genre http://apollo13.eu/docs/hypershot/#!/adding_album_adding_multiple_albums_list and link it

    However I don't know how to link this genre page to be frontpage. I am afraid it would require harder customization. If you are OK with it, then you will have to prepare your genre for front-page, run child theme(if you wish to still have painless updates), and then come back to me with link of your genre.

    How to run child theme(you probably will have to setup your menu again): http://apollo13.eu/docs/hypershot/#!/modification_of_theme

    If I have your FTP and WP access data I can do it my self, but still will describe it here:-)

    With regards.
  • edited February 2013 Posts: 58
    Your are great. Here it is:

    http://iso500.de/archives/genre/frontpage

    I would rather like to do it myself. That way I learn more.

    But anyway shouldn't that be included in the next update? I think many people would love to show only a certain genre on the frontpage.

    Thanks for your help,

    Marcus
    Post edited by Mgatzke on
  • AirAir
    edited February 2013 Posts: 10,970
    Mgatzke said: But anyway shouldn't that be included in the next update? I think many people would love to show only a certain genre on the frontpage.
    You are first asking about it, and next update(if any) is far in future, as for now I am fixed at preparing new theme.

    Lets go!
    1. Copy front-page.php and albums-list.php to child theme.
    We are going to edit files in child theme.

    2. In front-page.php line ~45 change
    elseif($fp_variant == 'albums_list'){
    get_template_part( 'albums_template' );
    }
    to
    elseif($fp_variant == 'albums_list'){
    define('A13_GENRE_CALL', true);
    get_template_part( 'albums_template' );
    }
    3. In albums-list.php line 34 before if($genre_template === true){ you have to add this code

    if(defined('A13_GENRE_CALL')){
    $args['genre'] = 'frontpage';
    }
    frontpage is slug of your genre you wish to see on front page. If you would like to change to other genre, you can find slug in My Albums -> Genre

    Hope you can make it:-)

    With regards.
    Post edited by Air on
  • It's just exchanging and adding lines. But... it doesn't work.

    You just need an admin access you said? Can I PM it?
  • AirAir
    Posts: 10,970
    Turned off all caching plugins? Yes you can send it to me, meanwhile I will test it on my demo page.

    With regards.
  • AirAir
    edited February 2013 Posts: 10,970
    Sorry there was mistake. In front-page.php, change added line to define('A13_GENRE_CALL', true);
    I have fixed previous code.

    With regards.
    Post edited by Air on
  • Great, works.

    Coffee and Cake for Air. :)
  • AirAir
    Posts: 10,970
    That is great:-)
    Mgatzke said: Coffee and Cake for Air.
    Haha ;-) Thanks a lot!

    With regards.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!