WordPress.org

Ready to get started?Download WordPress

Forums

altering theme, can't edit CSS correctly (11 posts)

  1. martinellard
    Member
    Posted 7 years ago #

    I have just started to play with WP and have finally found a theme I like, I am modifying fspring theme and have added a links section in the side bar, I am not up on php hand coding so I found the section in another theme and pasted it, the CSS file has styled the links but has not given the same rollover effect and the links are not aligned the same as the rest of the 'cat' , 'archives' links.
    any ideas???

  2. martinellard
    Member
    Posted 7 years ago #

    Ok a couple more niggles,
    when I add pages for 'contact' and 'about' they appear as "contact" then "about". I want them the other way round but no matter what I do in my admin panel they won't swap. Alos on my MAC there's a little orange Icon next to the words, on my PC there is not ????????????

  3. onocrotalus
    Member
    Posted 7 years ago #

    If you look at your code, the structure of the sidebar is a set of unordered lists (<ul>). Each item in each <ul> is wrapped in <li> tags. The My Links section you added, though, doesn't have these <li> tags round each - add them in, and it should appear like the rest of the sidebar.

  4. martinellard
    Member
    Posted 7 years ago #

    Thanks for the help, problem is I added the links in the admin page online and they don't appear in the sidebar.php file, here's the code, do I have to just add the links in to the php file by hand and not through the admin page in order to get them to look right?.............
    &
    [code moderated]

  5. martinellard
    Member
    Posted 7 years ago #

    Forget the last post mate, I fixed it, I just put the

  6. tags inside the
      tags around the code calling the PHP file and it now works. THANKS. any ideas about the other niggles?
  • onocrotalus
    Member
    Posted 7 years ago #

    Good that it works - I think you could replace get_links with wp_get_links, if you want to alter its behaviour in the admin panel.

    As for swapping 'Contact' and 'About', I guess you'll need to change the order in which the links are called in your theme's header.php file.

  • martinellard
    Member
    Posted 7 years ago #

    not sure about how the links are called, here's the code from the theme (not too hot on PHP).....

    ' <title>
    <?php bloginfo('name'); ?>
    <?php wp_title(); ?>
    </title>
    <meta name="distribution" content="global" />
    <meta name="robots" content="follow, all" />
    <meta name="language" content="en, sv" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <!-- leave this for stats please -->
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>
    </head>
    <body>
    <div id="pages">
    <h1>"><?php bloginfo('name'); ?></h1>

      <?php wp_list_pages('depth=1&title_li=' ); ?>
    '

  • shadow
    Member
    Posted 7 years ago #

    You are missing a ul tag, so put that in first. Replace

    <li><a href="<?php echo get_settings('home'); ?>/blog/">Blog</a></li>
    <li><a href="<?php echo get_settings('home'); ?>/blog/?page_id=2">Downloads</a></li>
    <li><a href="<?php echo get_settings('home'); ?>/blog/?page_id=11">About</a></li>
    <li><a href="email address">Contact</a></li>
    </ul>

    with

    <ul id="topnav">
    <li><a href="<?php echo get_settings('home'); ?>/blog/">Blog</a></li>
    <li><a href="<?php echo get_settings('home'); ?>/blog/?page_id=2">Downloads</a></li>
    <li><a href="<?php echo get_settings('home'); ?>/blog/?page_id=11">About</a></li>
    <li><a href="email address">Contact</a></li>
    </ul>

    And then in your css

    add something like the following

    #topnav ul li
    {
    list-style: none;
    display: inline;
    }

  • martinellard
    Member
    Posted 7 years ago #

    Ok, cheers for the help, but I've used code for links from another theme and modified it, now it all seems to work dandy and I'm starting to add content to the site.
    thanks for all your help guys.
    here's the site http://itsmy-space.co.uk/blog/

  • martinellard
    Member
    Posted 7 years ago #

    OK i've added a plugin for the bottom of the page whichI have got workng fine and pretty much got it to match the rest of the theme....BUT on my MAC the footer sits fine but on my PC the footer section between the two dark lines sits about 1 or 2 pixels off to the left???? I've tried re-sizing the DIV's left and right and adjusting some of the margin and padding settings but nothing seems to position it correctly, any ideas.

  • martinellard
    Member
    Posted 7 years ago #

    Never mind, I found the problem, it's done, I've started posting content now.
    Cheers.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags