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

learn more… | top users | synonyms (1)

0
votes
1answer
159 views

Query specific posts per user selections from dropdown menus

This may be a little different than most people do. I'm trying to show certain posts that are determined by 4 different "categories." I have a large database table full of "products" (I'm using the WP ...
8
votes
3answers
965 views

How to change the case of all post titles to “Title Case”

I am helping my father with his WordPress website. It has over 1,700 posts with TITLES IN UPPERCASE. We'd like to change these to "Title Case" in the database (possibly using this PHP script). The ...
2
votes
2answers
2k views

How can i remove all html tags from get_the_content()?

i want to remove all html tags from content like <p>, <br>, <img>, <a> i tried strip_tags() also tried $content = get_the_content(); $content = apply_filters('the_content', ...
0
votes
1answer
140 views

Adding Image Count to Multigallery

Ok so I am using the [multigallery] function and it works fine, but one thing I want to add. Here is the code that I am using for the multigallery in my functions.php file function ...
4
votes
3answers
2k views

Converting timestamps to local time with date_l18n()

I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
1
vote
2answers
248 views

Dynamically add id to heading tags

How do I add an id attribute dynamically to every heading tag on a wordpress website using php? I wanted to make it so that for every heading tag (h1, h2, h3, h4, h5, h6) I have a unique id attached ...
0
votes
0answers
79 views

method doesn't work when being called from wp cron

I don't know what's wrong but the method that I'm trying to execute doesn't seem to be running when being called through wp cron. In the code below I'm trying to insert a new blog post. When I have ...
0
votes
1answer
45 views

Adding Media button to only pages

I have created a media button as such: // Create a media button for pages function aisis_page_button_link(){ global $post_ID, $temp_ID, $iframe_post_id; $iframe_post_id = (int) (0 == ...
0
votes
1answer
368 views

Defining multiple categories for showing latest posts

I have a function that lets me display the latest posts on my website, however i want to function to show posts of multiple categories at not just one specific category. Check the code below and what ...
2
votes
1answer
49 views

Modifying Footnote Plugin for Descriptive Title Attributes

I've been struggling for a couple hours now to get this working... Hopefully someone here can help me. I just started using the wp-footnotes plugin, and I'm trying to set the title attribute on ...
0
votes
0answers
286 views

Use $_GET with permalinks on page

I'm currently trying to use a $_GET to populate a MySQL query with in a URL on another page within a Wordpress site. URL sample: <a href="http://site.com/file.php?alabama">Alabama</a> ...
0
votes
1answer
149 views

get_avatar won't show uploaded avatar, only default gravatar

I'm using the Simple Local Avatars plugin so my bbPress forumgoers can upload their own avatars. Now, when a user logs in, I want his/her avatar to display next to the relevant links (i.e. logout, ...
0
votes
1answer
30 views

site_url and $current_user producing undesired results

I am trying to make the link like this: site.com/forums/user/userid using the code below. I think I messed it up though because it keeps producing an error on this line. $buttons['Edit My Profile'] ...
-1
votes
1answer
85 views

Errors while Loading Most Recent Version of jQuery

I am trying to set up my WordPress so that it will use the most recent version of jQuery. Here is what I have done so far: functions.php <? add_action( 'wp_enqueue_scripts', 'RegisterJQuery' ); ...
0
votes
1answer
115 views

Wordpress truncate posts question (plug-in related)

I'm using a plug-in ("Wordpress plugin random post slider") for Wordpress that pulls a random post from a category, and displays it in a slider for use as a shortcode or php code in a template. I've ...
-1
votes
1answer
69 views

Integrating CSS Into a WP Function Call [closed]

Below is a code I use to display post views. It is integrated with an options panel which allows users to choose whether to display it. I would like to integrate the div class .postviews directly ...
0
votes
3answers
360 views

Using a switch statement in Wordpress

I've got a piece of text in a div that I want to change on each page of my website. At the moment I'm not sure what function I should be using to do this. Here's what I have so far... <?php $page ...
0
votes
1answer
118 views

Countdown to date function?

When a user signs up on my site they have to select a date as part of resignation. On their profile page I need to show a countdown to that date. Something simple like attached. How can I create this ...
0
votes
2answers
437 views

Display background color or image with custom meta box?

With custom meta boxes, how would I go about displaying the background image (or color if no image is linked) within the page. Code for the page where I want data to displayed. I want to apply the ...
0
votes
1answer
614 views

Display multi-select box choices in a bullet list

I have a form that includes a multi-select box. <form method="POST" action=""> <select name="countries[]" size="5" multiple="true"> <option ...
2
votes
1answer
588 views

How can I get an XML export of my 1K+ posts WordPress instance?

I'd like to export my database to XML because the import script to my new blog already supports getting data from that. A database backup or wordpress clone is not that useful in this case. The ...
0
votes
1answer
144 views

How do I Split one Table into to lists for two seperate drop down boxes

I am driving myself crazy trying to find an answer, although I know it would most likely be something simple.\ I have a mysql table with the following columns: id first_name family_name ...
0
votes
1answer
85 views

the_post_thumbnail issues

I am trying to make the thumbnail for each post display on the homepage of a site for a client; although the thumbnails do display, they're not being displayed inside of a specified "thumbnail" div ...
0
votes
1answer
278 views

How to display conditional-content if wp_nav_menu( $args ) retruns something

I have a sidebar that displays child links of the current page (using this solotuin by http://wordpress.stackexchange.com/a/2809/27414) which works perfectly. If there is child links to be displayed ...
2
votes
1answer
283 views

How can one utilize a variable as a callback function name for add_settings_field

I'm trying to cut down on the amount of code that is in my theme options function. I'm adding my settings like so: add_settings_field($k,$v,$callback,$the_options,$the_group,$args); This works for ...
1
vote
0answers
74 views

Media Upload Tab reload and change $_GET

I have created a new tab under the new media upload whose content is created by: $folder_id = $_GET['folder_id']; global $wpdb; $foldertable = $wpdb->prefix . 'icrm_folders'; if (!$folder_id) { ...
0
votes
2answers
289 views

Show last 5 posts from specific category

I'm trying to show the last 5 posts from a specific category, which will be linked to a function so i can insert the shortcode in a Wordpress page. The code i have is as below, it does everything i ...
0
votes
2answers
108 views

linked php file not executing php

I have a menu that has the following link in it to my homepage: <ul id="css3menu1" class="topmenu"> <li class="topmenu"><a href="<?php bloginfo('template_url'); ?>/homepage.php" ...
0
votes
1answer
903 views

Passing multiple variables through url (php)

I'm trying to pass two values to another page. Both pages are WordPress page templates. First, I pass the value as such: <tr ...
0
votes
2answers
104 views

Create a Blog Template Page

I am trying to create a template that will display a list posts of a specific custom type. However, I am missing something fundamental. So far, here is what I have: functions.php add_action( ...
2
votes
2answers
207 views

javaScript in <head> section of WP API

How do I place the following javaScript in the <head> section of the Wordpress Widgets API menu screen? <script type="text/javascript"> jQuery(window).load(function() { ...
0
votes
2answers
68 views

Is there a way to create a “copy post” link?

Much like the "edit" link when viewing a post, is here a "copy post" function I can include with my theme?
0
votes
1answer
232 views

Some problems calling a function into sprintf() inside functions.php template file [closed]

I am new in PHP and WordPress and I am personalizing an existent template and I have the following problem. In the function.php file of the template I have the following function: function ...
0
votes
1answer
1k views

Different registration form for different roles

I have customised the worpress registration page by adding new fields using the Cimy User Extra Fields plugin so my site is now fine for allowing users to register as contributors. I now want to ...
3
votes
1answer
256 views

How to use multiple query with same meta key

I use these codes to print custom field query. My custom field key is out_wiki <?php if( get_post_meta($post->ID, "out_wiki", true) ): ?> <div class="outlink"> ...
4
votes
2answers
613 views

How does Wordpress support Unicode?

I've been looking through Wordpress' codes and they're mostly using PHP's regular string functions, like strlen, strpos, etc. Yet I know Wordpress supports utf8, so how does it do that? Does it ...
0
votes
3answers
202 views

Specifying Mouseover Icon for Custom Post

I am using the register_post_type function in order to create a custom post type. I am already using the menu_icon parameter in order to set the admin icon for the post type. But, how can I set the ...
0
votes
1answer
18 views

Odd page behaviour after removing sidebar

One of my web pages is displaying odd behaviour, after selecting a no sidebar template for the page. The sidebar has disappeared, but elements within the sidebar, now show in the bottom right-hand ...
0
votes
1answer
67 views

Include text in echoed hyperlink

I´d like to include an extra two words into an echoed hyperlink. I have no PHP knowledge so far. Could anyone put me in the right direction? <p class="excerpt"><strong> Bekijk meer van ...
0
votes
2answers
191 views

Password form redirection to belonging post

My idea is that the visitor enters the password on a page and than the wordpress post with belonging password load if there is one. Here is the code: Form on page: <form method="post" ...
1
vote
1answer
64 views

child theme inherticance and php autoload

I wrote this method in a parent them that will auto load a class based on the class name, thus if the class name is: SomeFolder_Folder_Folder_Class.php then it will convert that to: ...
0
votes
1answer
176 views

Display a list of users with avatar filterable with alphabets

I'm trying to create a page which should display a list of users with the role "Author" only and exclude all other default and custom roles. I also want them to be filterable by alphabets, so if I ...
0
votes
1answer
170 views

How do I add php to all links automatically?

I'm using the Qtranslate plugin for my site. It's a pretty cool plugin and works great to a degree. I'm having a problem though when users add links to internal content in the WYSIWYG editor in that ...
0
votes
1answer
277 views

How to put a form with php code into a variable or shortcode?

I'm trying to put my frontend form into a variable or a shortcode so I can wrap another shortcode around it (specifically Bainternet Post Creation Limits). My form has PHP code in it so I'm not ...
0
votes
1answer
990 views

Execute PHP code in Javascript onclick

When a user clicks on the table row, I want to: save a value in the user profile go to a page I am within this loop: <?php $query = new WP_Query(array('post_type' => 'aanvraag', ...
1
vote
1answer
167 views

How to: PHP Log Out Link?

I originally came here to find help on creating a string of text that would display a login link, and when the user was logged in it would should their username. Travis Pflanz had the answer for ...
1
vote
3answers
158 views

How to break down importing of feeds

I am attempting to update a large array of feeds into WordPress, using fetch_feeds. As can be expected, when going over 50 feeds the server is starting to time out. I would still like to update the ...
1
vote
2answers
2k views

Limit the_excerpt with max of x characters

What I'm trying to do: I want to display the_excerpt, but I have a maximum of x characters the_excerpt may use, but I don't want to display a couple of characters of a word, only whole words. Some ...
0
votes
1answer
611 views

Check if current page is wp-admin

I have created a common custom dashboard for my users located at "http://website.com/login/dashboard/" I'm trying to redirect users to that custom dashboard only if they are NOT admins & if the ...
-1
votes
1answer
13 views

Duplicating wordpress install issue

I wonder if anyone could help me with a problem that I am having. I am having a guy do some plugin/theme customization on my wordpress site and he wants to have a duplicate of the site to work with on ...