Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Is it possible to have an event widget in multiple sidebar widget areas? And if so, can each show a different group?

    Thread Starter cdlenfert

    (@cdlenfert)

    Thank you for the follow up Tom. I’m currently running the site on local server (via MAMP). I could try to move it to a live server, but if there’s anything else I can try before going through that whole process, I’d love to give it a shot.

    Thread Starter cdlenfert

    (@cdlenfert)

    I see. Thanks for clearing that up.

    Thread Starter cdlenfert

    (@cdlenfert)

    I completely removed the commented sections of code and it worked.

    this is the final working query code.

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Portfolio&paged=$paged");
    global $more;
    $more = 0;
    ?>

    Thank you so much for all your help. I guess what I don’t get it why I’m able to use the HTML comment tags to remove the sidebar from the portfolio.php template file, but not comment out other PHP code with it. I’ll be more specific with commenting in the future and do some additional research.

    Thread Starter cdlenfert

    (@cdlenfert)

    Here are pastebins for:
    portfolio.php
    archive.php
    posts.php

    thank you for taking the time to look at this

    Thread Starter cdlenfert

    (@cdlenfert)

    I corrected the typo but I’m still having the issue. I’m not sure why it would have even pulled any posts considering the misspelling of the category name.

    I noticed the following code in the posts.php file in the them folder. This is the template used for the Blog page, which was working on the demo.

    <?php
    $limit = get_option('posts_per_page');
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('showposts=' . $limit . '&paged=' . $paged);
    $wp_query->is_archive = true; $wp_query->is_home = false;
    ?>

    It has references to post limits and paged variable. It’s a little over my head but maybe this could be modified to make my portfolio query work.

    Thread Starter cdlenfert

    (@cdlenfert)

    I’m admittedly a little confused myself. But I’ll try to clear things up.

    My Work page on the site uses the portfolio.php template
    – previous/next don’t work on this page

    Magazines and Portfolio category pages use the archive.php template
    – previous/next do work on these pages
    – I was able to make these work by changing the permalinks to default, after changing them back to custom permalinks they continue to work

    This was the original query code on the portfolio.php file

    <?php
    query_posts('category_name=Portfolio');
    global $more;
    $more = 0;
    ?>

    This is the current code i’m trying (but doesn’t work)

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Portfoilo&paged=$paged");
    ?>

    This is the code on the archive.php file that query’s the posts (very different)

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
     	  	<?php /* If this is a category archive */ if (is_category()) { ?>
    		<h1 class="pagetitle">LD <?php single_cat_title(); ?></h1>

    I think I understand what it’s doing, but when I tried using this in my portfolio.php file it fails to grab any posts.

    Thread Starter cdlenfert

    (@cdlenfert)

    I also read the following from this page:

    Usage Note

    Place a call to query_posts() in one of your Template files before The Loop begins. The wp_query object will generate a new SQL query using your parameters. When you do this, WordPress ignores the other parameters it receives via the URL (such as page number or category). If you want to preserve that information, you can use the $query_string global variable in the call to query_posts().

    Thread Starter cdlenfert

    (@cdlenfert)

    I was able to get the Previous Entries and Next Entries working on the Category Archive pages.
    I turned on the default permalinks (ugly is right for sure)

    I manually added a category list to my sidebar.php file.

    If you click on Services you’ll see the category list. Clicking on Magazines or Portfolio from the list takes you to the archive page for that category and the navigation works great.

    However when you click directly on the work page, the posts with a category of portfolio are pulled in correctly, but the navigation still doesn’t work. There seems to be an issue with the fact that the posts are pulled in on a portfolio template page vs. a category archive page.

    Perhaps I need to change the php code in the navigation on this template page to pull the correct posts. Maybe something more specific than what is there now.

    <?php next_posts_link('&larr; Previous Entries') ?>

    Thread Starter cdlenfert

    (@cdlenfert)

    vtxyzzy, thanks for the reply. I updated the code on my portfolio.php page to this:

    <?php
    if (is_home()) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("category_name=Portfoilo&paged=$paged");
    }
    ?>

    Should that be passing the $paged variable correctly? I’m still getting the same result so maybe I’m not putting it in right.

    I changed the permalinks to the defaults but soon realized that I don’t know how to get to my magazines archive page. Before I had a link of lenffertdesign.com/magazines but now how can I tell what it is? I tried using the widgets option to add a categories sidebar but that didn’t show up on any of my pages.

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