ThemeShaper Forums » Thematic

[closed]

Creating two blogs

(17 posts)
  • Started 4 years ago by kbkisan
  • Latest reply from kbkisan
  • This topic is not resolved
  1. kbkisan
    Member

    Hi again,

    I'm trying to figure out some more issues regarding the Thematic Template.

    The thing is that I want to have "2 blogs" in the sense that in the menu there is a link to one blog that is the default wordpress blog that displays all categories minus one. This first blog is already working and I managed to exclude the category, but my problem is related to creating the link to the second blog in the menu. I want that second link to take me to a blog page that displays only 1 category, the one that is excluded in the other blog.

    The solution I am using now for the second blog is a plugin called Page Links To that basically creates a page that has a redirect to ?cat=3 and therefore takes me to the post overview for just this category. The problem with this is that the tab in the menu never has an "active" state when it is clicked. If I click any of the other pages they all have active states.

    I hope I am making my self clear here :) If not just ask and I'll try to explain better

    Thanks,
    Fannar

    Posted 4 years ago #
  2. kbkisan-

    You may find this discussion helpful.

    http://forums.themeshaper.com/topic/posts-inside-the-pages-and-subpages

    It demonstrates how to aggregate posts from a given category on a page. Using this method will enable the "current-page-item" class when on that page.

    -Gene

    Posted 4 years ago #
  3. kbkisan
    Member

    Hi Gene, thanks for this link, it is exactly what I need, I have been looking in the forums but hadn't found a solution. The only strange thing is that when I edit my posts, the new Page Template doesn't appear in the Templates drop down list, any idea why this is ?

    As a test I opened the archives.php file to change the Template Name to see it that would update in Wordpress and it doesn't either.

    Posted 4 years ago #
  4. kbkisan
    Member

    Not sure if this is problem is linked to Wordpress 2.8.5 ? because I have a local and online installation of wordpress 2.8.4 and the page template file work there and the template shows up normally, but it doesn't in this current version I'm working on which is 2.8.5. Any thoughts on this ?

    Cheers

    Posted 4 years ago #
  5. kbkisan
    Member

    Problem solved. I switched to the default template and then straight back to Thematic and the page templates started showing up.

    Thanks a lot for your help Gene.

    Posted 4 years ago #
  6. kbkisan
    Member

    One more question about this, the thing is that it is all working as according to the other post you linked to, except that when I click a title of a post that is in this second blog, the second blog tab stops being highlighted and the first blog tab gets highlighted instead.

    Posted 4 years ago #
  7. I'm having a hard time understanding the interaction here. If you have a live site in development drop a link and I'll take a look. Otherwise describe the steps that produce the problem in a bit more detail.

    Posted 4 years ago #
  8. kbkisan
    Member

    I have it installed on my hard drive so I don't have a link at the moment, so I will try to explain it as best as I can.

    I have a menu on the top that I want to include two links, COURSES and BLOG

    When the user clicks the COURSES it opens up a page that only displays posts from category nr. 3 which is called courses, and I want that COURSES tab to stay active in the post overview and on single posts in this category.

    On the other hand when the user clicks the BLOG link it loads a page displaying posts from all categories except nr. 3 , and I want the BLOG tab to stay active in this post overview and on single pages in this post.

    Now I have everything working except the fact that the COURSES tab doesn't stay highlighted when I enter into singe page of a post in there.

    Posted 4 years ago #
  9. Try using the dynamic body classes to style the tab active state. In this example, I'm assuming that the slug of the category is "courses" and the page-id for page you're using to show category-id 3 posts is "96" and that the style of the active state would match the default thematic style.

    .s-category-courses .page-item-96 a {border-bottom-color:#FFFFFF;}

    That should do it.

    -Gene

    Posted 4 years ago #
  10. Mmmh .. in addition the first blog tab should be set to non-highlighted.

    Btw.: The template thing is a known bug.

    Chris

    Posted 4 years ago #
  11. Thanks Chris- The template issue... is that A WP bug or Thematic?

    Posted 4 years ago #
  12. Hi Gene,

    this is a WP bug. Switching to the default theme and back helps as reported.

    Chris

    Posted 4 years ago #
  13. kbkisan
    Member

    Hi, I put in this and it worked like a charm !

    .s-category-cursos .page-item-30 a {border-bottom-color:#FFFFFF;}
    .s-category-cursos .page-item-6 a {border-bottom-color:#CCCCCC;}

    Thank you both Gene and Chris, I am really impressed by the Thematic theme and something tells me I am going to be using it a lot :)

    Take care and have a nice week

    Fannar

    Posted 4 years ago #
  14. kbkisan
    Member

    Gene, I hope this finds you, I have one question regarding the Page Template that displays the blog.

    This is the code I'm using to do it

    ` // Code to display category 3 with in my custom page

    function child_theme_custom_query() {

    if (is_page('30')) { // change '48' to the id # of your page

    $limit = get_option('posts_per_page');
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

    //change '4' to you category id # and change the value of $limit to the # of posts you want displayed per page
    query_posts('cat=3' . '&showposts=' . $limit=10 . '&paged=' . $paged );

    $wp_query->is_archive = true; $wp_query->is_home = false;
    }
    }

    add_action('thematic_above_indexloop', 'child_theme_custom_query'); `

    Is there a way that the page content and title get displayed before the blog entires ? I would like to show the title of the page and write a few lines in the content sections and then display the entries below it.

    Regards,
    Fannar

    Posted 4 years ago #
  15. kbkisan
    Member

    Figured out a solution by pasting this code into a copy of the index.php called index-cursos.php and I call this copy of the index for the Page Templated used for my page.

    <div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
        			<?php thematic_postheader(); ?>
        		</div>
    			<div class="entry-content">
    				<?php the_content() ?>
    			</div>

    The problem this give me is that the page title becomes a link, and I don't know how to disable that link

    Not sure if there is a cleaner way of doing this ? There probably is

    Posted 4 years ago #
  16. kbkisan

    Look at thematic_postheader() or even thematic_page_title() content-extensions.php either can be filtered for is_page('12') where 12 represents your page-id.

    But If you're going to change that much code, I would suggest removing and rebuilding the thematic_index_loop() with a conditional section at the top that includes the page header and content calls and then the custom query there. Reason being It'd be easier to keep track of all those edits in one function instead of tracking the changes across three functions.

    -Gene

    Posted 4 years ago #
  17. kbkisan
    Member

    Hi Gene, I think you are right about changing the the thematic_index_loop, but since I am not really experienced in coding could you give me a code example I could use for displaying "Page Title, and Page content, if the page is page nr. 30".

    Thanks in advance,
    Fannar

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.