imageworks002
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Moesia] Call to action button disappearsThanks vladff for the fix – but can you help an absolute newbie know where to post this code? Thanks
Forum: Fixing WordPress
In reply to: Page Id Mysteriously Showing Up At Top of PageI think that’s right. I accidentally uploaded an old file w/ some debugging in it. Replaced it w/ the new file and all is good. Lesson learned. Thanks.
Forum: Fixing WordPress
In reply to: How to create 2 separate Blog pages on website?After finding this post and having the same problem, I came up with a better way to do it.
You want to look at this page first.
http://codex.wordpress.org/Template_Tags/query_postsThen you want to add code similar to this at the top of your index.php file
<?php /** * @package WordPress * @subpackage Default_Theme */ //The Query $whichcat=$_GET["cat"]; if ($whichcat==blog) { query_posts('category_name=Blog'); } else if ($whichcat==recipe) { query_posts('category_name=Recipe'); } else {} get_header(); ?>Then, just add
&cat=blogto the end of your url, and it will pull only posts categorized as “blog”.You’ll have to have navigation that has hardcoded links, so you can build them properly.
Obviously, if someone where to remove that part of the query string, it would mess up your page, but all that would happen is that it would show both categories instead of one, which isn’t much of a downside. Of course someone could link to you this way, and you would end up getting a lot of visitors coming to the wrong link. I’m sure there are some people who are better at PHP who could improve on this method.