junkhed1
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Footer not stretching like other pagessorry didn’t set the link up correctly in my first posting here it is Link
Forum: Fixing WordPress
In reply to: Invisible Extra SpaceHi ChristiNi,
Thanks so much for writing back, I applied a width to my css sheet for the body element but I’m still getting the same thing.. not quite sure whats wrong but I’m gonna keep hunting..LOL would you have any other suggestions of where I should be looking? I thought at first maybe there was a div pushing out of the wrap but I placed background colors on each one to visibly see the divs and nothing seems out of sorts.
Thank you again for all your help 🙂
Forum: Fixing WordPress
In reply to: Link breaking Div?Hi racer x the code below is what’s being used to generate the twitter feed on the page. Would I use the code you provided along with it or could I edit some area in the code provided where it would assist in making the link break if its too long?
thanks again for the assistance.
<?php $username = "yo_maggie"; $num = 1; $feed = "http://search.twitter.com/search.json?q=from:" . $username . "&rpp=" . $num; $newfile = dirname(__FILE__)."/twitternew.json"; $file = dirname(__FILE__)."/twitter.json"; copy($feed, $newfile); $oldcontent = @file_get_contents($file); $newcontent = @file_get_contents($newfile); if($oldcontent != $newcontent) { copy($newfile, $file); } $tweets = @file_get_contents($file); $tweets = json_decode($tweets); echo "<ul>"; for($x=0;$x<$num;$x++) { $str = ereg_replace(":alpha:+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $tweets->results[$x]->text); $pattern = '/[#|@][^\s]*/'; preg_match_all($pattern, $str, $matches); foreach($matches[0] as $keyword) { $keyword = str_replace(")","",$keyword); $link = str_replace("#","%23",$keyword); $link = str_replace("@","",$keyword); if(strstr($keyword,"@")) { $search = "<a href=\"http://twitter.com/$link\">$keyword</a>"; } else { $link = urlencode($link); $search = "<a href=\"http://twitter.com/#search?q=$link\" class=\"grey\">$keyword</a>"; } $str = str_replace($keyword, $search, $str); } echo "<li>".$str."</li>\n"; } echo "</ul>"; ?>Forum: Fixing WordPress
In reply to: Link breaking Div?Hi racer x thanks for the reply –
I’m familiar with php but still learning the environment –
would you mind if I ask : where would I place the above code –$url_length = strlen($the_url); if ( $url_length > 15 ) { $url_length_trunc = substr($the_url, 0, 14); $url_length_trunc = $url_length_trun . '...'; }and then where where would the
<?php echo $url_length_trunc; ?>gothe reason I ask is because this is the php code which is generating the twitter feed onto the page – and this coding is sitting in the
.twitterfeed -DIV<?php $username = "yo_maggie"; $num = 1; $feed = "http://search.twitter.com/search.json?q=from:" . $username . "&rpp=" . $num; $newfile = dirname(__FILE__)."/twitternew.json"; $file = dirname(__FILE__)."/twitter.json"; copy($feed, $newfile); $oldcontent = @file_get_contents($file); $newcontent = @file_get_contents($newfile); if($oldcontent != $newcontent) { copy($newfile, $file); } $tweets = @file_get_contents($file); $tweets = json_decode($tweets); echo "<ul>"; for($x=0;$x<$num;$x++) { $str = ereg_replace("<a href="http://codex.wordpress.org/:alpha:">:alpha:</a>+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\">\</a>", $tweets->results[$x]->text); $pattern = '/[#|@][^\s]*/'; preg_match_all($pattern, $str, $matches); foreach($matches[0] as $keyword) { $keyword = str_replace(")","",$keyword); $link = str_replace("#","%23",$keyword); $link = str_replace("@","",$keyword); if(strstr($keyword,"@")) { $search = "<a href=\"http://twitter.com/$link\">$keyword</a>"; } else { $link = urlencode($link); $search = "<a href=\"http://twitter.com/#search?q=$link\" class=\"grey\">$keyword</a>"; } $str = str_replace($keyword, $search, $str); } echo "<li>".$str."</li>\n"; } echo "</ul>"; ?>Thanks again hope this makes sense.
Forum: Fixing WordPress
In reply to: Is website loading time okay?Hi macmanx thanks for the reply any suggestion as to what I should do to get the size down?
Forum: Fixing WordPress
In reply to: Issues with Category StylingThanks very much truly appreciate it!
Forum: Fixing WordPress
In reply to: Issues with Category StylingOkay I figured out what was wrong… Trial and error lol
Thanks so much for the assistance in pointing out where the root of the problem was!Cheers!
Forum: Fixing WordPress
In reply to: Issues with Category StylingHi thank you for the reply.. I’m a bit new to WP so forgive for not being up to date with all this. What exactly should I do with the pastebin file? do I just copy whats in the category template I created and paste that in? The error with the nesting is this something that I would be able to see viewing the source code here is the actual coding being used on the category page do you think you could spot what needs to be fixed? Thank you very much for your assistance.
<?php /* Template Name: The Making of Player Hating */ ?> <?php get_header(); ?> <style type="text/css"> body {background-color:#fff;} #wrap {background-color:#fff;} </style> <div id="blog_main12"> <div id="blog12"> <div class="blog-cat12"> <?php global $query_string; query_posts($query_string . "&order=ASC"); ?> <?php if(have_posts()) : while(have_posts()) : the_post(); ?> <h2><?php the_title(); ?></h2> <p class="meta">posted by <?php the_author(); ?> on <?php the_date(); ?></p> <?php the_content('read more'); ?> <br /> <div id="retweet"> <?php if (function_exists('topsy_retweet_small')) echo topsy_retweet_small(); ?> </div><!--end retweetTW --> <div id="shareFB"> <a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a> </div><!--end shareFB div--> <div class="BlogComments"> <a href="<?php comments_link(); ?>"><?php comments_number('0', '1', '%'); ?> Comment(s)</a> </div><!--end blogcomments--> </div><!--end blog post--> <?php endwhile; ?> <?php else : ?> <p>The information you are looking for is not available.</p> <?php endif; ?> </div><!--end blog--> </div><!--End main--> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: Odering Categories your wayHi esmi again thanks for the prompt response – I wanted to ask you
I have this page set up for someone where on it there is a category called The Making of Player Hating and basically its going to be something they will continue to have multiple parts to.. very much like I describe above, they wanted to have that category show up along with 2 other categories on the page with a specific post not just the most recent one. I’m using this code to pull it on the page<?php $recent = new WP_Query(); ?> <?php $recent->query('cat=12&showposts=1'); ?> <?php if($recent->have_posts()) : $recent->the_post(); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p class="meta">posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></p> <?php global $more; $more = 0; ?> <?php the_content('read more'); ?><br />and I have 2 more like it just with different Cat#’s in place.
But for the first one they have a post that was written a few days ago and now have a second half to it, only thing they want to have that first post continue to show even if they have like 6 new posts in that category “The Making of Player Hating” they always want the first one to show.. if its possible could you explain how I can accomplish this? It sounds a bit like what I’m trying to do but I’m not sure how to make it connect as I’ve been trying a few ideas but nothing works.Thanks very much!
Forum: Fixing WordPress
In reply to: Not showing static elements in CategoriesHey esmi if I could ask another question would you know if I’m using this coding here `
<?php $recent = new WP_Query(); ?>
<?php $recent->query(‘cat=12&showposts=1’); ?>
<?php if($recent->have_posts()) : $recent->the_post(); ?><h2>“><?php the_title(); ?></h2>
<p class=”meta”>posted by <?php the_author(); ?> on <?php the_time(‘F j, Y’); ?> at <?php the_time(‘g:i a’); ?></p>
<?php global $more; $more = 0; ?>
<p><?php the_content(‘read more’); ?></p><div class=”BlogComments”>
“><?php comments_number(‘0’, ‘1’, ‘%’); ?> Comment(s)
</div><!–end blogcomments–><div id=”retweet”>
<?php if (function_exists(‘topsy_retweet_small’)) echo topsy_retweet_small(); ?>
</div><!–end retweetTW –>
<div id=”shareFB”>
&t=<?php the_title(); ?>” target=”blank”>Share on Facebook
</div><!–end shareFB div–>
<?php endif; ?><div id=”blog_message”>
<p>Please check back shortly for updated blog content!</p></div>
</div><!–end blog post–>
</div>`the div – blog_message: displays the message on the page and the content is gone after using your suggestion of
<?php if (have_posts()) :?>but if I place content in the message is still there under the post would you know what conditional statement I would use to make the message disappear when content is present?Thanks again.
Forum: Fixing WordPress
In reply to: Not showing static elements in CategoriesThanks esmi completely overlook that statement.
I appreciate your assistance!Forum: Fixing WordPress
In reply to: Archive Widget not linking to postsHey esmi I figured everything out.. took some time but I finally got it. Thanks!
Forum: Fixing WordPress
In reply to: Archive Widget not linking to postsHi esmi sorry about that I completely overlook adding the link.
I think I figured out the category thing as I didn’t have a category.php file in my server so each time I clicked on one of the categories in the sidebar widget it went no where, I’m now trying to figure out the Archives area as I created fake content and dated it back for February and am trying to get that to come up so I think I may be on the right track.. my only thing is this if you click on the link blog you’ll see I have I believe 4 different posts which are displaying from 4 different categories – but what I did was create a new post and gave it the title of blog then linked it to uncategorized, I then created a template file using the cat# for uncategorized as the name of the php file template (which has the coding for displaying the different categories on the page) so when you view the blog page it has the set up but I know this is probably not correct as I’m thinking this should be a page and not a post… does that make sense? Am I doing this correctly? Thank you esmi!here it is LINK
Forum: Fixing WordPress
In reply to: Sidebar Category and Archive linksAlso just some background right now I have in the post section of my WP Admin panel a post called Blog which is linked to the category Uncategorized and then I have a Template set up on my server with this coding in it to pull the most recent post from each category on that page here is the coding Is this even the right way to do this, I was thinking that maybe I need to place this in a page but it doesn’t seem to work very well.
Thanks again.
<?php $num_cats_to_show = 10; $count = 0; $taxonomy = 'category';// e.g. post_tag, category $param_type = 'category__in'; // e.g. tag__in, category__in $term_args=array( 'orderby' => 'name', 'order' => 'ASC', ); $terms = get_terms($taxonomy,$term_args); if ($terms) { foreach( $terms as $term ) { $args=array( "$param_type" => array($term->term_id), 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { $count ++; if ($count <= $num_cats_to_show) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class="blog-post"> <!--<img src="<?php echo get_post_meta($post->ID, "Thumbnail", true);?>" /> --> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p class="meta">posted by <?php the_author(); ?> on <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?></p> <?php the_content('read more'); ?> <div class="BlogComments"> <a href="<?php comments_link(); ?>"><?php comments_number('0', '1', '%'); ?> Comment(s)</a> </div><!--end blogcomments--> </div><!--end blog post--> <?php endwhile; } } } } wp_reset_query(); // Restore global post data stomped by the_post(). ?>Forum: Plugins
In reply to: [Plugin: Shadowbox JS] Need assisting getting Shadowbox to work on my site.Hi sivel sorry about that here is the link
link