Jump to content

Different Navigation


OnlyHereForHelp

Recommended Posts

Hello!

I have a code in WordPress

 


<h1 class=" container single-entry-title"><?php the_title(); ?> </h1>

And i want to make navigation system, every page different like that, when i open up "Training Rooms" page then i want it looks like that:


<h1 class=" container single-entry-title"><?php the_title(); ?> <a href="?p=5">Page 1</a> <a href="?p=6">Page 2</a> <a href="?p=7">Page 3</a></h1>

And when i open up "Studio" page then i want it looks like this:


<h1 class=" container single-entry-title"><?php the_title(); ?> <a href="?p=8">Different page 1</a> <a href="?p=9">Different page 2</a> <a href="?p=10">Different page 3</a></h1>

 

 

Whole code look like this:


<?php
/**
* The Template for displaying all single posts.
*
* @package Fifteen
*/

get_header('single'); ?>

<h1 class=" container single-entry-title"><?php the_title(); ?> </h1>
<div id="content" class="site-content container row clearfix clear">
<div class="container col-md-12">
<div id="primary" class="content-area col-md-8">
<main id="main" class="site-main" role="main">

<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', 'single' ); ?>


<?php if ( (of_get_option('next-prev-posts') != 0 ) ) {
fifteen_content_nav( 'nav-below' );
}
?>

<?php
// If comments are open or we have at least one comment, load up the

comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template();
?>

<?php endwhile; // end of the loop. ?>

</main><!-- #main -->
</div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_sidebar('footer'); ?>
<?php get_footer(); ?>

I'm noob PHP scripter please help me :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.