Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • @sigarett – I don’t have a solution to your problem with duplicate permalink names but if you want to use WordPress as a serious CMS you should take a look at Pods.

    The Pods developers are very active on forums and genuinely care about helping people make Pods work.

    I was having a similar problem with my own custom form & theme:

    • Ruled out javascript involvement
    • Ruled out <?php wp_footer(); ?>

    The solution ended up being the form field names:
    http://www.cabeeb.com/2009/09/posting-a-form-to-a-wordpress-page/

    I’m a noob too, but I had this problem myself and just figured it out. The post a comment belongs to is determined by the most recent post in the loop. On a normal page, no problem. There’s only 1 post to choose from.

    When you run another loop on that page, the comment thinks it belongs to the most recent post it saw, so it attaches itself to that page and that’s where you’re redirected to.

    Here’s what you’ve got (if I understand correctly):

    • Main Loop (the main one for the page)
    • Custom Loop (the custom query you created)
    • With “premium” being the last post displayed on the page.
    • Comments (which depend on the loop to determine where the comment belongs)

    Here’s how I fixed it:

    1. Start the loop and define a variable with the page/post ID. i.e. $thisPageId)
      <?php
      if (have_posts()) : while (have_posts()) : the_post();
      $thisPageID = get_the_ID();
      $thisPageID = 'p='.$thisPageID;
      ?>
    2. Run your custom loop & close it
    3. Run a third loop for that page/post ID before comments
      <?php
      $recent = new wp_query($thisPageID);
      while($recent->have_posts()) :
      $recent->the_post(); ?>
    4. Include comments as usual
      <div class="comments">
      <?php comments_template('',true); ?>
      </div>
    5. Close the “third” loop
      <?php  endwhile; ?>

    As for your issue with the comment posting on all posts and deleting other comments, I’m not sure about that.

    Maybe you included comments inside the custom loop somehow? Not sure…

    If you run the first loop, run the second loop, close both of them then run the third loop with comments inside, I think it will fix it all for you.

    Good luck.

    Did you change it so your unique post id is substituted for the “X”?

    This line:
    if ($thepostid!=0)
    basically says if the post (or page) id is not equal to 0. In other words, you are on a post or a page.

    Two parts of that line need to change for it to work the way you want:

    • The != needs to change to = (looks like I put two = signs before when I think it should be 1 = sign)
    • The ‘0’ needs to change to whatever the unique post id of the store page is.

    From what I know about the more tag, it can’t be done. Looks like you’d need to write a custom function and put it in the functions.php file.

    Didn’t mean to have the in there. This is what it should be replaced with:
    if ($thepostid==X)
    where X is the id number of the Store page.

    I’m no pro and tend to hack my way through stuff until I figure it out. This is how I accomplished what I think you’re asking.

    If the pages Checkout and Your Account are children of Store, they would appear on the store page.

    <?php
    $thepostid = $post->ID;
    if ($thepostid!=0)
    wp_list_pages('title_li=&amp;depth=1&amp;sort_column=menu_order&amp;child_of='.$thepostid);
    ?>

    You might want to look at the page id for store (find the id that shows up when you mouse over the page from the edit pages screen). Replace the line above:
    if ($thepostid!=0)
    with:
    if ($thepostid==<em>X</em>)
    where X is the id number of the Store page.

    Are you using an editor like Dreamweaver? If so, you can just select the theme folder and search (ctrl+F) for About Me then change it.

    If that doesn’t work for you, check the theme options – Log into the dashboard then mouseover Appearance > click the drop down arrow. If there’s Your Theme Options below the editor link, click it and see if there’s an option for you to change it.

    If there’s no option to change it, click “editor”. That brings up the theme editor. Your theme should be selected, but double check it in the top right corner > Then select the file from the list called sidebar.php or something similar probably.

    Once the file loads, click inside the text editor box and search (ctrl + f) for “about me” (quotes not necessary).

    If you don’t see sidebar.php at first glance, double check. It looks like the standard wordpress template files are sorted alphabetically first then extra files are sorted alphabetically after that.

    Thread Starter jasonmassengale

    (@jasonmassengale)

    I changed the ‘0’ in
    if ($cat->category_parent=='0')
    to $currentcat & the ugly way works beautifully.

    Thanks for the solution Michael.

    The above example worked when I copied your source code then added it to the styles on the page itself, not the stylesheet.

    The page I sent you earlier wasn’t the right one. This page should help you figure out how to work the css.

    Short Answer – It’s a theme issue.

    I’m kind of a newb at this stuff and definitely not a javascript pro, but I like Sons of Suckerfish. There’s a good explanation of how their rollover menu works and how to customize it.

    Try temporarily adding this to your stylesheet:

    #page-bar li li li {
    	float: left;
    	margin: -20px 0 0 142px;
    	}

    That’s how you move it with css & it’s not a real solution, just an example to point you in the right direction. Hope it helps.

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