0
votes
1answer
584 views

How does one programmatically manage posts from a external php script?

How does one create a post, assign it to a category, add tags to it and set the featured image from a PHP script that exists somewhere on disk (say /usr/local/process.php) and isn't part of the ...
2
votes
1answer
995 views

media_handle_upload weird thing

I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and ...
0
votes
1answer
690 views

How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?

I just upgraded from 3.0 to 3.1.2 and in the comments column under Posts in the WP Admin, this error keeps appearing for every row: Warning: number_format() expects parameter 1 to be double, ...
0
votes
1answer
389 views

How to fix these PHP Warnings with the “Feed JSON” plug-in?

I'm getting the following PHP warnings when using the WordPress plug-in "Feed JSON". Can someone tell me how to fix them? Warning: Invalid argument supplied for foreach() in ...
0
votes
2answers
396 views

Site DOES NOT LOAD after 3.1 update

I recently updated my site to 3.1 and now the frontend of the site will not load. The weird thing is the admin section does load and is some what functional (sometimes the pages go blank and I have to ...
3
votes
4answers
174 views

How to disable 3.1 “Admin Bar” via script for the admin user?

Every time I create a new site under 3.1, my first trip is to the Users > Admin User profile page to uncheck the "admin bar" checkbox. I'd like to place a script in my theme's functions.php to do ...
0
votes
1answer
303 views

Post thats in Two Categories, only want to display name for one

In my Wordpress site I've created, I'm having issues hiding or not displaying one of the category titles I set up. I'll try to explain better. Wordpress Admin Side I have a post that is in two ...
2
votes
1answer
323 views

Add filename to attachment page url

I wan to change my premalinks to attachment pages from http://example.com/.../attachemnt/something to http://example.com/.../attachemnt/something/something.jpg It should simply add filename but with ...
2
votes
2answers
235 views

Comment filtering (search)

Basically I want to develop the ability to search comments on my site. A form with input field where the visitor can enter a search string, which tells WP to display only comments that contain that ...
0
votes
2answers
372 views

Custom Slider Per Page created

I am developing a site that will need to have a slider with 4-8 images, but only on certain page-types. These pages must be editable and the sliders must be able to be updated whenever I'd like. I ...
3
votes
1answer
898 views

Get the sidebar ID in which the current widget was dropped

How can I find out in which sidebar was a widget dropped? From inside that widget. More precisely from the form() function. Can I automatically remove the widget if it's not added in the appropriate ...
2
votes
1answer
283 views

Count widgets of a certain type

How can I get the number (count) of, let's say, text widgets from a sidebar? for eg. if I drop 4 text widgets in the sidebar, I want to get this number somehow from another widget
1
vote
1answer
348 views

Fastest way to get the comment and ping total count for a post

I'm making my own comment template (like this) and I need to know how can I get the comment and ping count for the current post, maybe using a fast database query or something like that? Note that I ...
1
vote
1answer
190 views

Prevent WordPress from loading comments

I'm displaying the comments for a post my way, using $comm = get_comments() and then passing $comm to wp_list_comments() (this is the reason why). How to disable WordPress from loading comments from ...
2
votes
2answers
865 views

Getting $comments outside the comment template

I have a ajax request hooked on "template_redirect" (the ajax requests the post's url), and I want to display only the comment template: function get_comm(){ if(isset($_GET['get_my_comments'])): ...
2
votes
1answer
1k views

WP_Query with the “offset” argument

I'm making a custom query for posts using something like: $p = new WP_Query(); $p->query(array('offset' => 30, 'posts_per_page' => 10)); If I have 36 posts on the entire blog, ...
1
vote
1answer
109 views

Author Tracking Code!

I need help with coding this piece. Basically i want with someone click on my author page. It stored a cookie of that author name and email. I want the cookie to stay in place untill the person close ...
3
votes
3answers
2k views

Need help with friendly URL's in Wordpress

I'm creating som custom templates in Wordpress and I'm passing some data in the URL's. Currently my URL looks like this: http://www.mysite.com/designers/?id=43&name=designer+name The URL ...
3
votes
1answer
2k views

difference between esc_attr(), strip_slashes(), strip_tags()?

So what's the difference between these, and when should we use each one? Is esc_attr() safe enough to escape any type of data you get from the user ?
1
vote
1answer
263 views

want to create a subcategory.php to manage subcats

is it possible to create a subcategory.php and use it to manage subcats. or is there a way to get around this. if it is not possible.. is there something like this <?php if(is_subcategory() || ...
1
vote
1answer
498 views

Widget Javascript code (ajax)

I have a widget like this: class test_widget extends WP_Widget{ function test_widget(){ $widget_ops = array('description' => 'test widget'); $this->WP_Widget(false, 'Test', ...