Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • There isn’t a built it way to do this, however, you can accomplish this with a little change to a blog template.

    Here is what to do:

    • Create two pages for each individual blogs.
    • Create two categories with the same name as the pages
    • Copy the blog template and name it ‘multi-blog.php’
    • Open the template PHP file and change the title at the top to the new template. should look like

      /*
      Template Name: multi-blog
      */

      (this will make it show in the page templates)

    • Lastly we need to change the way it searches for posts. This is done further down in your new multi-blog.php file. Add the following two lines

      $query_string = “&category_name=”.$post->post_title;
      query_posts($query_string);

      before this line

      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

      It should look like this:

      $query_string = “&category_name=”.$post->post_title;
      query_posts($query_string);

      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    • Lastly, assign this new template to the your blog pages by editing the page.
    • Create posts under each category and they should show up blog.

    What this does is display any post where the category of the post and page name are identical. In theory, if you had two blogger who wanted to share a post you could select both categories and the post is shared in-between them. I find this nice simple solution to cross referencing products by manufacture, usage, etc… pages.

    Let me know if it worked for you! [email protected]

    try setting the permalinks in the settings.

    Thread Starter i3

    (@i3)

    No. Reinstalled fixed issue but generated anther.

    Re-installed using godaddy’s application installer and I cannot create new or update post bodies. Text in these fields do not get saved… only the title gets updated. Weird. probably a godaddy issue.

    Thread Starter i3

    (@i3)

    I previously disabled all the plug-ins. I am using the default theme. It’s just weird.

    I might go for a complete reinstall to see if it still exists. I’ll let you know.

    Add this to your stylesheet.

    “span.wpcf7-list-item { display: block; }”

    Thread Starter i3

    (@i3)

    Again, very little documentation.

    Have do you used it before because I cant figure it out.

    Forum: Fixing WordPress
    In reply to: Link Category Sort
    Thread Starter i3

    (@i3)

    Thread Starter i3

    (@i3)

    Okay… I figured it out for those of you interested…

    $cat_array = wp_get_post_categories($post->ID);
    
    foreach ($cat_array as $category) {
    
    	if (cat_is_ancestor_of(18, $category))  //Check to see if its an ancestor
    	{
    		// If ancestor do something
    		echo get_cat_name($category);
    	}
    }

    Thread Starter i3

    (@i3)

    I’ve looked at this function before but it doesn’t allow you to query categories based on a specific post. It allows you to use the ‘type’ parameter to return categories associated with post or links but not a specific post.

    Any other ideas out there. This can’t be that hard….???

    Thread Starter i3

    (@i3)

    Okay, here is what I did and how the relationship works.

    I setup the site up so pages are just pages. 4 of those pages list the products in different ways (manufacture, software, by type, by application). The products themselves are really posts. The page template was setup so it only displays posts where the page name and category match. (there is a category for every sorting method).

    What this does is allows me to create one product post which can be sorted based on how the viewer wants to look at it. Site users can approach what their looking for from different angles. (i.e “let me see all TVs” or “Let me see all products from a manufacture”. I thought this was quiet ingenious because it allows my customer to maintain their products as posts. My customer is not e-commerce site due to the complexity and cost of the products the sell so I didn’t really consider an advanced commerce type of system.

    So all said and done the sorting method works wonderful and the only kink in my plan is that loose page context when I viewer want to view the details of the product. I can’t build the context from the post because I don’t know which page “view” they came in through.

    – Is there a carry state (such as what page did I just come from) which I can build logic to rebuild the menu?
    – Is there an add-in would be better?

    Sorry for the book, but I hope it explains the “use case” for what I did, even if it wasn’t the best way of doing something.

    Thread Starter i3

    (@i3)

    test

    Thread Starter i3

    (@i3)

    esmi… here is the copy of the sidebar (Paste bin)

    —- DESCRIPTION —-
    to: esmi
    from: I3
    Re: Singlepost with menu on it???

    Using wordpress, how do you get a menu function to display the last menu when a single post is invoked. My problem is that when you click on the post in a defined page, WP executes the single post and WP looses “page” context. How does someone get around this? Is there a way to maintain state without having a user login?

    Forum: Fixing WordPress
    In reply to: Menu issue….
    Thread Starter i3

    (@i3)

    Yes. I created a new page and assigned this template to it. That’s how I found out it isn’t working.

    No, its not a top level page. But if I change the template for the page to default, the menu appears fine.

Viewing 14 replies - 1 through 14 (of 14 total)