mo2007
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: query_posts in index.php is working, but single.php is NOT!!! helpok found the answer….basically I used the WP_Query where I can set my own query without effecting other pages. I done this for the index.php using this code:
<?php $selectedPosts = new WP_Query(); $selectedPosts->query('cat=-1&showposts=10'); ?> <?php while ($selectedPosts->have_posts()) : $selectedPosts->the_post(); ?>
I define a variable and set what I want to show and exclude. I used this for all 3 sections of the website that show certain posts from certain categories.
I then use the normal Loop in the single.php and IT WORKED!!! Thank GOD!!
Forum: Themes and Templates
In reply to: Creating a ‘Recent News’ sectionThere are plugins that does this for you…. you can find those on a lot of sites….here’s a few:
https://www.ads-software.com/extend/plugins/
https://wp-plugins.net/beta/
https://dev.wp-plugins.org/wiki/PluginDirectoryBut isn’t what you’re looking for is similar to recent posts….I would use query_posts php code to get posts from a particular category so whenever you post something to that category, it will show up.
Hope this helped ??
Forum: Installing WordPress
In reply to: Resetting the query_posts for a searchoh and I found a post here about stopping query_posts
Forum: Installing WordPress
In reply to: Resetting the query_posts for a searchsorry if I am not helping…but how did you do your single.php…I have a problem where I use 3 query_posts in the header.php to call 3 different category posts….but when I click on a post, it doesn’t show…my single.php is an exact duplicate of index.php which I think does not make sense to me because I am calling specific category posts, but this should not apply to single.php as it is supposed to only show the selected post.
hope u understood my problem…thanx in advance ??
Forum: Fixing WordPress
In reply to: Transferring wordpress site to a new hostdo you have the latest wordpress version?….if you do…you should see it
Forum: Fixing WordPress
In reply to: How to stop query_posts ?you see the 3 loops are in the header.php so it is seperated…which makes the single.php file have only one query_post
Forum: Fixing WordPress
In reply to: Transferring wordpress site to a new hostmaybe open the wp-config.php and change the details there…this file has the details of the database connection like username and password
you see you can import your new database through Manage -> Import -> WordPress…then Browse for the file
Hope this helped
Forum: Fixing WordPress
In reply to: How to stop query_posts ?am having a similar problem…..I have 3 sections of my website that use the query_posts:
<?php $posts = query_posts( "cat=8&showposts=1"); ?> <?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
what I needed appears on the front page. I also use it for my index.php to exclude categories that I don’t want to show, the problem is, how do I create my single.php
I tried copying everything in index.php and pasting it into single.php, but nothing happens. I have put
<?php wp_reset_query(); ?>
at the end of all the 3 sections….nothing ??any helps would be appreciated..thanx in advance
<?php next_posts_link(‘« Previous Entries’); ?>
<?php previous_posts_link(‘Next Entries »’); ?>i don’t know why, but the bold highlight didn’t work….jus ignore the for the ;
soz lol
I think you’re missing the “;” after the closing brackets.
Corrected code:
<?php next_posts_link('« Previous Entries')<strong>;</strong> ?> <?php previous_posts_link('Next Entries »')<strong>;</strong> ?>
Forum: Themes and Templates
In reply to: help with menu title!!!!!!!!!huh???Thanx, i’ve put the ul tags and it worked, but the blogroll links are displayed with their title. I want to hide this because I have already put the title as “Friends” manually in the DIVs of this menu.
Is there a way to hide the title leaving the list alone?
Thanx in advance
Forum: Themes and Templates
In reply to: help with menu title!!!!!!!!!huh???Thanx for that, now the list links are now have no style just like the other ones. My menu is in:
<div id=”menu”></div>
I have styled the #menu ul li in the css stylesheet, but no style is applied to this list. Another problem is that the blogroll which is <?php wp_list_bookmarks(‘title_li=’); ?> is not working.
Any suggestions…thanx in advance