Forum Replies Created

Viewing 15 replies - 151 through 165 (of 178 total)
  • Thread Starter buskerdog

    (@buskerdog)

    Thanks a bunch! I should have thought of that myself.

    Thread Starter buskerdog

    (@buskerdog)

    Here’s the fix for that:

    Open the template-functions-post.php file in wp-includes and find this line:

    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';

    Change it to
    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '">' . $title . '</a>';

    That removes the title tag from the a href and gets rid of the validation errors.

    Thread Starter buskerdog

    (@buskerdog)

    A very initial test shows that that works. And it shouldn’t mess up permalinks because those use the post slug, right? The only downside is that you’d need to use custom fields or some other method if you want the page title to appear as text anywhere.

    Cool!

    Thread Starter buskerdog

    (@buskerdog)

    I wouldn’t. I would whip it out in Photoshop in about 45 seconds. A lot faster than changing the CSS layout of a bunch of divs.

    But do you have a different suggestion?

    Thread Starter buskerdog

    (@buskerdog)

    Try using custom fields instead.

    Thread Starter buskerdog

    (@buskerdog)

    This was not a full fix but I at least was able to format the date in a slightly more pleasing way by truncating the time off it:

    in wp-includes folder find templates-functions-general.php and loook for the
    } elseif ( 'postbypost' == $type ) { section which formates that post by post archives results.

    This is what I changed it to (I don’t remember how much of it I changed so compare to your file:

    =====START OF CODE=====

    } elseif ( ‘postbypost’ == $type ) {

    $arcresults = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_date < ‘$now’ AND post_status = ‘publish’ ORDER BY post_date DESC” . $limit);

    if ( $arcresults ) {
    foreach ( $arcresults as $arcresult ) {
    if ( $arcresult->post_date != ‘0000-00-00 00:00:00’ ) {

    $shortdate = $arcresult->post_date;
    $dateresults = $wpdb->get_results(“SELECT DISTINCT YEAR(post_date) AS ‘year’, MONTH(post_date) AS ‘month’, DAYOFMONTH(post_date) AS ‘dayofmonth’ FROM $wpdb->posts WHERE post_date = ‘$shortdate'” . $limit);

    $date = sprintf(“%02d-%02d-%d”, $dateresults->month, $dateresults->dayofmonth, $dateresults->year);

    $url = get_permalink($arcresult);
    $arc_title = $arcresult->post_title;
    if ( $arc_title )
    $text = strip_tags($arc_title, $date);
    else
    $text = $arcresult->post_title . “title”;
    echo get_archives_link($url, $text . ” (” . substr($shortdate, 0, -9) . “)”, $format, $before, $after);

    ====END OF CODE====

    The most important part is the substr($shortdate, 0, -9) near the end since that shaves the last 9 digits off the results getting rid of the time. Now my archives look like this: http://tinyurl.com/ze6xd which is not what I wanted but is acceptable.

    Thread Starter buskerdog

    (@buskerdog)

    Forget it. I dumped Editor Monkey and told him to use FireFox. Why overcomplicate things?

    Thread Starter buskerdog

    (@buskerdog)

    Thanks. I was missing a
    <ul> and it was wreaking havoc. The other problem I had was that using an excerpt inserts < P > breaks and that was causing problems. I switched to custom fields but I’d love to find how to remove the < p >s from excerpts. I’ve scoured the code but can’t find it.

    NOTE: Could you remove the URL from your post? I don’t want the thread to appear on google searched for the URL (hence the redirect I used)

    I don’t know if this will help but this site has the static homepage plugin: http://tinyurl.com/zrtv2

    But it’s not really organized as a blog. It’s all Pages.

    Thread Starter buskerdog

    (@buskerdog)

    I haven’t solved this. I did however figure out how to truncate the time off it with substr($date, 0, -9) but the date still shows as 2006-08-24 which isn’t what I want. Any thoughts.

    I just made it SORT OF work: You can see it here http://tinyurl.com/ze6xd

    I created a second variable just to try to use the basic post_date return and it did work:

    $shortdate = $arcresult->post_date;
    echo get_archives_link($url, $text . " (" . $shortdate . ")", $format, $before, $after);

    but the format is not pleasing. Any ideas on how to style that info so (2006-08-23 22:32:27) becomes (August 23, 2006) or at least (08-23-2006) although the first is greatly preferable.

    I’m trying to alter the template-functions-general.php file to ADD the date to a post-by-post listing but am having a hard time. Here’s what I have so far:

    elseif ( 'postbypost' == $type ) {

    $arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);

    if ( $arcresults ) {
    foreach ( $arcresults as $arcresult ) {
    if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {
    $date = sprintf("%02d-%02d-%d", $arcresult->month, $arcresult->dayofmonth, $arcresult->year);
    $url = get_permalink($arcresult);
    $arc_title = $arcresult->post_title;
    if ( $arc_title )
    $text = strip_tags($arc_title, $date);
    else
    $text = $arcresult->ID . $date;
    echo get_archives_link($url, $text . " (" . $date . ")", $format, $before, $after);
    }
    }

    which gives me listings such as:
    Post title blah blah blah. (00-00-0)

    with all the zeros for the date. How can I use the daily code of
    $dateresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, DAYOFMONTH(post_date) AS dayofmonth` FROM $wpdb->posts WHERE post_date < ‘$now’ AND post_date != ‘0000-00-00 00:00:00’ AND post_status = ‘publish’ ORDER BY post_date DESC” . $limit);’

    in my script to pull the date for each listing? Thanks in advance!

    Thread Starter buskerdog

    (@buskerdog)

    Does anyone know how to do this?

    Thread Starter buskerdog

    (@buskerdog)

    Thanks. Going through those threads and trying stuff on my own the only solution I can think of is to tell them to get rid of GoDaddy. I can’t believe how complicated they make things!

    Thread Starter buskerdog

    (@buskerdog)

    Nevermind. I put the excerpt in a little div box and styled that to do what I want.

Viewing 15 replies - 151 through 165 (of 178 total)