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 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
578 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
334 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
2k 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
3k 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
250 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
809 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
94 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
674 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
1answer
691 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
862 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
93 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 ...