The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

1
vote
1answer
131 views

Wordpress: Access a plugin from within a theme

I am creating my own custom wordpress theme, this in general is not the problem. I would like to use a plugin that is normally used within pages/posts. (NextGen Gallery, to make a sort of slide show ...
0
votes
1answer
159 views

Call Current Category

I'm using this in a file named category-portfolio.php which is for the archives page of my portfolio. I don't want to use cat= to specify a specific category. But when I don't use cat= it pulls up ...
0
votes
3answers
238 views

A better code for no post format?

As suggested on this site, I am using this code to style an excerpt if no post format is selected/if it is a standard post. <?php $format = get_post_format(); if ( false === $format ) { echo 'This ...
0
votes
1answer
910 views

Add extra field to users

I have this code that adds the check box to the 'Edit User' page but when i check it, and refresh the page, the box becomes unchecked... what is wrong? add_action( 'show_user_profile', ...
0
votes
3answers
3k views

Create post from form with image

I found this wonderdul script that @Bainternet here at Wordpress Answers created, that makes it possible to attach images into posts from a html form.. I tried to combine in into my "html form to ...
1
vote
1answer
81 views

How do the pros code up a WordPress theme? Locally? Through FTP?

Up until now, I've been building my WordPress sites by transferring files through FTP. This can sometimes get really slow (time it takes to upload the file, Firebug slows to a crawl, etc.) and I was ...
5
votes
2answers
2k views

How to Remove all Instances of edit_post_link

Can someone please assist with how to remove from my theme, whilst in author mode, the edit_post_link (Edit link), throughout all my pages. Which php files in the Twenty Eleven theme (WordPress v3.2) ...
-1
votes
3answers
1k views

PHP code for link with text

I was exploring and ran across this post: Grab First Link From A Post, Grab First Blockquote I would basically like to do the same thing, but have it call not only the URL but also the link, since I ...
0
votes
2answers
1k views

Category.php template for custom posts

I'm trying to use my category.php file to display all posts of a certain custom post type (say "Company") with a given category. However, when I try to use it by navigating to ...
0
votes
1answer
663 views

Show the categories the current post has

I have a custom post type; posts of this type can have either one or two categories associated with them. I need to display the names of the categories that are associated with each of these custom ...
0
votes
1answer
102 views

Page permalink rewrite

I added the following code which allows categories on my 'Page' post type. add_action('init', 'edit_page_type'); function edit_page_type() { register_taxonomy_for_object_type('category', ...
3
votes
2answers
2k views

How do I remove a require_once admin panel from the parent theme from the child theme functions.php?

In the parent theme, the following is at the bottom of the functions.php file. require_once(TEMPLATEPATH . '/admin/admin-menu.php'); In the child theme's function.php, this code will include the ...
0
votes
2answers
2k views

PHP echo inside javascript

I've got jwplayer installed in wordpress and have it showing in a single.php page... the way I have it I need to get a custom field in the javascript and I;m having no luck echoing it in there. I know ...
0
votes
1answer
116 views

single.php error

writingyourwaytosuccess.com/blog Attempting to view a single post returns the following error: Fatal error: Call to undefined function atmosphere_posted_on() in ...
0
votes
4answers
544 views

Get Page ID from Backend

How can i get a page ID from the Admin backend? I'm saving data into a metabox on a 'Page' post type, and I need to return that data on the page in another area. But $post->ID obviously dose not ...
1
vote
1answer
502 views

Importing Geo data into wordpress database

I have a listing wordpress site and want to integrate geo data into the Wordpress MySQL Database for custom search functionality I want to utilize different aspects to create different things... ...
1
vote
1answer
2k views

Colorbox ajax loading of outside HTML content works perfect on localhost but not on server

I am trying to render content generated by a php file in [jQuery Colorbox][1] through AJAX in my WordPress site. The PHP resides on the same server in the same domain. It works perfect when I run it ...
0
votes
1answer
651 views

Help with Wordpress function inside a shortcode

I'm trying to spice up a theme of mine with some shortcode buttons but I'm having quite a bit of trouble when trying to call the author's name within the button itself. I tried simply including ...
1
vote
2answers
180 views

sidebar isn't showing, what's wrong w/ this code?

Here's what I have in my sidebar.php: <aside id="sidebar"> <?php if ( is_user_logged_in() ) { echo '<a href="/community"><img id="visit-the-forums" src="'. ...
2
votes
3answers
8k views

Setting custom cookies in Wordpress

I am trying to set cookies to re-route returning users to my a specific page within my Wordpress site. I'd like some advice with these 2 things: Where in the Wordpress php files should cookies be ...
-1
votes
2answers
2k views

How to strip/remove all blank spaces at the beginning/end of a search string

I use hack of Chris_O for highlighting the search terms. When a user enters the search keywords without any blank space in the beginning or at end of the search string it retrieves and highlights the ...
2
votes
1answer
747 views

Wordpress custom image size on custom field image

Hi can anyone tell me a good way to use a custom image size with a custom field image in a template without using something like timthumb/phpthumb. I've set an image size with... add_action( ...
7
votes
4answers
3k views

Wordpress and magic quotes

I've been writing some Wordpress plugins, and I've been having some problem with Wordpress putting magic quotes on POST and GET data. Specifically, the "wp_magic_quotes" function in ...
0
votes
1answer
53 views

Help Combine These Two PHP Codes

I have my WordPress post format codes: <?php if ( has_post_format( 'image' )) { echo 'This is a image post'; } ?> And my code to grab the first image from a post... <a href="<?php ...
0
votes
1answer
2k views

How do I hardcode a WordPress shortcode into my theme?

I am using WooTheme's Canvas theme and would like to "hardcode" in the [post_comments] shortcode into my theme. [post_comments] displays a comment link with comment count (ie Comments 10) in my post. ...
0
votes
2answers
270 views

If Statement Post Formats: No post format selected

I'm working with post formats, most of my code looks similar to this: if ( has_post_format( 'standard' )) { echo '<?php get_sidebar(); ?>'; } if ( has_post_format( 'aside' )) { echo 'this ...
1
vote
3answers
285 views

How to create post thumbnail

I am working on the WordPress Twenty Ten theme, and I want to display post thumbnails. I have followed the steps below: Added following code in functions.php file: if ( function_exists( ...
1
vote
2answers
1k views

Wordpress WP_Query() Not working properly

We would like to know that how we occur error when we implement this code in our sidebar.php $categories = get_categories(); foreach($categories as $category) { ...
-1
votes
2answers
2k views

Wordpress WP_Query() Not working properly

I would like to know why we get an error when we implement this code in our sidebar.php: $categories = get_categories(); foreach($categories as $category) { ...
1
vote
1answer
493 views

Displaying NextGen Gallery using value from meta not working

When a user creates a new post there is a meta field on the back end where they can enter the id of the nextgen gallery to display. I want to then display in their post the gallery which corresponds ...
1
vote
1answer
2k views

tag search using WP_Query

I need to find only posts with a tag forest gump. I've tried: new WP_Query('tag=forest+gump');, new WP_Query('tag=forest gump');. However they both return ALL the posts and not only the posts with ...
0
votes
2answers
145 views

Alter required message using comment form api

I prefer not to use asterisk markers on required fields in the comment form. So I'd like to remove or alter the 'required fields are marked (*)' message. Being a good wordpress user, I'd like to do ...
2
votes
1answer
1k views

Getting the dropdown menu to redirect to different pages?

What I am having trouble with is a dropdown box that I want to add to my sidebar. the blog will have more than one user so what I want for the dropdown to do is list all the different users by their ...
1
vote
2answers
77 views

New to wordpress, Question about editing PHP

Ok, I am pretty new to wordpress, and I have been reading a lot of the documentation online and testing things out on my own blog. I have just run into a couple of general questions. At first glance ...
1
vote
2answers
364 views

Wordpress - how to replace <!--more--> with string on the_content() in single.php

I want to add text on a single wordpress blog post page where the "read more" text would usually be inserted. However, I can't configure a plugin to replace that text. I tried a few different ...
0
votes
1answer
363 views

Function to call either single post or category

I'm trying to display content depending on if a user is in a category or a single post. The function i'm using if this is a category is: <?php if (is_category('')) { ?> Similarly the ...
1
vote
1answer
782 views

wordpress the_post_thumbnail() not cropping properly

I am using the wordpress function the_post_thumbnail(); but it seems to behave differently in different places. I have the following code on one page: the_post_thumbnail(array('275', '190')); Does ...
1
vote
3answers
371 views

Make first letter of my taxonomy uppercase

I'm using echo get_the_term_list( $post->ID, 'trpropcity', '', ' ', '' ); to show a taxonomy link, I'd like to make this instance of it only have the first letter capitalized, Cleveland not ...
0
votes
2answers
71 views

Wordpress Theme Modification Help

I'm currently working with the 2010 theme and want to modify the nav bar so that when you click on a page that is listed on the navbar, it takes you to one of my categories pages (example, clicking on ...
0
votes
1answer
167 views

Add Column to Term Database

Currently the Term Database has four columns. term_id name slug term_group. I would like to add another column called menu_order. How can i do this? The outcome i want is to be able to order my ...
0
votes
1answer
112 views

How can I restrict access to a widget to admins only?

I have a very basic text widget, all it does is link to a PHP script which displays a random banner image. I would like to restrict viewing access to admins whilst I'm testing the widget. How is this ...
0
votes
1answer
838 views

Wpdb->insert() doesn't insert new row after the last one

In JavaScript, I'm using an Ajax call and I'm sending an array of shops. Except for the last element in the array all the shops already exist in the DB. The last element is a new shop. The PHP code ...
1
vote
1answer
413 views

Taxonomy filter all children

I have a custom taxonomy filter that will filter all the pages in the selected taxonomy. I would like the code to select the pages in that taxonomy, and the children of thous pages. Heres the code. ...
1
vote
1answer
678 views

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?
0
votes
2answers
582 views

WordPress plugin admin page - using WordPress function in linked php file

Asked this question on StackOverflow and they directed me over yonder... nice place ya got here =) I've been developing a pretty simple WordPress plugin, and wanted to do some live validation of ...
1
vote
1answer
126 views

how to add three default images to wordpress?

how to add three default images to wordpress custom background? now, i want to add three default images which can be selected one by the user.and it locates on the upload Image part.like this: ...
0
votes
1answer
288 views

How do I choose not to display the title header on a specific page?

I would like to have one specific page on my WordPress blog omit the header . Is there a way to wrap that title code from page.php in my WordPress theme in an if clause that specifies the page I do ...
3
votes
3answers
8k views

Query menu_order custom post types

I added 'supports' => 'page-attributes' to my custom post type, and now i have the meta box for page ordering. When i use the argument 'sort_column' => 'menu_order' with get_pages() on my ...
0
votes
4answers
226 views

Value prints outside of the echo

My code validates and returns the custom field value. However, I can't get the value to return inside of the anchors. Here is the code: <div id="meta_mblink"> <? ...
1
vote
1answer
916 views

Adding featured image via PHP

Currently I'm working on a project where site is driven by user articles, how it works: Any user goes to compose post page and writes post along with few details, has upload file option for image ...