I'm doing a style.php CSS file so I can use some dynamic variables in the CSS within a Wordpress installation:
<?php header("Content-type: text/css"); ?>
and so on.
How can I access a global variable from within the style.php file or pass a variable to it?
The code I'm trying to get to work within the CSS is like
$maincolor = $cap-...
We have an existing Zend Framework site hosted at ourdomain.com and a wordpress blog at blog.ourdomain.com
We want to migrate the blog into the site at ourdomain.com/blog - but I seemed to have googled to the end of the earth and cannot find out how. I have tried various .htaccess stuff, setting up a blog controller and including some w...
I want to make a user class that can edit pages, and save them as a draft without being able to publish it. An admin would have to go in and publish the draft once they approve it.
The idea is similar to TDO Mini Forms except this will be done within the Wordpress admin panel, not be a form, and they must be a registered user in a speci...
Hi,
Have just installed WordPress 3.0.1 running on MS IIS 6 Windows Server that I developed from my Mac OS X platform.
Pls note that my WordPress setup is under the following directory sructure:
c:\inetpub\wwwroot\MYSITE
The problem here is though, with the site up and running, it can't seem to find any of my pages like "About Us" ev...
How do i paginate this? It's a code in wordpress template I'm using to get posts by their first letter. I only want 10 in a page.
$postids=$wpdb->get_col($wpdb->prepare("
SELECT ID
FROM $wpdb->posts
WHERE SUBSTR($wpdb->posts.post_title,1,1) = %s
ORDER BY $wpdb->posts.post_title",$first_char));
if ($postids) ...
Hi
How can a get a object variable from a remote XML file, for example this one ?
In PHP5 it works fine with simplexml_load_file(), but I need this to work in PHP 4 also. How can I do that?
Or is there any built-in WordPress function that can load xml files? I tried using the WP's SimplePie class, but I get a weird object variable (wit...
Is there anyway to have yearly or monthly archives with custom post types in wordpress?
I've searched far and wide to no avail.
I would imagine the url structure to be this:
http://sitename/custom-post-type/year/month
Anyone?
...
Ah I'm desperate, I so help someone can help me out!
I have a domain: example.com. There are various WP installations for different languages, e.g. /en/, /fr/. I have duplicated the English language /en/ to make these other foreign language installations. The original /en/ installation still works great.
The other installations work o...
Hello,
Is it possible to get a list of logged in users in Wordpress?
Thank you
...
Hi,
I only want to return the latest 2 posts but my code returns all the posts, any idea how I can fix this?
Code below,
Thanks,
R.
<?php
$postslist = query_posts('posts_per_page=2');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<div class="post">
<?php the_date('d/m/y', '<div class="date">', '</div>'); ?>...
I've been search for a long time now for a solution to this problem but found nothing so you guys will be my last hope!
I'm trying to build a new CSS3 menu on a Wordpress 3 site that I'm working on. I would need to extend the default menu mark-up but not sure how.
This is the tag I'm using in the theme to output the menu at the moment:...
I have some custom post types, such as 'review'. I can't seem to find out how to make a section (e.g., www.mysite.com/reviews/) which works like the blog home page, but lists reviews instead of posts (with pagination and everything). I'd like to use a separate template for it too.
...
The script below creates a listing of the categories in the site (excluding those in "uncategorized").
If possible, I'd like to modify it so that it only lists the top level categories (no child categories)...
I thought the "depth"=1 argument would do the trick but not so. It lists ALL categories. When I remove the "heirarchical" argy...
I'm building a website using WordPress and am wondering if its possible to display posts and the archives of posts (IE /2010/09 etc.) in a seperate directory to the rest of the site.
Example:
domain.com/blog/this-is-a-blog-post
domain.com/blog/2010/09/
domain.com/about-us
domain.com/products
Does anyone know if this is possible, or has...
I am getting post_title, post_content and other things in $_REQUEST as well as an image file. I want to save all that as a post in the wordpress database. I have on my page
<?php
require_once("wp-config.php");
$user_ID; //getting it from my function
$post_title = $_REQUEST['post_title'];
$post_content = $_REQUEST['post_content'];
$post_...
I want to change my search result for wordpress site. I want the search result to show posts only if it has at least one approved comment.
...
I need to keep track of location and distance like oodle.com does. I don't want it bundled into the url, so I am using cookies.
I use that info on many parts of the page, like the header, sidebar, widgets... etc.
Where can I put the code so that I can access it without a call to cookies... or can I just ask for $_COOKIE['value'] anywh...
I'm trying to create a fully custom feed from my WordPress blog so that it can be ingested by a content management system that uses NewsML. You can learn about NewsML and find a NewsML validator here.
My approach has been to create a WP page template that produces xml rather than HTML, described by a guy named Yoast (google him, I can't...
I am using a plugin for wordpress called "CMS" its a plugin that makes wordpress more CMS like.
http://plugins.trendwerk.nl
In particular it adds multiple text "blocks" to a template, each can be edited in the post.php script using multiple tinymce editors.
The problem I am having is that you can only place images into the main or defa...
Hi,
How can we add a Google map with WordPress.
Consider my coordinates
<longitude>17.549062233809</longitude>
<latitude>40.68792578497581</latitude>
Please can anybody give me an idea.
Thank you
...