• Mark

    (@encryptdesigns)


    Ok I asked this before regarding something else, but I’ll try my luck with a new post :o)

    ::::::::::::::

    Ok here is what I WANT to do:

    I post a show Today for NEXT WEEKEND. I want that show to get organized by date to fit in with the other current listings. Is there a way to sort by DATE or by CATEGORY ID?

    My thing is that I have a lot of SHOWS listed here:

    https://www.foxvalleyshows.com/new/shows.php

    I want to show visitors these shows AHEAD of time so they can plan on going to them. But say if someone wants another show posted between 2 existing shows? That makes me think that sorting by category ID is NOT going to work.

    So is there any way of sorting by the TIMESTAMP? I mean the data is there, as I will change the timestamp for each new post, so there has to be a way of using that data to organize the POSTS right??

    I did find this post:

    https://wiki.www.ads-software.com/?pagename=HowToChangeSortOrder

    But that only sorts the actual WP index.php page and not any other page. So you guys can see that I am definately trying to figure this out on my own, but nothing is working.

    I even took this code:

    $orderby=”date”; $order=’ASC’;

    and placed it on my shows.php page on top like this:

    <?php $orderby=”date”; $order=’ASC’; require(‘./news/wp-blog-header.php’); ?>

    But that didn’t work either.

    I am using this code under the Upcoming Shows section on all of my pages:

    <?php $posts = get_posts(‘numberposts=40&offset=0&category=1’); foreach($posts as $post){ ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    <?php the_content();} ?>

    I am using this code under the main section of my shows page:

    <?php $posts = get_posts(‘numberposts=40&offset=0&category=1’); foreach($posts as $post){ ?>

    <?php the_date(”,'<h2>’,'</h2>’); ?>

    <h3>
    <?php the_title(); ?>
    <br>
    <span class=”upcoming”>
    <?php the_excerpt(); ?>
    </span> </h3>
    <?php the_content();} ?>

    You can view the actual page here:

    https://www.foxvalleyshows.com/new/shows.php

    I am just trying to sort the listings better…

    -Mark

Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter Mark

    (@encryptdesigns)

    Is there a way to get rid of the “12 July”, “13 July”, “14 July” as I am currently using the Title of each post to display the date? But still use those variables on the form for organization purposes?

    Thread Starter Mark

    (@encryptdesigns)

    I think I got it. I just commented out these lines 352 and 353:

    // echo mysql2date($date_format,$entry->post_date);
    // echo "</p>n";

    Sorry, i forgot to mention that as with the original version, the list function needs a number limit to be defined. I thought I had looked for whitespace too…guess not.

    Just found this link: https://blog.idahocline.info/2005/07/04/near-future-posts-plugin/
    Could maybe be of help to you?

    Thread Starter Mark

    (@encryptdesigns)

    No biggie Amory. This works great though so far:)

    Now if I could only find out about this blasted Text Formatting thing. My main WP page (https://www.foxvalleyshows.com/new/news/) is right, but my “Upcoming Shows” section on the left hand side of my side doesn’t carry that formatting over:

    https://www.foxvalleyshows.com/new/index.php

    I have used Text Tile 1 and 2 and neither works for me. I don’t get it….any thoughts?

    Once I get one thing figured out then there’s another! Fun times ??

    Good link Idda, but I Amory’s works fine for me. Maybe I can include both of them? We’ll see…I’m not overly worried about that at the moment.

    I’m not sure how you relate Textile with themes? Is /new/index.php apart of WordPress or a file that includes wp-blog-header? At /new/news/ the content and style is based off of the default theme. Have you made your main template (new/index.php) into a theme?

    Thread Starter Mark

    (@encryptdesigns)

    Yes it is a file that includes the “wp-blog-header” file. And no I haven’t made the “new/index.php” a theme. Maybe I should? I am not sure if I need to. I was trying to avoid that if possible.

    I currently have a post open about getting the Custom Fields listed which when I figure out how to do then I probably won’t need the Textile stuff.

    Have you worked with Custom Fields much?

    I guess eventually I would like to have FORM that people online fill out that would go to a mailbox and I would use the feature in WP that allows you to email a listing (Writing by e-mail under Options >> Writing) and have it post to WP, then that would help me streamline this whole process and with a little Moderating from myself visitors will be able to make their own posts. Then I would view them and add them.

    Any light you can shed would be wonderful:)

    I don’t think you can email anything other than the title and content. I’m not sure still what textile has to do with anything? Textile is a plugin that I believe translates things like quotes to their html entities. When you access new/news/ – nothing you have done on the new/index.php is relevent. Everything from the /new/news/ directory is taken from your theme. So if you want to have people be able to have links to the categories etc.. then you should make a theme.

    Correct me if I’m wrong, but doesn’t the custom fields plugin require you to have the function within the loop? If so, then you will need to have the custom fields be included within the event-calendar function that I modified for you. Seeing that I have no idea how to accomplish this it may take awhile. I will check out C2C’s plugin though and see if anything can be used from that.

    Thread Starter Mark

    (@encryptdesigns)

    Yeah I will probably just end up adding the posts to my WP manually, no biggie!

    Textile I thought I could use to help format my posts. In one of my post I might have something like this:

    Tuesday, July 12th, 2005
    Where: Tom’s Garage
    Who: Open microphone w/ Pita from Unity the band
    Time: 9:30pm
    Cost: $5

    On my WP pages the posts were shown correctly, but when the data was pulled from WP to an external page outside of WP then the formatting was gone. So I was trying to figure out a different system instead of having to place the <br> tags and other HTML elements.

    Yes I believe you are correct. That is basically what my other post is about:

    https://www.ads-software.com/support/topic/38994

    I’m sure I’ll be able to get this and once I do then I think I’ll be ready to launch:D

    Are you opposed to continue posting each ‘field’ on a new line (date/were/who …)? The reason the <br /> tags are not showing up I believe is because eventcalendar is pulling the information straight from the database. Thus textile has no effect on the events_list function. I will ask the author of the plugin how to incorporate textile…

    Thread Starter Mark

    (@encryptdesigns)

    Ok cool about the Textile thing. Hopefully I can still use the custom fields as that would give me a little more flexibilty with things **crosses fingers**

    Thread Starter Mark

    (@encryptdesigns)

    I seen your post on the firetree.net blog, I made a comment there too about that and he must have erased my post. Oh well…hopefully he’ll answer yours:)

    Ooops mine was on the EC3 page, not the EC2 page as yours was;)

    Thread Starter Mark

    (@encryptdesigns)

    Any luck about incorporating Textile Amory?

    Not yet, no reply from the plugin author either.

    Thread Starter Mark

    (@encryptdesigns)

    I think I have it figured out through another post:

    https://www.ads-software.com/support/topic/39270

    Although I would like to get it working within the loop, but not a real big deal at the moment…

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Sorting Posts by Date or Timestamp?’ is closed to new replies.