Using a page-template (php) to change link colors

  • Unknown's avatar

    Hi All

    I am trying to create a set of page templates whereby the links on those pages are coloured differently from the rest of the site.

    I have successfully cloned the default page template, and inserted the modified template page name. This has been uploaded and is being accepted as a valid template file for all pages for the attribute side menu.

    I am also successfully able go to the Editor, and select the the page template for editing.

    My question is this: what code, and inserted where, is needed to override the default link colours?

    My code looks like this:

    <?php /* Template Name: Page - Calendar */ ?>
    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="mh-wrapper clearfix">
    	<div class="mh-main">
        	<div class="mh-content <?php mh_content_class(); ?>">
        		<?php mh_before_page_content(); ?>
    				<?php get_template_part('content', 'page'); ?>
    			<?php endwhile; ?>
    				<?php get_template_part('comments', 'pages'); ?>
                <?php endif; ?>
            </div>
    		<?php get_sidebar(); ?>
        </div>
        <?php mh_second_sb(); ?>
    </div>
    <?php get_footer(); ?>
  • Unknown's avatar

    Hello,
    Unfortunately, this isn’t the right WordPress forum to help with that. This forum is for blogs hosted here on WordPress.com. There’s another forum for blogs like yours that are hosted elsewhere using WordPress software. Please repost your question at: https://wordpress.org/support/

    If you don’t have a username at that forum, you’ll need to register before posting.

    For more information about the differences between WordPress.com and WordPress.org, visit: http://en.support.wordpress.com/com-vs-org/

  • The topic ‘Using a page-template (php) to change link colors’ is closed to new replies.