Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter bozo83

    (@bozo83)

    OK, so I figured it out.

    In my attempts to make it compatable with the latest wordpress (getting the header image to work from the appearance menu, etc…) I had forgotten to add <?php wp_footer(); ?> to the footer, so the plugins were unable to place there code there.

    Silly me! All fixed now tho.

    Thread Starter bozo83

    (@bozo83)

    I figured it out! I changed the css file! That was easier than I thought.

    Thread Starter bozo83

    (@bozo83)

    It’s OK. I figured it out with the code below:

    <ul>
    <?php foreach((get_the_category($post->ID)) as $category) { ?>
    
    <?php $catVal = $category->cat_ID; }
       $IDOutsideLoop = $post->ID;
       global $post;
    $myposts = get_posts('category='.$catVal.'&numberposts=999&order=ASC');
       foreach ($myposts as $post) { ?>
         <li<?php if($IDOutsideLoop == $post->ID) { echo " class=\"current\""; } ?>>
         <a href="<?php the_title(); ?>"><?php the_title(); ?></a>
    <?php }; ?>
    </ul>

    Does anyone have any idea how I can make this link list look the same as the normal sidebar menu?! The one above is unformatted, so it looks different to the menu below it! Any one?! Cheers

    The code above is slightly wrong. Here’s a cleaner version of it:

    <ul>
    <?php foreach((get_the_category($post->ID)) as $category) { ?>
    
    <?php $catVal = $category->cat_ID; }
       $IDOutsideLoop = $post->ID;
       global $post;
    $myposts = get_posts('category='.$catVal.'&numberposts=999&order=ASC');
       foreach ($myposts as $post) { ?>
         <li<?php if($IDOutsideLoop == $post->ID) { echo " class=\"current\""; } ?>>
         <a href="<?php the_title(); ?>"><?php the_title(); ?></a>
    <?php }; ?>
    </ul>

    Does anyone have any idea how I can make this link list look the same as the normal sidebar menu?! The one above is unformatted, so it looks different to the menu below it! Any one?! Cheers

    Thread Starter bozo83

    (@bozo83)

    Well I fixed this problem myself. Thanks for your help anyway. Just incase anyone else is looking for help this is the code that I used

    <aside id="recent-posts-4" class="widget widget_recent_entries">		<h3 class="widget-title">Free Reads</h3>	<ul>
    <?php $my_query = new WP_Query('category_name=free-reads&showposts=10'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); echo '<li>'; ?>
    <a href="<?php the_permalink() ?>" rel="bookmark">
    <?php the_title(); ?></a>
    <?php endwhile; ?></ul><p></p>
    Forum: Fixing WordPress
    In reply to: Adding an anchor

    To create an anchor link go to html editing and where you want to link to type the following code

    <a name="top"></a>

    You can change top for anything, just make sure that this is positioned where you want to jump to.

    then you need to create a link, so in my above example I’m linking to the top of the page, so I’ll place the link at the bottom of the page like this:

    <a href="#top">Back to top</a>

    notice the “#” make sure that you always include that in the link, but not in the a name!

    Hope this helps

    Thread Starter bozo83

    (@bozo83)

    Hey thanks for your reply.

    The page you linked to about permalinks was sort of helpful, I was able to place a link for one of the posts, not all four tho?!

    I’ve pasted a copy of my secondry sidebar, and my functions.php on pastebin and the links are below. But I cannot paste a link for my site yet, as I design the sites on my laptop and get them perfect before I launch them.

    Sidebar: https://pastebin.com/bkymtw2T

    Functions: https://pastebin.com/j7GgjsxR

    Thread Starter bozo83

    (@bozo83)

    Oh, and is it possibly to make them look the same as the main widget menu? That’s not so important but would be cool.

    Oh, and the theme I’m using only has one widget, which is the menu for the rest of the pages. Thanks

Viewing 8 replies - 1 through 8 (of 8 total)