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

learn more… | top users | synonyms (1)

0
votes
2answers
100 views

JS completely stopped loading but Files are found

Basically I've enqueued all of the files I need and can see there been picked up in the browser but for some reason none of them seem to load or function correctly and I get no errors in the console. ...
0
votes
2answers
43 views

conditional statement expressing that current user didn't logout (is still in the same login session)?

Thank you in advance for your time. I want to perform the following conditonal if: if (current user didnt log out and is in the same login session ) { Do_something; } How to express it using ...
0
votes
1answer
285 views

Update Custom Field on Imported Post Creation

So I've created a function that updates several custom fields in a post when the post is created. The idea is to sanitize this information so that I can easily use it for other purposes. The ...
0
votes
2answers
163 views

Get used terms by an author as array of strings

I am using list_author_used_terms function below to get the terms used by a specific author (terms of a custom taxonomy 'wossom' for a custom post type 'aya-bi-aya'). function ...
0
votes
1answer
367 views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
0
votes
1answer
737 views

How to send “Location” header on plugin form submit event?

How to redirect to specified page after form was submitted? Warning: Cannot modify header information - headers already sent by (output started at wordpress\wp-admin\menu-header.php:94) in ...
0
votes
1answer
126 views

Twitter feed is showing blank in WP site [closed]

I am using themefuse WP theme and facing this problem. http://themefuse.com/forum/thepractice-wp/twiiter-newsline-is-blank Can someone please suggest if I need to use some other attribute. I am not ...
0
votes
1answer
175 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 ...
0
votes
2answers
326 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
1answer
172 views

Adding a user's ID behind the <a> tag ref link address

Good day, everyone: I want to make wordpress to add the user's id number behind the ref's link string, so that, for example <div class="toolsbutton"> <a ...
0
votes
1answer
228 views

Changing Link Attributes for Wp_Link_Pages

I'm wondering if there is any way to change the actual link itself for wp_link_pages. So right now, I have a simple code to display the pagination for a post, it looks like this: <?php ...
0
votes
1answer
216 views

Post from one loop in different containers?

Is there a way to output posts from a single loop in multiple containers? Ideally I'd like to have the posts title/meta/content etc alternate between first-container and second-container, but I can't ...
0
votes
3answers
517 views

How to store accumulate multiple option values in a single array using Options_API

I have created an option array that stores a series of options, along with their values. The problem is that I want to ACCUMULATE these options and store them in the options database. Meaning I would ...
0
votes
3answers
868 views

How to Create a Directory in a Plugin Folder?

I am creating a plugin in WordPress Version 3.4.2. When the administrator submits a form, a new folder is created inside my plugin directory and a file saved in this new folder. But it gives me the ...
0
votes
1answer
293 views

Setup page template array in a custom post type

Hi below is a 'case' (in a custom post type) for pulling all categories and displaying them as a drop-down menu. How can I do the same but turn it into a list of checkboxes? //tax_select - this ...
0
votes
1answer
415 views

Alter secondary loop to exclude posts from current page category

The below code is taken from sidebar.php where it outputs random posts from multiple categories and excludes the current post from showing up. This works great but how do I alter this loop to exclude ...
0
votes
1answer
1k views

Adding a unique class to wp_nav_menu

How would I go about adding a unique class to the direct child li elements of the main parent ul element generated with wp_nav_menu? <nav id="access" role="navigation"> <div ...
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
1answer
3k views

How to call a function only once (global variable scope)

I have been trying to work out the most effecient way to use functions in WordPress. I have a big slow function big_slow_function() that ideally is only run once. But I need to use the boolean that ...
0
votes
1answer
600 views

How to create different menu's for not logged in visitors and for logged in members?

I'm creating a website which will provide services to members and I want to make it so that when a not logged in person comes to the website the menu is specifically designed for sales pages to make ...
0
votes
1answer
1k views

Using 'strtotime' function to convert a custom-meta-box to a date-stamp

I am building a "podcast" post type in a wordpress build using custom-post-types, meta-boxes & taxonomies. There may be a simpler way to do this.. I'm still learning and this is my first go at ...
0
votes
2answers
1k views

Make Current/Active Page Number a Link (WP_LINK_PAGES)

With the default wp_link_pages the current/active page number is not a link. I would like to find a code/hack which turns the current/active page into a link to the top of the page. I am already ...
0
votes
1answer
360 views

MySQL query performed 4 times inside loop

I have enabled custom php in my pages through the use of the exec-php plugin so I can run more complex pages than the standard WordPress page. I have had no problems with this plugin so far. I have ...
0
votes
2answers
3k views

How to show only parents subpages of current page item in vertical menu?

I just can't find a way to make it possible to show only current parent items down to current page item in a vertical menu the "wordpress way". What I want to achieve is the following dynamic ...
0
votes
1answer
4k views

List page for custom post type?

I have created a custom post type in wordpress and have 90% of the functionality working correctly, but I am having a bit of trouble trying to create a custom listing page template. Currently it is ...
0
votes
2answers
253 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 ...
0
votes
2answers
898 views

Best way of adding CSS which can be manipulated by the user via theme option panels?

I thought about adding it as inline CSS with code from the functions.php (not really sure how to do it). Something like this: function addcss() { background: $this_is_the_css_value; } I would ...
0
votes
0answers
95 views

WordPress Tag Page Hook?

Is there any hook for a tag page, so I can alter it's content before outputting?
0
votes
3answers
700 views

Listing all sub-pages?

I'm wondering how to write a list of sub-pages of actually visited page. So I have 2 pages and 3 sub-pages for each: Colors [page] - Red [child of Colors - subpage] - Blue [child of Colors - ...
-1
votes
0answers
63 views

display post of the year/month/week in slider for archive template

I'm building a archive template, which show the post by year; month; and week. However, this archive template has a slider, which as the moment display the last post created - so it doesnt match the ...
-1
votes
1answer
62 views

limit number of post for achive page

Im trying to limit the number of post for my archive page, in a specific category. I've manage to display post from just the category I desire, However, if i setup a loop to limit the number of ...
-1
votes
3answers
774 views

Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)

I've searched a lot for this and I seem to get different answers. In my situation, my jQuery function has to use a PHP variable from a different file. How can I accomplish this? Clear and simple ...
-1
votes
1answer
721 views

Calling function from within functions.php returns unwanted value

I am trying to customize the output of the [gallery] shortcode to include comment count by this plugin: Facebook Comments for WordPress plugin I found a function by Zack Austin (shown below) that ...
-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 ...
-1
votes
1answer
1k views

WP insert post PHP function dynamically generated Custom Fields

Further to my previous question WP insert post PHP function and Custom Fields We have a working insert post function that can also send over custom fields without yet knowing the ID. Please see the ...
-2
votes
1answer
94 views

metabox displaying on incorrect page

I've got two different functions that output different metabox's one is for the pages and the other is for just the post. For some reason the one I created for posts overwrites the one on pages and ...