Hi
Does anyone know how can I replace the "comment_author_url" field from all comments by running a SQL query?
for example if this field is http://google.com to replace it with "" (empty string)
...
I have the following code on a WordPress page. It basically just grabs 3 posts and displays them as well as the page content itself up top. What I want to add is pagination so that a user can flick through all the posts, how do I get this working with custom loops like this?
<?PHP
get_header();
/* Template Name: Ne...
Hi, can someone tell me why this code doesn't work? The is_page() is not in effect.
function tao_scripts() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', get_template_directory_uri() . '/js/jquery-1.4.2.min.js', false, '1.4.2');
wp_enqueue_script('jquery');
if ( is_page() ) {
...
I have the following code in my functions.php:
function get_images($size = 'thumbnail') {
global $post;
return get_children( array('post_parent' => get_the_ID(), 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );
}
And in my single.php
<?php $phot...
I'm trying to output a custom post type but nothing shows up. The code is very simple - what could I be missing?
<?php
$favorites = new WP_Query(array('post_type' => 'favorites', 'posts_per_page' => 10));
while ($favorites->have_posts()) : $favorites->the_post();
echo '<li><a href="' . bloginfo('template_directory') . the_post_thumbna...
This is the first time I've implemented an eCommerce system for my freelance business, and I'd like it to go smoothly. So to get started, I'm asking the questions here.
I'm using Wordpress because it's nice and simple. I want to offer customers a way to be able to pay invoices online (hosting and freelance services), either within Wordp...
I have a problem with Wordpress. I want to create a text widget with title as
Support & FAQ
But since I want to validate XHTML, I am writing it as Support & FAQ
The problem is when I save the widget in iBlogpro Theme, amp is changed to simple & by Wordpress.
...
I need to add links to WordPress Posts on a static HTML page. I got some information that has been helpful but need a few more elements to make it complete.
Here is the code I have so far:
<?php
$number = 5;
$wordpress_header = "blog/wp-blog-header.php";
// Include wordpress header
if (file_exists($wordpress_header))
...
I would like to have the currently displayed Page or Recent post highlighted with CSS.
Something like this:
PAGES:
...Home
...About <--current page
...Contact
RECENT POSTS:
...post1 <-- current post the user is seeing.
...post2
...post 3
I used to accomplish that assigning an unique id to the body tag to make each page unique f...
hello I am a wordpress theme developer. i created a theme which works fine in WP_DEBUG=False but gets undefined index error when I set WP_DEBUG=True
My theme has an options page, whenever i click on save i get these errors:
Notice: Undefined index: ang_temp in C:\xampp\htdocs\wordpress\wp-content\themes\Angelia\functions.php on line 1...
Is there a way to insert one (or more) upload field on a custom post type edition page?
I don't want to use the midia gallery with all the fields and stuff.
...
I'm trying to use feedparser (an excellent library) to parse WordPress export files, and a (minor) inconsistency between WordPress version is causing me a huge headache.
WordPress 2.x doesn't include atom:link tags in the XML output (without_atom_tags.xml). When parsed, namespaced elements are available without the prefix:
>>> feed = ...
Hi,
I am trying to write a simple plugin to wordpress but i have a problem.
this is the plugin:
function replace_css_php($text){
return str_replace(".css",".php",$text);
}
add_filter('bloginfo', 'replace_css_php', 1, 1);
add_filter('bloginfo_url', 'replace_css_php', 1, 2);
the problems is that other plugins (not my plugins), ad...
Ok, so here's what is going on...
I am pulling a list of the most popular post titles from Google Analytics and I'm placing them in an array
$thisnumber = 0;
$start = date('Y-m-d', (time() - (60 * 60 * 24 * 30)));
$end = date('Y-m-d');
$limit = $getnumber;
$titles = array();
$login = new GADWidgetData();
$ga = new GALib($login->auth_...
Hey, I'm trying to build the most intuitive possible Event post type. I'm wondering if there's a core method to both print out and capture the contents of a date field - specifically year/month/day, I don't need hours/minutes. I also need to be able to sort entries by date to print out later - for instance, I need all of the events from ...
Ok, so I'm using the new TwentyTen theme and getting familiar with it. From what I understand you create a custom menu and picks it's spot, which was done with no problem. The menu consists of all of my top level pages, but only one page gets the current-menu-item class added to it's list item when you're on that one page. The rest of th...
Hello,
I just installed a new plguin in wordpress, and found out that the plugin uses a custom url like /?m=value. How do i add custom url?? Do I call it a custom url or ??
Thanks,
Moon
...
So each post it will be posted in one category, and for each post I want to get the posted in category permalink, only the URL without markup.
How can I do that?
//Explained again
Well the post is posted in a category, right? Well I need to show that category, but not the name of the category, the url for that category.
...
Hello,
I have a typical mail.php script, which uses the mail() function. After the user inputs information into a typical HTML form, I have the mail() function send the email to the desired email [with mail($email_of_client) etc etc]
My question is this:
After the email sends, I want the user to be redirected to a ThankYou page (run u...
I'm using WAMP and the root folder of my page is: http://localhost/projects/bp/
In a Worpress application and I want to give unique id's to the body tag of every Page. So I did the following:
<?php
$page = $_SERVER['REQUEST_URI'];
$page = str_replace("/","",$page);
$page = str_replace(".php","",$page);
$page = str_repla...