magicwings
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Outputting more posts than I want it toUsing
arrayANDget_posts()both result in retrieving ALL posts in the category despite the'numberposts=5'condition.If I take out the
category=3then it retrieves just 5 posts (great) but they’re of course not from the category I’m after (bad).Why doesn’t this work, and is there a way around it?!
Forum: Fixing WordPress
In reply to: Outputting more posts than I want it toUpdate: If I take out
'category'=>3then it returns just 5 posts. Of course, they’re from all over the place, so it’s pretty useless.Why is it that the combination of category and numberposts doesn’t work?!
Forum: Fixing WordPress
In reply to: Outputting more posts than I want it toThe theme’s working fine now, after a fresh WordPress installation.
The page is now up at http://www.entertainmentcocktail.com/film.
I still have the same problem as previously stated.
Code:
<ul class="list2"> <?php $args = array('numberposts'=>5,'category'=>3, 'orderby'=>'post_date', 'order'=>'DESC', 'post_type'=>'post', 'post_status'=>'publish'); $latestnews = get_posts($args);?> <?php foreach ($latestnews as $post) : setup_postdata($post); { ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } endforeach; ?> </ul>As you can see on the page, it outputs ALL the posts in the category, despite what I change the
'numberposts'to.This isn’t affected by changing the variable to
'posts_per_page'.Is it a syntax problem or what?
Forum: Fixing WordPress
In reply to: Outputting more posts than I want it toThis web page has a redirect loop The web page at http://www.entertainmentcocktail.com/wp-admin/edit.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer. Here are some suggestions: Reload this web page later. Learn more about this problem. Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.This is getting worse and worse. Now I can’t access any of the admin pages or the dashboard.
Forum: Fixing WordPress
In reply to: Outputting more posts than I want it toI’ve changed the source code but it still shows all 9 posts.
Also for some reason now whenever I try to post/edit a post I receive a “404” error. This is driving me insane, but I’d rather just fix the page issues first and deal with the 404 issue later!
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesThank you so much for your help esmi, I’m well on my way to getting it finished 🙂
Currently it’s up at EntertainmentCocktail.com/movies, but there’s still one thing that isn’t working for me:
As you can probably see, I’m trying to have a list of “Recent Film News” on the left underneath the recent reviews box. I’ve managed to include exclusively movie-category news, but for some reason it wont limit it to just 8 articles.
My code for that section:
<ul class="list2"> <?php global $latestnews; $args = array( 'numberposts' => 5, 'category' => 3, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish' ); $latestnews = get_posts($args); ?> <?php foreach ($latestnews as $post) : setup_postdata($post); { ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } endforeach; ?> </ul>As you can see, I’ve made sure to use the
numberpoststag in the array (set to 5 so I can clearly see a difference when it’s working!) but on the website it’s showing all 9 (current) articles.What’s going wrong?!
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesDefinitely more important that they all contain the same data from the same database and tables, so I’m happy to sacrifice the subdomain restructure idea.
As it stands, going back to my original question (now slightly rephrased), if I wanted to have three new pages – “Movies”, “Gaming” and “Music”, each with their own riff on the original theme, would it be as simple as coding a new stylesheet and PHP pages linking to the database and adding them as links on the original site or is there something more complicated that I’d have to do?
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesSo is there any way of achieving what I’m after?
Even if it’s just a page, would I just need to create a .php template/page and add it as a link that is effectively a hub for all the posts of a category, as well as having it’s own theme by loading a separate CSS file?
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesOr subfolders? It’s irrelevant where they are, I just want effectively different installs on the same domain with the same database, user data, post information etc. They don’t have to be in subdomains, it’s just so I can customize the themes per category and effectively have a site per category all linked up to the main site which is an amalgamation of all three.
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesI’ve had a look, it just seems like having multiple unique blogs.
As a user experience, I’m aiming for the readers to not realise they have left the original site, and when they are sent to the different sections they only have subtle changes that identify them. All the user details and post details remain unchanged.
This means that the main website will have ALL the posts, while each separate section will have their own category-specific posts (defined by editing the theme files).
If this is possible using WordPress MS, how would I go about doing that, or is it automated in the MS install?
Forum: Fixing WordPress
In reply to: Multiple WordPress sites, same tables/databasesThank you for that massively quick reply!
I wasn’t aware MultiSite works all from the same tables? I thought it was just for having multiple defined WordPress installations on the same domain?
Will take a good look, thanks again Esmi!