lakerstats
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Changing Browser Title Based on Variable – WP 4.0Just one final follow up. This is what I ended up doing based on the variable pulled by the page. Hope it provides some information for anyone in the future who may have this issue. Thanks for all the help!
add_filter( 'aioseop_title', 'change_wordpress_seo_title' ); function change_wordpress_seo_title( $title ){ $season = ( $_GET['seasonid'] ) ? $_GET['seasonid'] : ''; $pname = ( $_GET['pname'] ) ? $_GET['pname'] : ''; $date = ( $_GET['date'] ) ? $_GET['date'] : ''; if ($date) { $date = date( "F j, Y", strtotime( $date ) ); return $date . ' ' . '-' . ' ' . $title; } if ($season) { if ($season < 4000) $season = '20' . substr($season,0,2) . '-' . substr($season,2,2) . ' - '; if ((substr($season, 0,1) > "3") && (substr($season, 0,1) <= "9")) $season = '19' . substr($season,0,2) . '-' . substr($season,2,2) . ' - '; return $season . $title; } if ($pname) { $pname = explode('_',$pname); $fname = $pname[0]; $lname = $pname[1]; $suffix = $pname[2]; $suffix = ucfirst($suffix); if (strpos($suffix, 'Ii') === 0) $suffix = II; if (strpos($suffix, 'Jr') === 0) $suffix = "Jr."; $suffix = " $suffix"; $lname = ucfirst($lname); if (strpos($lname, 'Mc') === 0) { $lname ='Mc' . ucwords(substr($lname, 2, strlen($lname))); } $lname = preg_replace("/(\w+)/e","ucfirst('\\1')", $lname); if ($lname === Oneal) $lname = "O\'Neal"; if ($lname === Oshea) $lname = "O\'Shea"; $fname = ucfirst($fname); if ($fname === Lebron) $fname = LeBron; if ($fname === Javale) $fname = JaVale; if ($fname === Marshon) $fname = MarShon; if ($fname === Jr) $fname = "J.R."; if ($fname === Dangelo) $fname = "D\'Angelo"; if ($fname === Cj) $fname = "C.J."; if ($fname === Dj) $fname = "D.J."; if ($fname === Ac) $fname = "A.C."; if ($fname === Mccoy) $fname = McCoy; return $fname . ' ' . $lname . $suffix . ' - ' . $title; } else return $title; }Forum: Developing with WordPress
In reply to: Changing Browser Title Based on Variable – WP 4.0Thanks guys, I was actually able to do it using the AIO filter and a reply to a post I made about changing a page title 6 years ago! HAHA. I combined them and it works. It looks like this. Appreciate the help!
add_filter( 'aioseop_title', 'change_wordpress_seo_title' ); function change_wordpress_seo_title( $title ){ $season = ( $_GET['seasonid'] ) ? $_GET['seasonid'] : ''; if ( $season ) $season = ' - 20' . substr($season,0,2) . '-' . substr($season,2,2); return $title . $season; }- This reply was modified 5 years, 8 months ago by lakerstats.
Forum: Developing with WordPress
In reply to: Changing Browser Title Based on Variable – WP 4.0Awesome thanks guys this gives me a great place to start!!
Forum: Fixing WordPress
In reply to: All of a sudden site won't loadIt was a plugin…I dumped all my plugins via FTP and now my site loads fine. Just have to load them back to figure out which the offending one was.
Thanks for the help!
Forum: Fixing WordPress
In reply to: Dynamic PHP PagesDid some more digging for a few hours and found out how to pass variables to the URL. That pretty opened the door for me to do it.
If anyone’s curious, here’s what I used.
http://www.webopius.com/content/137/using-custom-url-parameters-in-wordpress
So all good here.
Forum: Fixing WordPress
In reply to: Dynamic PHP PagesNobody?
Here I’ll make it easier. How do I get this page set up in WordPress? Note that the Game ID obviously changes.
http://www.lakerstats.com/boxscore.php?gameid=33
Surely somebody has had to incoporate their dynamic PHP pages into a WordPress template.
Forum: Fixing WordPress
In reply to: Author Name Doesn't Show on External PageYeah I have the semi-colons, not sure why I pasted them like that. My bad. So it’s not that.
Forum: Fixing WordPress
In reply to: Author Name Doesn't Show on External PageNo I just made sure to include the
<?php /* Short and sweet */ define('WP_USE_THEMES', false); require('./blog/wp-blog-header.php'); ?>at the top.
Then I just did the loop stuff and it everything shows up…but the author name.
Forum: Fixing WordPress
In reply to: Author Name Doesn't Show on External PageNo one with an idea? I know others have had this problem solved, I have tried everything I can think of, read every document or post even remotely concerning this.