Forums

Simple question- how to add 'next', 'previous' and 'random' links? (3 posts)

  1. dinneenp
    Member
    Posted 3 years ago #

    Hi,
    My site is http://patrick.dinneen.com, I'm using Monotone for a pure photo blog.

    I want to add 'next', 'previous' and 'random' to the header area above the image. The logic being that this will save people having to scroll down if the image is large. I'd imagine the code is pretty simple...can anyone throw it at me?
    thanks,
    Pa.

  2. dinneenp
    Member
    Posted 3 years ago #

    update:
    In my header I want to add links 'random', 'next' and 'previous'with text for the link.
    This is my code-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php wp_title('«', true, 'right'); ?> <?php if ( is_single() ) { ?> Blog Archive « <?php } ?><?php bloginfo('name'); ?></title>

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <!--[if IE]>
    <style type="text/css">
    body { font-size:12px; }
    </style>
    <![endif]-->

    <?php
    if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
    wp_head();
    ?>
    </head>
    <body<?php
    global $vertical;
    //set vertical class or archive class, if needed
    if($vertical && !is_archive() && !is_search()) { echo ' class="vertical"'; }
    if(is_archive() or is_search()) echo ' class="archive"';
    ?>>

    <div id="page">

    <div id="header">
    <h1>/"><?php bloginfo('name'); ?></h1>
    <div class="description"><?php bloginfo('description'); ?></div>

    <ul id="menu">
    /<?php echo mysql2date('Y', get_lastpostdate('blog')); ?>/">archive /about/">about
    </div>

    <div id="content">
    <div class="sleeve">

    Thanks,
    Patrick.

  3. dinneenp
    Member
    Posted 2 years ago #

    I've managed to add previous and next, just looking for random now
    '<?php previous_post('%', 'PREVIOUS ', 'no'); ?>'
    '<?php next_post('%',' NEXT', 'no'); ?>'

Topic Closed

This topic has been closed to new replies.

About this Topic