adapting
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Previous Entries ProblemAfter intense google searches I have found an answer …
Using the following code to exclude categories 48, 50 and 49 seems to ensure that the previous and next entries links stop working
<?php query_posts('cat=-48,-50,-49'); ?>
The solution for my particular problem is the below code which still exclude categories 48, 50 and 49 and most importantly displayers older posts properly.
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-48,-50,-49&showposts=10&paged=$page"); ?>
Forum: Fixing WordPress
In reply to: Previous Entries ProblemMy original topic was edited because the code was too detailed.
My problem still exists: Whenever I use the “query_posts” function in a basic loop, the “previous entries” and “next entries” link don’t actually show previous entries – they just show what is on the index page.
My loop starts with:
<?php query_posts('cat=-48,-50,-49'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <!-- open post --><div class="post" id="post-<?php the_ID(); ?>">
And ends with:
<!-- close post--></div> <?php endwhile; ?> <!-- open post-nav --> <div class="post-nav"> <span class="previous"><a href="https://thevdo.com/test-2/"> <small><?php next_posts_link('<< Previous Entries') ?></small></span> <span class="next"><a href="https://thevdo.com/10-photoshop-secrets/"> <small><?php previous_posts_link('Next Entries >>') ?></small></a></span> <!-- close post-nav --></div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here. <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
An example of the problem can be seen at https://alanwho.com and https://alanwho.com/page/2/ where previous entries should appear, but don’t.
I ‘ve got a problem, no one else can help, maybe I should hire the A team?
Any members of the A team should post replies below:
Thank you
Alan.
Forum: Fixing WordPress
In reply to: Category Image in last 10 postsHi aklift!
From what I can establish you want to be able to have category images which are specific to specific categories …
There is a number of ways to do this.
One way is the create a hack in a “my-hacks.php” file in the root of your WordPress blog. Details of how to do this are at: https://www.alanwho.com/web-development/wordpress/category-images-hack
I hope this helps.
Forum: Themes and Templates
In reply to: The new theme viewer is launched!I love the theme viewer. I have some themes to add. I too, like Krivetsky, tried to contact the webmaster proceeding user registration, but still no reply. But if the webmaster is busy then I am happy to wait my turn …
Forum: Themes and Templates
In reply to: CSS layout helpJust found this post. There is a small but cool collection of CSS XHTML layouts at https://www.alanwho.com/web-development/css/7-css-xhtml-11-layouts. I have been using them a lot lately. The best 3 column liquid there is this one.
Forum: Fixing WordPress
In reply to: Splash page revisitedThere is also a guide to doing this at https://www.alanwho.com/web-development/creating-a-splash-page-for-wordpress. This method allows a splash page without the need to move the WordPress installation to another folder other than the root folder.
Forum: Fixing WordPress
In reply to: Splash page revisitedForum: Fixing WordPress
In reply to: Custom Loop ErrorsManaged to fix my multiple loops. For some reason things were not working with my previous query so I decided to work with the default loop from K2 using the following query at the top of each custom category loop:
<?php query_posts('category_name=Podcasts'); ?>
Forum: Fixing WordPress
In reply to: Custom Loop ErrorsHi Maerk
Thanks for the reply. I downloaded and installed the program.The code I am currently using in a custom loop is:
<?php query_posts('cat=4&showposts=4'); ?>
<?php while (have_posts()): the_post(); ?><h2 id="post-<?php the_ID(); ?>">
" rel="bookmark" title='Permanent Link to "<?php strip_tags(the_title()); ?>"'><?php the_title(); ?></h2><small>
<?php comments_popup_link('0 Comments', 'No Comments', '% Comments', 'commentslink', '<span class="commentslink">Closed</span>'); ?>
</small>
|
<small>
By <?php the_author(',') ?> in <?php the_category(', ') ?>
</small>
|
<small>
<?php if (function_exists('time_since')) {
echo time_since(abs(strtotime($post->post_date_gmt . " GMT")), time()) . " ago";
} else {
the_time('F jS, Y');
} ?>
</small><?php link_pages('Pages: ', '', 'number'); ?>
<!--
<?php trackback_rdf(); ?>
-->This is producing the error:
Parse error: syntax error, unexpected $end in /home/futcha/public_html/wp-content/themes/k2/theloop_casts.php on line 27
My knowledge of PHP is not great its pretty rubbish. But from looking at the above loop code I see no problem with quotes etc. Have you any ideas how I could change my PHP code?Forum: Themes and Templates
In reply to: Category Specific Posts In Specific Page AreasMan I am almost completely lost. I dont know php. I can see that the link – https://www.ads-software.com/support/topic/38046?replies=35 is relevent but not wholely. I see someone has been able to list posts by category. But I want a php call or query or whatever you call it to a specific category and a number of these on one page. All the links seem very complex solutions. I am sure what I want is fairly easy.
Does anyone have an exact coding example of what I am asking?
A coded example would be:
<div id="category1">
<?php some php call to some loop or category specific loop such as category 1?>
</div>
<div id="category2">
<?php some php call to some loop or category specific loop such as category 2?>
</div>Once again the link to a mockup of my dreams is at https://www.alanwho.com/mockup/
Forum: Themes and Templates
In reply to: Category Specific Posts In Specific Page AreasThanks for the reply. But there is a lot of information there that is closely related but not absolutely relevent. I am closer to understanding what I need in order to achieve the above.
I can now imagine it is pretty simple. All I need to do is edit the existing loop or create another one specifically for rendering set catgegories.
Anyone know the specific code, where to add it and how to reference it, to render a preset number of posts from a specific category in a PHP call?
Forum: Fixing WordPress
In reply to: xml css styleFor the record:
I found an XSL and associated files that achieve my aims above at https://66.249.93.104/search?q=cache:cSlWA8P7dVgJ:kpumuk.info/xslt/sorting-rss-feed-by-date-using-xslt/+wordpress+feed+xsl+stylesheet&hl=en&gl=uk&ct=clnk&cd=1.
The only edit on the WordPress wp-rss2 file is aroudn line 10 after the XML declation. Add:
‘
<?php echo ‘<?xml-stylesheet title=”XSL_formatting” type=”text/xsl” href=”rss.xsl”?>’; ?>
‘Forum: Fixing WordPress
In reply to: xml css styleYo,
Checked out the above links. I think I will need to do some learning on a later date. Is there definetly no CSS or XSL files designed specifically for WordPress RSS feeds online and available now?Forum: Fixing WordPress
In reply to: xml css styleCheers whooami. Currently checking them out.