Hi there,
In a previous post (http://stackoverflow.com/questions/1172335/dont-show-this-if-the-url-contains-the-following) I asked how I would go about having my header echo a div if the user loaded a URL with /blog in the header.
What I didn't take into consideration, was that I don't want the div to display if its not just got /blog...
function get_first_image(){
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches) || preg_match_all('/<object[0-9 a-z_?*=\":\-\/\.#\,<>\\n\\r\\t]+<\/object>/smi', $post->post_content, $matches);
...
I used a image gallery engine called prettyPhoto.js to a wordpress site that I was creating. However, for some strange reason the image gallery seems to have completely stopped working and I can't for the life of me find out how to rectify this problem (without explicitly going through the entire site and stripping out the rel="prettypho...
Hey for some reason I can't get the page order to update in wordpress any ideas?
http://s72956.gridserver.com/dev/ that is the page but it should look like this http://i32.tinypic.com/5aa82.png
...
I'm working on a plugin that, when TinyMCE is in use as the Visual editor, uses TinyMCE commands to insert text into body content editing area. Currently, it works by just running the command. If it works, then TinyMCE is active and if not, then I have custom JS for working with the HTML editor.
My question, however: is there any way to...
i have been presented with this code. the code displays the title headings of the latest 10 wordpress posts from the database. what i need to do is to eliminate a particular category from this. can anyone please help?
<?php require_once 'news/wp-config.php';
$howMany = 0;
$query ="SELECT `ID`, `post_title`,'post_category...
I know how to hardcode categories, archives, etc into theme but for one of my projects i would have to hardcode some plugins widgets (especially subscribe2) and i'm not sure how to do this. I know i can add widgets via widgets menu in wp admin, but that's not what i'm trying to achieve, i'm trying to set it up permamently in theme for la...
How to automatically create wordpress page (for example when plugin is activated)?
...
Hi,
I am trying to figure out I can only execute my plugin on the single post page rather than the main index page. It is ignoring the tag which I thought would resolve this issue.
Currently, this is how it is working:
add_action('the_content', 'my_plugin');
I tried detecting the but it would return false all time. I thought it...
This works pretty good except it is limited to 10 posts since my blog is set to show 10 posts maximum.
$featured_query = new WP_Query('cat=3');
while( $featured_query->have_posts() ){
$featured_query->the_post();
$postcount++;
...
How can I override that setting and get ALL posts in that categ...
I want my home page to display posts from all categories except one called "music". And I don't want the link to change. How can I hook into the "Front page" or "Posts page" results and filter out one category?
I am assuming I must make some call to the Wordpress API.
Thanks!
...
I have been trying to get the WordPress menu inline and below my side navigation but FireBug is not helping and I cant see where I am going wrong! The doe for the side nav is blow but if you go to http://bradburyembroidery.com/houses4cash/blog/ you will see how it moves out of line!
<?php
/**
* @package WordPress
* @...
I have removed the border of form items on my site but I want them on my blogs comment form!
http://bradburyembroidery.com/houses4cash/blog/hello-world/#comments
I have tried:
#commentform input
{
border:thick;
}
but firebug keeps thinking its saying border:thick none;
Can anyone point me in the right direction?
Thanks
...
I'm new to Wordpress plugins, and editing someone else's to add functionality. I need to retrieve the tags for a particular post.
The get post function is already in use inside the plugin and returns category information. Unfortunately nothing is returned for tags.
The get the tags function appears to be most appropriate but it only ru...
Hi,
I'm writing my first wordpress plugin and I'm trying to create a function to be called when the plugin is activated.
Currently it looks like this:
class ThumbsUp {
...
}
global $thumbs;
function thumbs_install() {
//global $thumbs;
$thumbs = new ThumbsUp(); /* Line 160 */
$thumbs->installThumbsUp();
} /* Line ...
Hi, I am trying to edit the post date on a wordpress post to show a future date is this possible? i.e
posted on 6/06/10 but i actually printed it today
...
Hi, wondering how I change the date wordpress thinks today is.. where does it pull the time and day from and is it possible to change that to say 2010 instead of 09
...
Howdy Guys,
I'm quite new to this (understanding the WP Guts), and I wanted to understand the Hooks and Filters better, I can't get it right from Codex.
I did a simple test,
the idea is to override the get_title() method in order to erase the "Protected: " sentence from the title if the page is protected, there is a protected_title_f...
I am trying to write a piece of code that would allow me to change images or a whole block of a div depending on the language
<?php
if($_SESSION['lang'] == "fr"){
echo "images/header-fr-4.jpg";
}else{
echo "images/header-4-en.jpg";
}
?>
Is there any other way of doing this in wordpress?
...
In my root .htaccess file wordpress has put this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
and in a sub directory I have a .htaccess file that says:
RewriteEngine on
Rewrit...