luckdragon
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Page hyperlinking using custom php filesif 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>";Forum: Fixing WordPress
In reply to: Page hyperlinking using custom php fileswhy 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 displayalso, 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 displayactually, 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.
Forum: Fixing WordPress
In reply to: Changing images associated with commentsfrom 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).
Forum: Fixing WordPress
In reply to: Changing images associated with commentsit is probably stored in wp_usermeta
Forum: Plugins
In reply to: Time based post displaydid 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.
Forum: Fixing WordPress
In reply to: is it possible to separate post textyou 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
Forum: Fixing WordPress
In reply to: Portfolio and "recent posts" widgetwhen 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.
Forum: Fixing WordPress
In reply to: theme name change problemyou 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');Forum: Fixing WordPress
In reply to: Portfolio and "recent posts" widgetthere 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<? 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 displayyeah, I see that it’s saying closed, I’ll try it on my end and see
Forum: Fixing WordPress
In reply to: How to Make Post Formats Display in Sidebarabove that, try adding:
<?php global $post; ?>Forum: Plugins
In reply to: I wrote this simple plugin but its not working – helpprobably because you are defining it as $subject, but passing it as $Subject