bozo83
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Theme no longer compatable (I think?!)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.
Forum: Fixing WordPress
In reply to: List post titles in sidebar on single pageI figured it out! I changed the css file! That was easier than I thought.
Forum: Fixing WordPress
In reply to: List post titles in sidebar on single pageIt’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
Forum: Fixing WordPress
In reply to: List post titles as links in sidebarWell 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 anchorTo 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
Forum: Fixing WordPress
In reply to: List post titles as links in sidebarHey 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
Forum: Fixing WordPress
In reply to: List post titles as links in sidebarOh, 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