wpismypuppet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: I Edited Page on Site but URL has changedWell, it should be instant. If you type in http://purchase.ie/chimney-balloon-inflation-tube-2/ you should be immediately redirected. Maybe try to remove the end slash?
Redirect 301 /chimney-balloon-inflation-tube-2 http://purchase.ie/chimney-balloonsKeep playing with it until it works. Again, a quicker test is when you type the old URL immediately in. Also, make sure you save and upload the .htaccess file after you’ve made the changes.
Forum: Fixing WordPress
In reply to: Using A Custom Page Template Based On PHP Switch StatementYou are welcome… glad to be of help.
Forum: Fixing WordPress
In reply to: search widget on my non-wordpress home page?Well, the fact that you seeing the actual PHP code is the problem. It’s not being parsed by the PHP compiler. So my guess is the filename does not have a .php extension? Maybe the filename is index.htm or index.html? Renamve the file and give it a .php extension. Then it will be parsed properly and all should work.
Forum: Fixing WordPress
In reply to: Using A Custom Page Template Based On PHP Switch StatementWell, if each of your themes are child themes off the main one, this would work fine. The function will check the current child theme first, then check it’s parent. It does not search the entire wp-content folder.
If you need that functionality, then you’ll want to use the absolute path. However the WordPress ABSPATH variable changes with each page. And adding that with a ../ will cause problems.
To get the absolute path of your website, you’ll want to use the PHP variable $_SERVER[‘DOCUMENT_ROOT’] and then add in the rest. So something like this:
<?php include($_SERVER['DOCUMENT_ROOT'] . "/wp-content/uploads/stores/store-template.php") ; ?>You are welcome… if that worked, please mark this thread as resolved! Glad I could help.
Forum: Fixing WordPress
In reply to: "Two Level" Portfolio FilteringYes… Quicksand. Though this isn’t an AJAX powered package. Nor is it a WordPress plugin or theme. It’s simply a jQuery plugin where you would load all portfolio items on the page, then use the filter options to “hide” what you don’t want. Plus it’s sexy as all 🙂 We use this on our own portfolio site, along with custom AJAX modal stuff.
Forum: Fixing WordPress
In reply to: Using A Custom Page Template Based On PHP Switch StatementTry using WordPress’ function get_template_part(). Though it sounds weird cause you aren’t really getting a “part” of a template, it is indeed what you want. So you would call:
switch ($niche) { case "store": get_template_part( 'store', 'template' ); break; case "bar": echo "i is bar"; break; default: get_template_part( 'template' , 'fullwidth' ); break; }Read up on the documentation to see why I pass what I pass, but this should work. The function basically does the include() function for you, but it knows the right path, and it checks to make sure the file actually exists and does a graceful fail instead of PHP errors.
I believe the missing code is:
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/js/prettyPhoto/css/prettyPhoto.css" title="prettyPhoto main stylesheet" charset="utf-8" />Forum: Fixing WordPress
In reply to: Redirect Expired Posts to first categoryWhat you want is some kind of 404 redirect plugin, unless you know how to write your own. Since the page is expiring and the content is no longer there/relevant, you should use a 404 redirect for SEO purposes.
I can’t tell you which 404 redirect plugin is the best, but look for one that’s automatic. Those will check when the user hits a 404 and try to redirect them to an appropriate page instead.
Forum: Fixing WordPress
In reply to: I Edited Page on Site but URL has changedPlesk Panel means you are using the hosting company’s control panel to access your site through FTP. You would want to download an use a real FTP program, like FileZilla.
However, it seems like you are becoming uncomfortable with this process and if you don’t know what you are doing, you should probably find someone who can help you. It’s not entirely complicated, but you don’t want to mess with anything already in the .htaccess file or things can break.
Also read the blog you linked and am wondering can I definitely do this 301 direct on one page on the site without affecting the whole site?
Absolutely… this is exactly what a 301 redirect is for. You would use the example I gave:
Redirect 301 /chimney-balloon-inflation-tube-2/ http://purchase.ie/chimney-balloonsWhat that says, is anywho who types in the first URL will now be redirected to the second link. There is nothing there that will affect anything BUT the first link, so the rest of the site is safe.
Forum: Fixing WordPress
In reply to: I Edited Page on Site but URL has changedWhat FTP program are you using?
Forum: Fixing WordPress
In reply to: search widget on my non-wordpress home page?Ah… you might need the absolute path instead of a relative one. Try this instead:
<?php require( $_SERVER['DOCUMENT_ROOT'] . '/wordpress/wp-load.php' ); ?>Forum: Fixing WordPress
In reply to: Output the image's filename onlyYou are most welcome!
Forum: Fixing WordPress
In reply to: Upload New Media Issue – Unable to create directoryYou wouldn’t use the “Everyone” account… you would use FTP account on your web server. You can read up about it here:
Forum: Fixing WordPress
In reply to: Output the image's filename onlyHere is your code combined with mine (P.S. I stripped a lot of repeating
<?php ?>as you don’t need them every time!). Best of luck!<?php // start advanced custom fields repeater if(get_field('images')): while(the_repeater_field('images')): $image = wp_get_attachment_image_src(get_sub_field('image'), 'full'); echo '<a href="' . $image[0] . '" rel="shadowbox[set]" title="Click to view this photograph fullscreen. Filename: ' . basename( $image[0] ) . '">'; echo '<img src="' . $image[0] . '" width="678" /></a>'; endwhile; endif; ?>