Forum Replies Created

Viewing 15 replies - 136 through 150 (of 269 total)
  • luckdragon

    (@luckdragon)

    if you are just saying <a> it’s not linking to anything, it could just be an anchor, or something similar.

    is your player_details script in /familybowlingnyc/ or is it in a sub folder, if it’s in the “base” folder you just have to tweak the link

    echo "<td><a href='".get_option("siteurl")."/player_details.php?name=".$row['name']."'>".$strName."</a></td>";
    luckdragon

    (@luckdragon)

    why can’t you just hard link it?

    echo "<td><a href='player_details.php?name=".$row['name']."'>".$strName."</a></td>";
    Forum: Plugins
    In reply to: Time based post display
    luckdragon

    (@luckdragon)

    also, I noticed that if you change your timezone in the settings area and select like UTC-5 as a timezone, it does not enter anything into the options db, so I’m not sure how it knows to keep that value.

    Forum: Plugins
    In reply to: Time based post display
    luckdragon

    (@luckdragon)

    actually, I tried that code on my site last night, and it worked perfectly, it’s saying if the hour is greater than 7 and both the hour is less than 7 and minute is less than 30, it works fine since it’s grouped together, but yes, military will work, but I believe his problem is that WP is giving him UTC so when he tests, if he’s UTC-5, it will say closed even if it’s 2:45 in the afternoon.

    luckdragon

    (@luckdragon)

    from the looks of things, it is supposed to get the avatar when it builds the list of comments for that user, if you are changing the email, without changing a user id, it might be pulling the avatar for that user id and ignoring the email, (according to the get_avatar function, id takes precedence over email address).

    luckdragon

    (@luckdragon)

    it is probably stored in wp_usermeta

    Forum: Plugins
    In reply to: Time based post display
    luckdragon

    (@luckdragon)

    did you make sure to set your timezone?

    try adding in:

    echo “\””.get_option(“timezone_string”).”\””;
    to see what it actually is set to.

    also, echo $myhour to see if it’s showing the correct hour.

    luckdragon

    (@luckdragon)

    you can add a filter for the_excerpt and in your function define what you want it to display

    something like:

    function showMyStuff($content) {
      if (!in_the_loop()) return $content;
      $words = explode(" ",strip_tags($content));
      $mycontent = "";
      for ($i=0;$i<11;$i++) $mycontent .= $words[$i]." ";
      $mycontent .= <your image>;
      return $mycontent;
    }
    add_filter('the_excerpt','showMyStuff');

    that’s very basic, but you get the jest of it

    luckdragon

    (@luckdragon)

    when you click on “portfolio” on your admin menu it should take you to a url like

    wp-admin/edit.php?post_type=<something>

    whatever that <something> is, is the post type you need.

    luckdragon

    (@luckdragon)

    you also have to make sure that there isn’t a variable being defined in the theme that’s being used throughout as well. Newer/less experienced theme developers sometimes do that because they are familiar with php, but not yet fully familiar with the wp shortcuts

    like they may do

    $themedir = 'mytheme';
    include('wp-content/themes/'.$themedir.'/myfile.php');

    rather than

    include(get_stylesheet_directory().'/myfile.php');

    luckdragon

    (@luckdragon)

    there are several tutorials on how to create your own widgets, in this case all you really want to do is copy the recent posts widget and modify it appropriately to choose the correct post_type.

    you can copy the code from wp-includes/default-widgets.php

    search for:

    /**
     * Recent_Posts widget class
     *
     * @since 2.8.0
     */

    copy everything between that and:

    /**
     * Recent_Comments widget class
     *
     * @since 2.8.0
     */

    paste it into your functions.php for your theme (or another file which you include), and make the appropriate modifications.

    Forum: Plugins
    In reply to: Time based post display
    luckdragon

    (@luckdragon)

    <?
       date_default_timezone_set(get_option('timezone_string'));
                    $myhour = date("H");
                    $myminute = date("i");

    then make sure to go to your admin area
    Settings -> General
    and set your timezone appropriately (I noticed that the “manual” ones like UTC-5 don’t seem to work, but the names like America/New_York do.

    Forum: Plugins
    In reply to: Time based post display
    luckdragon

    (@luckdragon)

    yeah, I see that it’s saying closed, I’ll try it on my end and see

    luckdragon

    (@luckdragon)

    above that, try adding:
    <?php global $post; ?>

    luckdragon

    (@luckdragon)

    probably because you are defining it as $subject, but passing it as $Subject

Viewing 15 replies - 136 through 150 (of 269 total)