Your Time:
Our Time:
← Back to discussions

Disabling links to Album and Artist Posts

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 3 replies, 3 voices, and was last updated 12 years, 4 months ago by Wajid Khan.

  • 2014-04-26 at 7:27 am
    Support Expired
    #3960
    vdiddy_dev
    Participant
    • Topics: 3
    • Replies: 4
    • Total posts: 7
    • Post count: 4

    Is there an easy option to disable links to Artist or Album posts from Artist or Album pages, respectively?

    In ideal scenario, albums or artists would populate the Albums or Artist pages, but they would not link to the individual album or artist posts.

    I’d prefer not to have to edit the individual page php files, as such edits would be lost with future theme updates.

    Thanks!

    2014-04-28 at 6:02 pm
    #3972
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Yes we will see if that can be added in the future updates to avoid going to individual I mean the single pages but confused about how you will be displaying the songs to the albums unless it goes to single page it won’t display the songs.

    2014-04-29 at 3:25 am
    Support Expired
    #3984
    vdiddy_dev
    Participant
    • Topics: 3
    • Replies: 4
    • Total posts: 7
    • Post count: 4

    Thanks for your response.

    The theme is being customized for what’s needed, and the artists/albums pages are only being used to show credits. If being used for production credits, and you’re not trying to tell a story about each artist or album, loading the individual page is unnecessary and undesired.

    It would be great to have that functionality in a future update. But, since we’ve got to do this the hard way for now, what code and files need to be edited to block this function?

    In the template_albums.php file, I’ve identified the following code as the possible section that needs to be edited to achieve it? Please advise.

    foreach( $audio_artist_name as $audio_artist_id){
    						$permalink = get_permalink(  $audio_artist_id);
    						$playlisttitle = get_the_title(  $audio_artist_id);
    						$audio_artist[]= '<a href="'.$permalink.'">'.$playlisttitle.'</a>';
    					}
    

    Thanks!

    2014-05-02 at 6:18 pm
    #4027
    Wajid Khan
    Keymaster
    • Topics: 5
    • Replies: 1543
    • Total posts: 1548
    • Post count: 1876

    You need to remove the coding as shown below in the template_albums.php file.

    Remove Code

    echo '<div class="hover_type">';
    echo '<a class="hoveraudio"  href="' .get_permalink(). '" title="' . get_the_title() . '"></a>';
    echo '</div>';

    and

    Find Code
    <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( __( "Permanent Link to %s", 'musicplay' ), esc_attr( get_the_title() ) ); ?>"><?php the_title(); ?></a></h2>

    Replace Code
    <h2 class="entry-title"><?php the_title(); ?></h2>

    Similarly you need to do that in the other templates wherever you want to achieve that option. If you have any doubts or need help we are available on Skype Support 🙂

You must be logged in to reply to this topic.