wordpress

Template choice not showing up with Wordpress custom post type

Hi, I created a custom post type and activated page-attributes in the options. It works just fine (It allowed me to set parent and order), however the template drop down just doesn't appear? It works fine with regular pages. Thanks ...

Wordpress WP ecommerce plugin PHP

Becuase nobody could answer my previous question; http://stackoverflow.com/questions/3483171/wp-ecommerce-plugin-show-categories-and-products-in-tree-view I'm going to do a repost. I've been working on something like this where I'm displaying the categories but now I need to loop round each category within the loop to display products...

WordPress posts sorted by category and year

I've been on a long google search trying to find the solution to this... I am creating a cv manager theme using a WordPress install to control content. I have managed to organise all WP posts in categories but would also like to list those posts in year groupings. Currently I have this: <?php // Categories $cvm_cat_args = array...

In a PHP (Wordpress) loop how do you generate a sequence of unique numbers?

If I have a list being generated in a loop, something like: <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <div id="slide"> <ul> <li class="slide-<?php //how can I generate an integer here ?>"> <a href="#">stuff</a></li> </ul> </div> How could I append a sequential number to each of those classes, and/or those hrefs...

wordpress custom script to handle link!

in wordpress the single page is controlled by single.php theme file. I want to put another link on the single page like "Preview". I want this link to be handled by preview.php. preview.php will be stored in theme directory! how to handle this? usually I do these using init action hook! if the variable exists in the query string, I perf...

Stripping Wordpress Post Content, Leaving Permalink Intact

Is it possible to execute an SQL query that would strip all post content, except for the Permalink (and/or Post Title) from Wordpress posts marked as "Private" in your database? Basically, I have a ton of old Wordpress posts that I have marked as Private. I don't want to delete the posts entirely, I just want to slim down my database by...

Wordpress Get value of queried category in URL

Hi Guys, is it possible to know what's the first category queried in a wordpress URL? Example: http://www.mywebsite.com/category/mycat/mysubcat/ My Categories hierarchy is Something Like Parent Cat 1 Parent Cat 2 Parent Cat 3 Subcat 1 Subcat 2 Subcat 3 Parent Cat 4 Subcat 1 Subcat 2 Subcat 3 What i'm trying to do is to ...

Displaying code snippets from WordPress custom fields

Hi I'm trying to display code snippets entered into my custom field. An example code snippet entered into custom field - snippet-1 <?php if (($wp_query->current_post + 1) < ($wp_query->post_count)) { echo '<div class="post-item-divider">Post Divider</div>'; } ?> If I try to display this code wrapped in <pre></pre> tags in my page ...

wordpress plugin that can do syntax highlighting of java/scala/python etc code in comments

There are several wordpress syntax highlighting plugins available and they work fine for blog entries. But I want a plugin that works in the comments. I received a comment on my wordpress blog which has some scala code. This code is not highlighted and the indentation is messed up. I searched on google and couldn't find a plugin that wor...

WordPress: Custom URL rewrite with parameters

I have a WordPress-Installation with the permalink strukture /%postname%/ Now I'm working on a solution to include static html-pages into the WP-Framework. I am using a WordPress-page with the name "html" (page-html.php) to manage the include. I would hand over the the old html-filename and path as a parameter to the page. With the he...

nginx - 404 not found page for permalinks

Me and my friend have had a website (http://www.ferfereh.ir - sorry not english) for a year. We've been using a Linux Apache host with wordpress installed. Now suddenly all of our posts (which had a permalink structure = /%category%/%postname%.html) have broke and says: 404 Not found nginx Maybe our host provider has installed NginX. ...

AjaxUpload $_FILES array is empty

I'm trying to use wordpress' built-in ajax to process an upload using the AjaxUpload script. The script was updated in august, and now i can't get it to work any more. http://valums.com/ajax-upload/ here's my jquery... this seems to be in place as i get input is transformed into an upload button and on selection of the image it begi...

Converting a static site to a Wordpress site...how to transfer/convert SEO rankings?

I'm going to convert a client's static site, all hand coded HTML pages to Wordpress. They have a bunch of static pages that I'm going to keep as 'pages' in Wordpress. There will be some static content that I'm going to convert into blog entries (and back date them). How do I transfer their search engine rankings to the new Wordpress si...

Unremovable wordpress posts

How to make post unremovable? So, even admin will not have the abillity to delete it. ...

PHP: parent::somefunction or $this->somefunction

actually this question popped out when i was looking at thw wordpress codex about widgets but i think its more of a PHP question. 3 questions here actually: why is the codex and the book using 2 seemingly different methods to contruct the widget. codex uses parent::WP_Widget (static method?) and book uses $this->WP_Widget (instance me...

jQuery Lava Lamp Navigation Problem in WordPress

Hi, I've implemented a lava lamp style navigation menu (from here) to work with my WordpPress blog's navigation menu. This function needs to select an id or class for the navigation menu link it is supposed to hover over. I set this up in the function's code to select <li class="current_page_item">, which is a class applied by WordPress ...

Wordpress post visit count?

Hello,sorry for starting another post,here is the link of my previous similar post my previous question.Problem is when someone visit some post,I want to record that,to increment counter for that post.But counter is also increment for previous post(always previous post).Can not find a way to solve this. here is the code that I use : fu...

displaying wp e-commerce

Hello guys, got a bit of a stupid question, i installed the w e-commerce plugin and i want to show this on a custom page. What code would i need to enter in my content div to display to plugin? ...

[Wordpress] List sub-pages, but skip 1st level

How can I list subpages but skip the first level of pages? Here is my current query, but I want it to drill down 1 level deeper and only list sub-sub-pages. <?php $args = array('post_type' => 'page','numberposts' => 10,'post_parent' => $post->ID); $subpages = get_posts($args); foreach($subpages as $post) : setup_postdata($post); ?> <div...

Wordpress: Jquery error while editing post or page.

I'm using wordpress, lately I'm having a jquery error while editing a page or a post, saying that jQuery is not defined. I don't know how this happened. did anyone have the same issue? Any idea on how to fix it? Thanks. ...