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

learn more… | top users | synonyms (1)

0
votes
1answer
3k views

How do I get the author's page url from their ID?

What is the best way to get the author's page url, so http://example.com/author/user73, from their ID number?
0
votes
1answer
254 views

How to add custom function to pluggable.php

I am working on a WP plugin and I want to add a custom function to pluggable.php (located in /wp-includes). I am calling that function from admin.php (located in /wp-admin) eg. Consider the function ...
6
votes
1answer
567 views

dbDelta support for FOREIGN KEY

On PHP 5.3.13/MySQL 5.5.21 the following code doesn't work: if($check_custom_fields_form!=1){ $sql = "CREATE TABLE IF NOT EXISTS ". $table_custom_fields_form ." ( `form_name` ...
0
votes
1answer
990 views

Most viewed posts in Wordpress

I am owner of a blog/website and I am using this code for tracking post views in site : function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, ...
0
votes
1answer
481 views

Force Users To Relogin

I need a solution that i can use to force a user to logout via the admin panel of word press any help on this would be appreciated.
1
vote
1answer
900 views

the_author_meta not working

I'm trying to use the_author_meta to retrieve some links which users can set in their profile. I set up extra profile fields and they are saving to the database. On my author.php I have the ...
3
votes
1answer
865 views

How do I override the Message-ID header of wp_mail function?

I have a custom notification function for our comments editor, who prefers to have all comments from one article threaded together in her email client. To achieve this, I'm creating a custom ...
7
votes
4answers
3k views

the_date() not working

I am using wordpress 3.2 and I did a query post like this: <?php query_posts("posts_per_page=1post=type&page=post_parent=10");?> Then I try to echo out the date of this post I queried ...
0
votes
2answers
142 views

unknown issue in 'header.php' preventing theme from displaying fully

My theme is currently activated and showing only the background image and the "home" link. I believe the issue lies within header.php, but I can't quite figure out what. Any ideas? (Also, is there a ...
0
votes
2answers
600 views

Where is wp() function definition?

In WordPress source code, there is one point I can not understand. In /wp-blog-header.php, there is a call to wp() function. However, I can not find any definition for that function. How this call ...
0
votes
2answers
776 views

Hide a div to subscribers(user role) in one page (is_page)

Hello have been looking at this for quite a while and cant seem to resolve it was hoping someone more familiar with the wordpress core and php could share some idea. What I want to accomplish ...
1
vote
1answer
260 views

Setting up widgets in wordpress with a unique ID for the after_title argument

I try to get the collapsible-widget-area plugin so that every widget it creates inside the collapsible area has a unique id <div> after its title. function get_args() { $this->args = ...
0
votes
2answers
288 views

Using the_excerpt() on a page

I've been trying to utilize the PHP excerpt function to call from her recent blog post to post on a main landing page without avail. Any thoughts? <div id="home_news" class="prefix_9 grid_3"> ...
0
votes
1answer
69 views

How to extend the page editor?

I'm really a newbie to WordPress. I can edit the page via admin Page menu. There is a form submitted on that page. How can I write my own functions to handle this form submission? In other words, how ...
0
votes
1answer
112 views

Vote It Up Plugin - Add ascending numbers to MostVotedAllTime Chart Function

The following function shows a top 10 chart of most voted posts. How would I add acceding numbers to this chart eg 1 - example Post1 2 - example Post2 etc function MostVotedAllTime_Widget() { ...
1
vote
1answer
743 views

Accessing WPDB Multidimensional JSON Array w/ Javascript

I am having trouble accessing json values return from an ajax call. Here is the call: $.ajax({ type: 'POST', data: 'user_id=' + user.user_id + '&user_login='+ user.user_login, ...
1
vote
1answer
67 views

How do you remove plugin edit option?

I would like to remove the edit option for all plugins on a wordpress site. Is there a hook/filter for doing this? It would be preferred to do it from the theme's functions file, rather than try to ...
0
votes
1answer
189 views

Creating a WordPress shortcode

I'm coding my first WP shortcode and am having trouble turning my working PHP into a working shortcode. I have successfully created a basic shortcode that returns text in the spot I'd like so that ...
0
votes
2answers
236 views

Dynamically generating an '<a name=“”>' reference with PHP

I'm trying to dynamically generate a <a name=""> link reference inside of a Wordpress plugin. The plugin will output this link reference inside of the posts it generates. The categories of ...
1
vote
1answer
165 views

How to create a custom category of wordpress admin

i was wondering how I would create a custom tab and page for wordpress admin screen, and save its data. I want a ticker on my main page, and the <li> data would change whenever I have new ...
1
vote
2answers
2k views

Hiding a php element from mobile browsers

I've stuck a static width content slider on my Wordpress sites front page. I'm using the Twenty Eleven theme with a small piece of code included into index.php to display the slider. Unfortunately ...
0
votes
1answer
504 views

Post ID wrong in Functions.php

I am trying to execute the following code inside my functions.php to change the title of my wordpress blog. function filter_pagetitle($url) { global $wp_query; $the_post_id = ...
0
votes
2answers
5k views

Download images from media library to computer in BULK?

All I want is to download all images from the media library to my computer. I don't want to then use them in another site. I uploaded them from a camera card while traveling, and then it was stolen. ...
0
votes
1answer
60 views

Is there a (offical) way for a theme to deactivate itself and show a message in admin?

I know that plugins can deactivate itself, but how about themes? I work on a parent theme (Framework) and I don't want users to be able to activate it. This is what I have so far. The problem is ...
0
votes
2answers
1k views

Show different size featured images (the_post_thumbnail) for 1st, 2nd and 3rd posts?

I file all the galleries on my blog under the 'gallery' tag. I use the following code (via) to display the latest 7 gallery posts after the 8th latest post on home page: <!-- Featured post ...
4
votes
1answer
101 views

Getting the action's tag name within the action

There's a function attached to a set of actions, like this: add_action('some_tag', 'the_function'); function the_function($maybe_some_vars){ // ... } Is it possible to find out the action name ...
1
vote
1answer
72 views

Is it better to create a function or a variable for current_theme_supports?

Well I just asking myself this, there are two ways I could implement this. What would be a better fit to coding standards? Or is this just a a matter of personal like? And what about php and memory, ...
0
votes
1answer
352 views

Trying to load category thumbnails on wordpress page

I'm trying to show some Wordpress category thumbnails on my homepage, but it seems my code is breaking the rest of my site. It kills the page and anything under my code won't load. Any help would be ...
0
votes
1answer
2k views

what does $options = get_option('test_theme'); do?

I'm trying to set up theme options so they save with AJAX, I found this tutorial http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/ it's calling $options = ...
0
votes
1answer
1k views

How to create Loop code for Menu using Wordpress?

I have created a menu called "My Menu" in wordpress using Menus feature provided under Wordpress admin panel. I have added 3 pages into it named Page A, Page B, Page C. I have applied featured image ...
2
votes
4answers
4k views

Only show div on homepage/blog index in wordpress/php

I have a wordpress site. I have a div that I only want to appear on the homepage (in the header). What type of php if statement do i need... In other words: only show .... in the header of the ...
2
votes
2answers
52 views

Overide a function that is inside a plugin

I would like to change the behavior of one function in a plugin. Instead of rewriting the file and having to deal with updates I would prefer a solution that works similar to the way add_filter works ...
2
votes
1answer
363 views

Wordpress Wysiwyg Content not being displayed

My Wordpress website really isn't working to how I want?! It was working fine, with nothing being touched, Then lately I find every-page is displaying the same content on each page. Not the ...
0
votes
2answers
613 views

Pagination stays on same page for post category

I have a custom taxonomy for a group of posts, and I also have a need to show these posts on a custom page template. I want to show one post at a time, with pagination, so that the user can click ...
1
vote
2answers
214 views

Wordpress - query 5 posts with a specific post in top

Many searches and tests but in vain, I need an expert to rescue me. I need a custom post query in worpdress, which returns only 5 posts starting from a specific post. In other terms, there is a div ...
5
votes
1answer
2k views

How display widget by id

I fetched widget id this way: $the_sidebars = wp_get_sidebars_widgets(); print_r( $the_sidebars['sidebar-1'] ); It shows: Array ( [0] => recent-posts-2 [1] => recent-comments-2 [2] ...
0
votes
1answer
107 views

Security updates to 3.3.2

I know all security updates are important but given that how important on a scale from 1 to 10 is it to upgrade from 3.1.3 to 3.3.2. I have some sites that need to be upgraded but the host has me ...
4
votes
1answer
1k views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
0
votes
1answer
75 views

I get “Cannot modify header information - headers already sent” when I change my theme

I get this error when I change theme in my wordpress. *Cannot modify header information - headers already sent by (output started at ...
1
vote
2answers
658 views

Wordpress category loop offset possible?

I have been on this for a while now and haven't really come across a solution to filter the posts on a category page using a sort of offset in php. There are plugin for posts and pages but I am ...
0
votes
1answer
341 views

Insert PHP code in Text

I have this code for insert a permalink but doesn't work, return exactly code: $text = '<form><td>Permalink to: <?php the_title();?></td><textarea cols="85" rows="2" ...
0
votes
1answer
167 views

Wordpress add_rewrite_rules for custom URLs ending in .html

It's pretty common to see Wordpress running on pretty permalinks in the style of: /blog/2012/04/my-post/ However I'm trying to customize a fresh Wordpress install with a different set of URLs. I ...
0
votes
1answer
859 views

Save Option on Database

Sorry for the question but can you help me? I have this form in a widget: <form> <fieldset> <legend>Counter Position:</legend> </br> <p> Right ...
0
votes
1answer
842 views

Adding Permalink to Slides with 'Simple Nivo Slider' plugin?

Update April 27 10:57 AM -- Fail Log To clarify, I've only customized and adjusted the CSS. The first slide works correctly with linking through, but ONLY on the first cycle / initial page load. ...
1
vote
4answers
218 views

PHP if Condition not working

I'm trying to create a condition in Wordpress that only calls the wp_head() on all pages except for the "About Us" page and "News Articles" pages. Here's the code: <?php if (!is_page('about-us') ...
1
vote
1answer
367 views

How does the ternary operator work in the wordpress loop post?

Okay so I kind of understand that ternary operators work like condition ? TRUE : FALSE However I'm looking a simple loop to get my posts that I have <?php if (have_posts()) : ...
1
vote
2answers
227 views

How to speed up a wordpress function with multiple loops?

I am a PHP novice and wrote this function. It is an alphabetical navigation which shows only the letter that have posts in both that letter and the currently filtered "genero" taxonomy term. I use ...
1
vote
4answers
1k views

LESS compiler for Wordpress

can I compile some .less-files automatically by using Wordpress. I found just lessphp Thanks Ogni
0
votes
2answers
3k views

How to order posts by modified date without using 'query_posts'?

I have an example basic wordpress theme template here for you. First, please take a quick look at it to get an idea. <?php get_header(); ?> <div id="primary"> <div ...
0
votes
2answers
91 views

Wordpress Post HTML after Posting

I am writing a plugin for WordPress, one of the tasks I need to-do is send the HTML content of a new post to an e-mail address at the time of posting, I know I can use certain hooks to fire after the ...