wpcast
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Fetch links from custom fieldYou could simply link an <h2> tag inside your content and omit the the_title(); from the loop or, as you stated, you could link the the_title() with a custom field.
You could call your custom field “link” and use it this way:
<?php $field_name="link"; $field_value = get_post_meta($post->ID, $field_name, true); ?>
then, to link the title
<a href="<?php echo $field_value; ?>"><?php the_title(); ?></a>
This, of course, assumes your “link” custom field contains a fully qualified url.
Forum: Themes and Templates
In reply to: the_tags() does not work in WP_Query Loop. A Bug?right before you “while” statement add:
$wp_query->in_the_loop = true;
Forum: Fixing WordPress
In reply to: Permalink problem (upgrading 2.1 to 2.5)Trailing Slash Problem
The solution to this subtle problem is to let the server add the trailing slash automatically. To do this correctly we have to use an external redirect, so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For instance, a request for image.gif in /~quux/foo/index.html would become /~quux/image.gif without the external redirect!
So, to do this trick we write:
RewriteEngine on RewriteBase /~quux/ RewriteRule ^foo$ foo/ [R]
The crazy and lazy can even do the following in the top-level .htaccess file of their homedir. But notice that this creates some processing overhead.
RewriteEngine on RewriteBase /~quux/ RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R]
**from https://httpd.apache.org/docs/2.0/misc/rewriteguide.html
Forum: Fixing WordPress
In reply to: How to get priority support for upgrade?As mentioned in the original thread. Rewrite conditions and rules added to your .htaccess file can resolve your issues. This is more of an apache issue then a wordpress one. Additionally, there are some really great resources for mod rewrite to be found through google. Check your orignal thread for more advice.
Forum: Fixing WordPress
In reply to: Permalink problem (upgrading 2.1 to 2.5)yep, some well written rewrite conditions and rules will solve this no problem.
Forum: Installing WordPress
In reply to: All of my blog pages “cannot be found”?Your site is using “friendly urls” which need to be setup in your .htaccess file. Typically, this is something WordPress does for you *IF your .htaccess file was writable when you made the changes.
I would check two things in your WP settings:
1. Check the WordPress address (URL)
This should be set to the actual path to your wordpress install. (https://www.phonedevil.com/blog/)2. Check the Blog URL address
This should be set to the url you would like to use to display the blog to visitors.Use https://www.phonedevil.com if you want wordpress showing when your domain is typed in.
or
Use https://www.phonedevil.com/blog/ if you’d like to require people to add the /blog to see your wordpress install.
After these things are setup correctly. Make your your .htaccess file is writable (777 whatever is appropriate for your server). Go to the permalinks settings and choose (or re choose) one of premade url settings. Save the changes and check for a success message.
Forum: Fixing WordPress
In reply to: will WP work for this design?WordPress will work with any design you can come up with including the one in your link. The WP themeing engine is seriously flexible. With that said, the layout for your theme design will probably need to be created almost 100% from scratch.
Forum: Fixing WordPress
In reply to: How to add a galleryI found this solution on another thread, it’s working for me.
Make sure you only have one browser tab open.
https://www.ads-software.com/support/topic/166652?replies=16
Forum: Themes and Templates
In reply to: Why is is_home not working?So glad you got this working jbickers!
Forum: Themes and Templates
In reply to: WordPress 2.5 Themes : Where are they ?get_avatar(); is all I’m coming up with. Is there anything else 2.5 specific?
Forum: Fixing WordPress
In reply to: Re-feed posts to wordpress?Hey MacWise,
What your describing sounds an awful lot like auto blogging. If you own both “Blog A” and “Blog B” then your desire to cross post articles from a feed is probably legitimate. Unfortunately, most people who auto blog abuse the heck out of it. One developer of a plugin that did what you are asking said this:
This plugin was intended so I could aggregate some of my and my family members blogs together on my front page using an all-Wordpress solution. However, it seemed to attract spammers who abused it, which is even worse for me, because it puts “Post by XXXXX and software by me” on the bottom of every import, leading some people to believe that I am a spammer.
concluding with:
I will not provide this plugin, or anything like it, because the potential for abuse is way too high.Honestly, if you own both “Blog A” and “Blog B” consider keeping them separate (one for cars and one for boats) or join them together. Duplicating articles can have some negative SEO effects anyway, and posting non original content on your blog has far less benefit then you might think.
There are plugins that do what your asking, but the potential for abuse is high enough that your probably best searching google on your own.
Best of luck which ever you decide,
Aaron
Forum: Fixing WordPress
In reply to: How to add a galleryIn theory:
Edit the post you want to add the gallery too.Select the “Add Image” quick button at the top of the writing area and upload all the image you want. As you upload images the “gallery” link in the popup window should start to show a number after it corresponding to how many pictures you’ve uploaded to that post ( gallery(3) ).
Click the “gallery” link when you’ve uploaded more than 1 picture and you will see an “Insert Gallery Into Post” option. Click that and it *should insert the gallery. I’ve been experiencing a blank white screen when trying to do this on a few blogs.
Forum: Themes and Templates
In reply to: Why is is_home not working?i would echo out some test text with the different vars to see which one comes up empty on home and populated on other pages.
<?php $num = 0; foreach ($url_vars as $var){ echo "$num : $var <br />"; $num++; } ?>
Put this is the sidebar and test out your navigation watching the output to see which number is empty on the homepage but populated on non homepages. Thats the number you need to put in $url_vars[ here ]
Forum: Themes and Templates
In reply to: Why is is_home not working?This is working for my test install of 2.2
if(!$url_vars[2]){ echo "home"; } else { echo "not home"; }
sounds like yours needs to be
!$url_vars[3]
Forum: Themes and Templates
In reply to: Why is is_home not working?Tried a few other things which didn’t work either. I think you might want to consider parsing out the URL and displaying your ads based on what the url looks like. For example using something like:
$url_vars = explode("/",$_SERVER['REQUEST_URI']);
and then testing the parts of the url that make sense for your domain using
if($url_vars[1] == "something"){ } else{ }
the number in $url_vars[#] refers to roughly to parts of the url seperated by a / depending on your url this may by something other then 1.