Alvin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Modify Custom Post TypeHi mlundsveen!
Thanks for the suggestion but unfortunately that didn’t work for me.
I can choose to add a new Pod or extend an existing CPT.
When i choose to extend an exisiting, the “Polls” cpt doesn’t show up, maybe because its generated by a plugin.
But when i create a new Pod and also name it “Polls” i can add Categories and Tags.
It does show up when creating a new Poll in the backend, but nowhere to be found on the frontend…Thanks again!
Forum: Plugins
In reply to: [WP Geo] WP Geo with Google Maps v3 – Please help by testing…Have you guys got it to work on the frontend yet ?
I dont use gravity forms but a theme build post form.
Any idea ?Hi , i want my site users to submit posts and i want them to add the person where the post is about.
The other “persons” are a custom user type named “civilians”.Can i popup this box on the frontend and let them find and add a “person” so that the info about this “person” can be showed with user meta ?
Forum: Plugins
In reply to: [Hide Widget Title] [Plugin: Hide Widget Title] Can still see widget titlesHi awarner20 , i was just about to email you but glad i google’d it first ??
I am having the same issue here , see MySite please.
I am very glad you made this plugin , the titles take up important space and sometimes are completely unnecessary.I hope you can make this fix soon , great job!
Alvin
Forum: Hacks
In reply to: Different post colorsHi Chewbears , im sorry it doesnt work.
If you like i can send you the themefiles?
If so please send an email to [email protected] and i will reply to that.Forum: Hacks
In reply to: Different post colorsHi chewbears!
Dont mind the link post haha
But yes , the theme i use is the same as jobs.smashingmagazine.com
Sorry if thought i had already said this… my bad.I am gonna try the code you gave , ill be back!
Thanks
Forum: Hacks
In reply to: Different post colorsYes chewbears , that is the guide i pointed you to haha ??
I have read it and tried it but i get errors constantly.Here’s the php ;
<div class="content"> <?php global $post; $myposts= array(); $args = array( 'showposts' => 20, 'meta_key' => "active", 'meta_value' => "false", 'meta_compare' => "!=" ); query_posts($args); if (have_posts()) { while ( have_posts() ) { the_post (); if( (get_post_meta($post->ID, "featuredjob", true)=="1" && get_post_meta($post->ID, "payfeaturedjob", true)=="Yes") ) { $post = get_post($post->ID); $posttime = $post->post_date; $posttime = explode(" ", $posttime); $currenttime = current_time(mysql); $currenttime = explode(" ", $currenttime); $inposttime = $posttime[0]; $inposttime = explode("-", $inposttime); $incurrenttime = $currenttime[0]; $incurrenttime = explode("-", $incurrenttime); /////////////////////////////////////////////////////////////////////////// $jobrenew= get_post_meta($post->ID, 'jobrenew', true); $a = mktime(0, 0, 0, $inposttime[1]+$jobrenew, $inposttime[2], $inposttime[0]); $b = mktime(0, 0, 0, $incurrenttime[1], $incurrenttime[2], $incurrenttime[0]); $show="not"; $id_old=""; if ( ($b-$a) > (30*24*3600) ) { $id_old = " id=\"old\""; } if($id_old=="") { $jobtype = $_GET['jobtype']; if($jobtype!="") { if(get_post_meta($post->ID, "jobtype", true)==$jobtype) $show= ""; } else $show= ""; } if($show=="") $myposts[]= $post->ID; } } } $alt = 0; if(count($myposts)>0) { ?> <h2>Featured Jobs</h2> <ul class="listing" id="featured"> <?php foreach($myposts as $postid) : { $alt++; ?> <?php $post = get_post($postid); $id_old=""; if(1): ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "freelance") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "freelance") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "parttime") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "parttime") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "fulltime") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "fulltime") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if($jobtype !== "fulltime" && $jobtype !== "parttime" && $jobtype !=="freelance") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php endif; ?> <?php }endforeach; ?> </ul> <?php } ?> <h2>Latest jobs</h2> <ul class="listing"> <?php global $post; $myposts= array(); $args = array( 'showposts' => 200, 'meta_key' => "active", 'meta_value' => "false", 'meta_compare' => "!=" ); query_posts($args); if (have_posts()) { while ( have_posts() ) { the_post (); if( !(get_post_meta($post->ID, "featuredjob", true)=="1" && get_post_meta($post->ID, "payfeaturedjob", true)=="Yes") ) { $post = get_post($post->ID); $posttime = $post->post_date; $posttime = explode(" ", $posttime); $currenttime = current_time(mysql); $currenttime = explode(" ", $currenttime); $inposttime = $posttime[0]; $inposttime = explode("-", $inposttime); $incurrenttime = $currenttime[0]; $incurrenttime = explode("-", $incurrenttime); /////////////////////////////////////////////////////////////////////////// $jobrenew= get_post_meta($post->ID, 'jobrenew', true); $a = mktime(0, 0, 0, $inposttime[1]+$jobrenew, $inposttime[2], $inposttime[0]); $b = mktime(0, 0, 0, $incurrenttime[1], $incurrenttime[2], $incurrenttime[0]); $show="not"; $id_old=""; if ( ($b-$a) > (30*24*3600) ) { $id_old = " id=\"old\""; } if($id_old=="") { $jobtype = $_GET['jobtype']; if($jobtype!="") { if(get_post_meta($post->ID, "jobtype", true)==$jobtype) $show= ""; } else $show= ""; } if($show=="") $myposts[]= $post->ID; } } } $items_per_page= get_option("itemsperpage"); $items_per_page= is_numeric($items_per_page)?$items_per_page:4; global $wp_rewrite; $catlink = $wp_rewrite->get_category_permastruct(); if ( empty( $catlink ) ) { if($_GET['paged']!="") $page_num= is_numeric($_GET['paged'])?$_GET['paged']:0; else $page_num= 0; } else { if((string)strpos($_SERVER["REQUEST_URI"],"page")!="") { $url_arr= explode("/", $_SERVER["REQUEST_URI"]); $page_num= $url_arr[count($url_arr)-2]; } else $page_num= 0; } if($page_num==0) $start= 0; else $start= ($page_num-1)*$items_per_page; $alt = 0; if(count($myposts)>0) { for($n=$start; ($n<count($myposts) && $n<$start+$items_per_page) ; $n++ ): $postid= $myposts[$n]; $alt++; ?> <?php $post = get_post($postid); $id_old=""; if(1): ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "freelance") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "freelance") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "parttime") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "parttime") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if ($jobtype == "fulltime") { ?> <?php $key="jobtype"; $jobtyped = get_post_meta($post->ID, $key, true); if($jobtyped == "fulltime") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php } ?> <?php $jobtype = $_GET['jobtype']; if($jobtype !== "fulltime" && $jobtype !== "parttime" && $jobtype !=="freelance") { ?> <li class="item <?php echo $altec; ?>" <?=$id_old;?>> <h3><a href="<?php the_permalink(); ?>"><?php $key="jobtitle"; echo get_post_meta($post->ID, $key, true); ?></a></h3> <small> <?php $key="companylink"; if(!(get_post_meta($post->ID, $key, true)=="https://" || get_post_meta($post->ID, $key, true)=="")): ?> <a target="_blank" href="<?php $key="companylink"; echo get_post_meta($post->ID, $key, true); ?>"><?php $key="company"; echo get_post_meta($post->ID, $key, true); ?></a> <?php else: ?> <?php $key="company"; echo get_post_meta($post->ID, $key, true); ?> <?php endif; ?> in <?php $key="location"; echo get_post_meta($post->ID, $key, true); ?> <?php $key="jobtype"; $jobtype = get_post_meta($post->ID, $key, true); if($jobtype == "freelance") { echo "<span class=\"fl\">Freelance</span>"; } else { if($jobtype == "parttime") { echo "<span class=\"pt\">Part Time</span>"; } else { if($jobtype == "fulltime") { echo "<span class=\"ft\">Full Time</span>"; } } } ?> </small> <em><strong><?php the_time('M'); ?></strong><?php the_time('j'); ?></em> <div class="cl"></div> </li> <?php } ?> <?php endif; ?> <?php endfor; } ?> </ul> <?php global $wp_rewrite; $catlink = $wp_rewrite->get_category_permastruct(); if ( empty( $catlink ) ) { $link= get_bloginfo('url')."/?paged="; } else { $link= get_bloginfo('url')."/page/"; } $numrows= count($myposts); $rowsPerPage= $items_per_page; $pageNum= ($page_num==0)?1:$page_num; $maxPage = ceil($numrows/$rowsPerPage); $nav = ''; for($page = 1; $page <= $maxPage; $page++) { if ($page == $pageNum) { $nav .= '<span style="font-size:14px; color:#284A70; font-weight:bold;">' . $page . '</span>'; } else { $nav .= ' <a class="link" style="font-size:13px;" href="'.$link.$page.(empty( $catlink )?"":"/").'" >'.$page.'</a> '; } } if ($pageNum > 1) { $page = $pageNum - 1; $prev = ' <a class="link" style="font-size:13px;" href="'.$link.$page.(empty( $catlink )?"":"/").'" >« previous</a> '; } else { $prev = ' '; $first = ' '; } if ($pageNum < $maxPage) { $page = $pageNum + 1; $next = ' <a class="link" style="font-size:13px;" href="'.$link.$page.(empty( $catlink )?"":"/").'" >next »</a> '; } else { $next = ' '; // we're on the last page, don't print next link $last = ' '; // nor the last page link } if($rowsPerPage< $numrows) echo $first . $prev . $nav . $next . $last; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
I posted the whole php code , because i really dont understand where the post ends.
Could you or somebody help me out here ?
I am almost crying here…. ??Forum: Hacks
In reply to: Different post colorsHi Chewbears!
I have found a tutorial which explains the code
See tutorial here clickyI have posted my code there , could you please look into it?
My website is called https://www.luchthavenpersoneel.nl , its the same theme used as jobs.smashingmagazine.com
Thank you so far!
Regards,
AlvinForum: Hacks
In reply to: Different post colorsA thank you Chewbears!
I have downloaded firebug and i can see codes but i am not a php expert , so wp is still much hocus pocus for me ??
So if i am correct the “.even” changes the background for the even post numbers ?
If i put this in my .css , what should i modify in my index.php ?Anyway now i now what to look for , thanks a lot!
Regards,
Alvin
The Netherlands