Wordpress automatically adding site url to href, though href not empty - wordpress

So I'm trying to debug a somewhat confusing problem. I'm using a Wordpress plugin for a Topspin store that uses colorbox to popup a window to display more information about an item. Here's the site: okgo.net/store. In the backend code for this page a div block is created containing links that that should look like this:
<a class="topspin-view-item" href="#!/77022">
The php that does that is as follows:
<a class="topspin-view-item" href="#!/<?php echo $item['id']; ?>">
The problem is that what is being spat out at the end is not that. It looks like this:
<a class="topspin-view-item" href="http://okgo.net/video-store/#!/89712">
I've understood from another post on here that the default behavior of Wordpress is to fill empty hrefs (ie href="") with the site url. So my guess is that Wordpress is for some reason interpreting this as an empty href? Except that that doesn't seem quite right either.
I've played around with this a bit. One thing that happens is that if I remove the has from the above PHP the siteurl is not output at all. That of course breaks my code.
Any ideas? Any help would be warmly appreciated.

The way we ended up fixing this for those who may be interested is by simply adding the following line of code to the jQuery handler that dealt with the on submit event:
event.preventDefault()
Perhaps this will be of help to someone...

Related

Issue with a wordpress site

Does anyone know why is this thingy showing up on top of our wordpress website, on every single page that you enter - http://sportsabac.org.rs/. Could it be the theme itself that is problematic..? I mean, when I change it - "Twenty eleven" is called, the problem goes away...
The class should be define within tag braces but your class difine outside like
your tag is
class="home blog custom-background single-author two-column right-sidebar">
it should be in
Probably there is closed html tag > just before this part of code.
The class should define within tag braces,
Try this;
<div class="home blog custom-background single-author two-column right-sidebar"></div>
I would like to try that, just as soon as I find out where is it located. This really ain't my thing, just trying my best to fix it.. >.<

has_category WordPress

I would like to check in the Wordpress loop for a category named Hyperlink and Quotes because I will not display those categories.
I checked the Wordpress site, but I am still stuck. What I got so far:
has_category(Hyperlink, Quotes); --> This doesn't work!
has_category(array(Hyperlinks, Quotes); ); --> This doesn't work either!
http://codex.wordpress.org/Function_Reference/has_category
It looks like the proper syntax would be has_category('Hyperlink'). I'm not sure if you left the quotes out by mistake or if you didn't know they needed to be there. They need to be there.
Also, it looks like has_category(array('Hyperlinks', 'Quotes')); would work as well.
HTH,
=C=

Adding A Button Between post-content and Related Posts Thumbnail Plugin on WordPress

I am trying to add a button to my WordPress template. Basically, I have the post and then there is the Related Posts Thumbnails widget that appears. I want the button to go between the text of the post and the related posts thumbnail widget. The code in my 'Single Post' that contains all of this is as follows:
<div class="post-content">
<?php the_content(__('<em><strong>More:</strong> Read the rest of this entry...</em>', 'life-is-simple')); ?>
</div>
I know the Related Posts Thumbnails plugin falls within this code because it's at that place when I 'Inspect Element' on Google Chrome. I can't find how to edit the order of things within that div though. Any help would be greatly appreciated, thanks!
EDIT
Clarification: I am using the Life Is Simple WordPress theme although it has been custom editing quite a bit (mostly on the CSS side of things though).
That plugin is probably appending the output to the_content with a filter .
That means , that the output is being added to the_content automatically. it is a common behaviour.
You need to look at the pluginĀ“s admin interface to see if you can have an alternative way (I believe there is ) which is using a template tag. in that case, you should put the template tag after the div where the the_content() is .
EDIT I :
After a small dig, - in fact there is - you need to put
<?php get_related_posts_thumbnails(); ?>
Then the plugin should know by itself not to append to the_content.
For parameter passing, or if something is not working, go read their APi or help files.
You'll probably need to edit single.php or archive.php in your theme. If nothing is occuring there that looks familiar, it's probably using a loop. In which case you might find what you are looking for either in loop.php, loop-single.php, or loop-archive.php depending on what type of page you are on and how the theme was constructed. Add your button near where you find Read the rest of this entry...
With more information (such as what theme you are using), one might be able to help more as well.

Permalink-safe way to link pages inside footer.php

I am currently building a new theme for my site and am kind of stuck not knowing the proper way to link pages together. What is the proper way to direct visitor to another page if I were to write the link straight into footer.php?
Let's consider the following inside footer.php:
?>
A Link
<?php
That would work well up until I were to change my permalink structure to something else.
What is the proper way to do it(without using WP built in menus or anything similar)?
You can use get_permalink assuming your pages are in Wordpress.
See this link: http://codex.wordpress.org/Function_Reference/get_permalink
The above answer is 100% correct, but to save people some time when they stumble upon this question, I took the liberty of writing it out.
<?php echo get_the_title(12); ?>
This covers everything from hover text to dynamic page title, so if you decide to change "Contact" to "Contact Us," you won't have to remember to update the footer.php file.

How to add search box to drupal page contents (404 page)

I have a theme where search box is hard to find.
Before redesigning it, I'd like to add another, bigger search box to 404 page.
The only solution I found is render search block:
<?php
$block = module_invoke('search', 'block_view', 97);
print render($block['content']);
?>
This is not good solution because one have to find block number first.
How to use search_box() function properly?
Maybe you'd want to try using http://drupal.org/project/search404? I'm not sure if you can disable automatic searching on a 404 page but it's very close to what you are needing without custom code.

Resources