I have WP 2.9 installed on an IIS 7 server. Permalinks works with the URL Rewrite add-on for IIS, but I'm wondering if it's possible to use different permalink structures for pages and posts. For instance:
Pages would be www.url.com/$pagetitle/
Blog posts would be www.url.com/blog/$entrytitle/
Is this possible?
...
I have a permalink working but as soon as I create a post it tells me that soory post not found permalink setting is to "/%pagename%/" and here is .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ryan/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
R...
I am currently working on a plugin for Wordpress involving lots of .php files. I see that for my AddShift.php file, we are successfully importing the blog header using the following line of code:
include("../../../wp-blog-header.php");
However, when I try to do the same thing in my ajax_cal_split.php file, I get the following error:
...
I run a blog where the community can post time-sensitive community links (sports scores and such). After a certain time, those posts are no longer useful, so I want to delete them in batch via a MySQL query, but I don't know how. I imagine that getting rid of those posts entirely is more than just deleting from the wp_posts table, right?...
I'm pretty new to sIFR and though I've used it successfully for simple applications like headings, I'm trying to use two different fonts simultaneously - one for a heading and one for a menu.
The heading works fine, but I'm stuck with the menu. I'm using the Tofurious Wordpress theme. This is the section of the theme's stylesheet that go...
Can a function inside the functions.php file call another function from within functions.php? I'm guessing yes and which is why I wrote the code below, but it doesn't work for some reason. Can anyone please check it out and help me.
I tried calling pageBarColor() from register_sidebar()
Thanks.
<?php
if (function_exists('register_side...
I need to have custom page as homepage and I know how to do that (http://www.lancelhoff.com/how-to-set-a-wordpress-static-front-page/), but when I set custom page as homepage, I cannot have latest posts page. So how can I link to latest post pages, because it's address isn't anymore root path?
...
Hello,
with
<?php
if (is_category())
echo single_cat_title();
?>
i can show up the current category title..
how can i insert the tag single_cat_title() into:
<?php
$recent = new WP_Query("cat=10&showposts=4"); while($recent->have_posts()) : $recent->the_post();
if (in_category(10) && in_category(**Insert Here*...
I have a WordPress Install on an IIS server using Helicon APE to emulate .htaccess config
I have the standard wordpress .htaccess to setup the url rewriting
However, as far as I can tell, wordpress then use the server variable ( echo $_SERVER['REQUEST_URI'] and/or $_SERVER['HTTP_X_REWRITE_URL'] ) to now what page to serve.
As both var...
Hello guys,
Quick question I currently have a small bit of code that is pulling comments from a comment box on one page and displaying those comments on another page.
Here is the code that I have on my page.php:
<div id="comments">
<?php if ( is_page('share-your-story')) {
$comments = get_comments('post_id=2583');
foreach($comments ...
I am using Wordpress and I am trying to create a splash page that users will hit when going to my webpage before going into my blog.
My first question is what is the best way of creating this splash page?
My second question is if I created this page is it going to prevent search engine crawlers from hitting my site and seeing new cont...
Whats the best practice for getting a commenter's email address from the cookie (this is for a WordPress plugin)? Part of my plugin relies on having an email address and I'd like to try to get it even if they are not logged in by checking for the existence of a comment cookie (which should be there if they've made a comment in the last y...
I am running the following piece of code (assume all variables have values) is a custom importer that I am trying for Joomla2Wordpress.
$ret_id = wp_insert_post(array(
'ID' => $pinfo,
'post_date' => $Posted,
'post_date_gmt' => $post_date_gmt,
'post_author' => $authorid,
'post_modified' => $LastMod,
'post_modified_gmt' ...
I have downloaded a WordPress Theme that has a GNU licence. I need to modify it quite a bit to make it compatible with my site.
How does the licensing work on this? The original had a "Designed by X" in the footer but now I have made changes, I'm sure they won't want to look like they created it any more as it is not the same as the or...
I have been trying to figure out how to display a advertisement on a wordpress blog every N posts..
I have found lots of plugins and guides that show you how to print a ad which just counts how many posts are on the current page.. (ex.. print ad every 3 posts)
My problem is, it seems it just counts only the page that you are currently...
Hey all,
I'm a total regexp noob. I'm working with wordpress and I'm desperately trying to deal with wordpress's wautop, which I hate and love (more hate!). Anyways I'm trying to remove <p> tags around certain commands.
Here's what I get:
<p>
[hide]
<img.../>
[/hide]
</p>
or
<p>
[imagelist]
<img .../>
<img .../>
[/imagelist]
</p>
...
Related
Why does every man and his dog want to code a blogging engine?
What are the advantages and disadvantages of coding your own blogging engine from scratch, versus using an already existing engine (for example, but not necessarily, wordpress)?
...
Apparently the following simple code breaks the shortcode API of wordpress. When I add this code in the function.php the shortcode API won't work.
This code is normally to add a text at the bottom of each page, any idea why?
function cmstut_basic_promote($content)
{
echo $content;
if(is_single())
{
?>
<div class="promote">
<h2>En...
We have selected to show 5 posts per page in admin panel.
And we want to show 10 posts per page in specific category (for example, "projects" width id=2).
How would we do it?
...
In my theme I'm trying to display the excerpts or teasers of child pages, yet I do not want to display any images, I want image tags stripped out.
Once I've gotten the teaser in all its html glory in a php variable, how do I strip out the img tags prior to using echo?
...