Modifications to theme and plugin files to create new functionality.

learn more… | top users | synonyms (14)

4
votes
2answers
2k views

Is it possible to change the attributes of a registered style or script before it fires?

I'd like to modify the properties of a registered style(or script - same applies) before it's been loaded. Right now i'm trying to modify a registered style just before it gets enqueued, so i can ...
2
votes
1answer
2k views

Custom post type permalinks breaking due to 3.1 bug fix

So I just updated a site to 3.1 that uses several custom post types. When I had made the site I had not noticed at the time the $post_type parameter for register_post_type has to be in all lowercase ...
2
votes
1answer
3k views

Why are images not displaying?

Server: IIS 6 WordPress version 3.1.1 Multisite using SubFolders I'm able to upload images to the server, but thumbnails and full size images do not display. If I try to edit the image, the preview ...
0
votes
1answer
1k views

the_post_thumbnail() returns nothing even though has_post_thumbnail() returns true

has_post_thumbnail seems to be working fine but the_post_thumbnail returns nothing. here is my code: if ($favorite_post_ids): foreach ($favorite_post_ids as $post_id) { $p = ...
1
vote
1answer
729 views

Custom post type and body_class: Remove “blog” class

I am using body_class(); to style different sections of a wordpress site by their body class. Page styles descend from .page-template, blog styles descend from .single-post and/or .blog etc. I have ...
1
vote
1answer
2k views

How to make condition, based on custom fields value?

So what i would like to do is order in some CSS depending on the value of a custom field. The code below just says that if there is ANY value, do X, else do nothing... <?php ...
-1
votes
2answers
139 views

Developing Themes on WordPress, Looking for Excellent Tutorials

I am a beginner at WordPress. I know html, asp, a little PHP and I'm familiar with WordPress. I want to be an WordPress expert. So far I know WordPress involves designing themes, making plugins and ...
0
votes
2answers
110 views

How to run a test WordpressMu to Wordpress3 update?

Currently I am running a wordpress MU site with ~100 blogs. It's Wordpress MU version 2.8.x Because it was so heavily used, I was asked not to update to Wordpress 3 right away. The users are ...
0
votes
1answer
644 views

How to display this meta data (an array) in form of a function (created with a custom write panel)?

I'm using the following code to create custom write panels: <?php $key = "project"; $meta_boxes = array( "project_services" => array( "name" => "project_services", ...
3
votes
3answers
2k views

Integrating plugins in themes

I could not find a thread discussing this, so starting this one. I am currently working on a rather elaborate theme for 3.1+, and by elaborate I mean that in addition to styling and regular front-end ...
0
votes
1answer
4k views

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( 'catalogs' ); $mycatalogs = array( -1 => 'Select a catalog' ); if ( $catalogs_terms ) { ...
3
votes
4answers
186 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 ...
1
vote
0answers
341 views

Custom taxonomy permalinks and custom post types [closed]

I have set up a custom post type called "Portfolio". I have asigned this custom post type 2 taxonomies, "Clients" & "Service". The portfolio homepage URL is as follows: ...
0
votes
1answer
156 views

Not Found when using activity stream as front page with BuddyPress

I'm trying to create a Thematic child theme that uses BuddyPress. First, I tried using BuddyMatic -- which currently doesn't work with WP3. Next, I tried the BuddyPress compatibility pack -- which ...
0
votes
1answer
474 views

Background image in login showing in admin area

I have customized my login screen with a logo using html{background:#E2DEAF url(.../images/login_logo.jpg) center top no-repeat;} because it is so wide. Usually would not tie something to the HTML ...
0
votes
1answer
85 views

Wordpress Command Question

Ok would like to learn how to run commands through WP rather than SQL commands So I have created a text file named delete-non-authors.php to delete authors with no posts Do I need to add this to a ...
0
votes
3answers
93 views

Should we localize custom-made themes / plugins?

Does anyone know how much do the localization functions from WordPress affect the speed of a website? Do you think it's worth replacing all strings with gettext inside a theme, even if it will only ...
10
votes
4answers
186 views

What do you think about custom designed plugin/theme options UIs?

You probably noticed the trend of making custom designed plugin/theme options UIs, especially in the commercial ones (on CodeCanyon for example - custom boxes, tabs, accordions etc). I personally ...
1
vote
1answer
8k views

How to link external javascript files?

I am working on a custom Wordpress theme for my bosses website. I have everything working perfectly so far except for one thing... the external javascript files will not work. I followed the exact ...
1
vote
1answer
301 views

Truncating varying lengths of information

I was helped not long ago with a form of custom truncating by Toscho on this post it works very well but I'm finding that I need to create multiple length variations for different bits of content. For ...
0
votes
1answer
478 views

Problem with WP_Query loop and search term

I have a custom query to display random posts in my sidebar like this: $newQuery = array( 'post__in' => get_option('sticky_posts'), 'post_type' => 'ad_listing', 'posts_per_page' ...
0
votes
1answer
155 views

Create new network instance, import old single installs AND keep the urls?

I've two wordpress installs at example.com/blog example.com/otherblog What I want to do is install WP at the root, and have a network, but maintain the URLs. I'm confident I can install WP, and ...
1
vote
1answer
860 views

Automatically exclude categories from metabox based on title

I am designing a website which will be used as a school PA system. Users will be posting entries into categories named for specific dates that correspond to school assemblies. We have two assemblies a ...
7
votes
2answers
5k views

How do I query by post format in WordPress 3.1

I am trying to query for all posts with a post format of 'quote.' I have added the post formats to my functions.php with add_theme_support( 'post-formats', array( 'image', 'video', 'gallery', 'quote' ...
1
vote
2answers
2k views

Query posts by category AND custom field, then ORDERBY another custom field - help!

OK I need to query posts using the following criteria: category_name=office, meta_key=featured_post, meta_value=Yes and order these results using a second custom field which has a numerical value ...
1
vote
2answers
2k views

custom headers for static home page and posts page

have a site w/a static home page and a posts page and then a number of other static pages - i set up a custom header for the home page and then another all other pages like this in the header ...
0
votes
1answer
368 views

Wordpress 3.1 makes my drop down menu dissapear, jquery dont work

Please help, After i upgrade to WP 3.1 just now, all my site menus not working, no drop down menu, and the jquery countdown not working. please help me.
1
vote
1answer
463 views

Wordpress 3.1 .htaccess contents keep dissappearing?

I have Wordpress 3.1 installed in a subdirectory of a shared hosting account, it's a linux server and mod_rewrite is enabled and working fine elsewhere. The contents of the .htaccess file disappear ...
1
vote
1answer
329 views

Custom options below pages/posts editor?

I want to add permanently boxes below Visual/HTML editor for each page/post. I've never played with custom fields before, and I'm not sure is it way to go? If yes ten tell me, good people of ...
1
vote
2answers
1k views

How to load a new template page according to a particular URL?

I want to load some of the pages(not wordpress page, a template file other than wordpress's default template file) according to the url came on the address bar. for instance, I have page in my ...
0
votes
1answer
156 views

title tag function

I am using a function to display the URL on title tag, I coded this function which works properly but I would like to customize it more further. function title_tag() { $a = $_SERVER['REQUEST_URI']; ...
0
votes
1answer
851 views

How can I disable the update notice for non-administrators?

As I already told, I'm setting up a Blog for a friend. Next to not being him an administrator but an editor that can make changes to theme options) I have an additional question. I don't want him to ...
0
votes
1answer
346 views

Prioritising and Ordering Posts By Category Name Using A Custom Loop

I have a custom loop pulling out videos all assigned to various categories. However there is a category called "new-video" and I need to pull out all videos using my custom loop, but I would like the ...
1
vote
4answers
1k views

WordPress multisite installation broke menu links

I am using the Thesis theme with my WordPress multisite installation. I also changed the permalink settings from the Super Admin settings to remove /blog/ from the path. But now my menu links are ...
0
votes
1answer
137 views

Restrict Viewing of post on both front and backend?

Any ideas to restrict viewing of posts to post author only? The twist: Restrict both back AND frontend. I'd like to avoid the role scoper plugin. Example: The author creates a post, and can now ...
1
vote
1answer
679 views

Calling a php file from a javascript file in wordpress

I have a simple pop up form code written in javascript. It is in js/script.js folder inside themes folder. I am using jquery ajax method to communicate with a php file to store data in db. The php ...
0
votes
2answers
138 views

Instant install of wordpress

I just think about that... maybe it exist...you will tell me... Wordpressis a beautifull software, and the thing i like the most, is the instant install of the theme and plugin... So i though, why ...
1
vote
2answers
3k views

Adding Variables to post query

How do I add custom variables to the wordpress query without having to hit the database twice. In the example below I want to add some meta filters. All this code works fine but I have been running ...
0
votes
1answer
198 views

Use custom header as WordPress header

My site is running on site say : www.xyz.com My blog is at say : http://www.xyz.com/blog I have one header implemented in my main site, I want to use that header file as a worpress header. Is there ...
0
votes
1answer
195 views

Where is this query?

This query given below appears alot in my slow-query log. Can someone please tell me where can I find this query ? that will help me try to modify it SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM ...
0
votes
1answer
182 views

Custom taxonomy admin description

Is it possible to add a short description to a custom taxonomy's admin area? For example, I've added a taxonomy that determines what kind of banners are displayed on a post's page. In the meta box ...
0
votes
1answer
261 views

Making jQuery-based galleries with Wordpress without a plugin?

I've been racking my brains for the best way to create a simple gallery in Wordpress without relying on a plugin like NextGen gallery, and was thinking a shortcode would be a good way combined with ...
0
votes
1answer
277 views

WordPress - using sessions?

http://diovo.com/2009/10/using-sessions-in-wordpress/ This is working on one blog,but not on other,what could be the problem? How to find what is a problem? Tnx in advance
0
votes
1answer
511 views

Document.body.scrollTop in Wordpress

I have a script that loads jQuery when an element comes into the viewport, as discovered by Javascript (without a library), and it looks like this: viewport.js: var height = 0; if( typeof( ...
2
votes
2answers
2k views

sanitize attachment filename

I'm looking for a way to sanitize the filename of user uploaded attachments. I thought that wordpress already did it but I faced preblems after an user uploaded an attachment containing a '°' . That ...
1
vote
1answer
271 views

File available but giving 404 in wordpress

Hey, im not sure why but php files other then wordpress either redirects to homepage or gives a 404. for example i have a timthumb.php in directory /js/ it was working fine and generating ...
2
votes
2answers
270 views

Is it ok to not a have child theme and just create a theme from scratch?

I would like to know if creating a Wordpress theme from scratch is good? because I know the template tags in wordpress and other tags ... ...but Will I get any future problems in here when it comes ...
3
votes
3answers
354 views

Editing theme files and access to the Code pages only to super-admin?

When I deal with Multisite installation.Some themes like mystique and aparatus provide the widget areas with in the theme-settings page to enter Advertising codes in the form of HTML or java script ...
1
vote
2answers
305 views

Posts wont expire

I am having some trouble with scheduling posts to automatically expire (either by deleting or going to draft), every plugin I have tried does nothing and when it reaches the scheduled time nothing ...
3
votes
3answers
2k views

Wordpress hook before inserting post into database

I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found. is there a wordpress hook that executes "just before the post is inserted into ...