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

learn more… | top users | synonyms (1)

0
votes
1answer
1k views

Query multiple custom post types in single loop

I'm aware there are several other posts that cover similar ground to what I'm about to ask. I have three custom post types running, in addition to 'posts'. I want to run a loop that pulls all posts ...
0
votes
1answer
6k views

wp nav menu: add attributes to menu items [duplicate]

I'm trying to figure out if it's possible to attach an attribute to a wp nav menu item. To demonstrate, this php: <?php wp_nav_menu(array( 'menu' => 'main', 'container' => ...
0
votes
1answer
341 views

How can I exclude a dynamic URL to show a popup created using 'Wordpress Popup' plugin

That might be a long shot, but I though I should give it a chance. I am using WordPress Popup in order to show a popup when a user lands on specific pages on the website. You create a popup and you ...
0
votes
0answers
92 views

How to delete in the pages the pre tag added automatically by Wordpress

i have been looking around but there is not a specific answer to my issue. I have set up a slideshow by Wordpress, then i paste the short code in the page where i want to display. The slideshow is ...
0
votes
1answer
115 views

Display selected parts from selected pages on the frontpage?

I'm build a site for my company and want to display four (of my choise) of our special deals on our frontpage. A special deal is a page. I want to grab: Featured Image Page Title Price (taking from ...
2
votes
1answer
3k views

Why Better WP security plugin returns 418 I'm a Teapot “error”?

I am working on the Wordpress website and all of a sudden after deploying it on the server, I started seeing a problem where some of the pages on my website return 418 I'm a Teapot as Response status ...
0
votes
1answer
310 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 ...
3
votes
1answer
576 views

Why Can't PHPUnit UnitTest My Wordpress Website

I have been researching this issue for days and although many people ask this question I never found a clear and concise answer. I am running: PHP Unit: Version 3.7.21 WordPress: Version 3.5.1 OS: ...
0
votes
1answer
73 views

How to check “From Email” via WordPress before an email is sent

Is it possible to check an email from email via WordPress before an email is sent? I'm working on a phpmailer plugin to send WordPress email via Amazon SES (which requires all emails to be verified). ...
0
votes
2answers
1k views

How to exclude specific category from the get_the_category(); array

In my loop I've added: <?php $categories = get_the_category(); $separator = ' '; $output = ''; if($categories){ foreach($categories as $category) { $output .= '<span ...
0
votes
3answers
201 views

Why I can download any file except PHP files from a URL but I can download any from another site?

all, I've been struggling with this for the past two days, I just can't find the answer - sorry if I post this in the wrong site but this is the best option I could think of. I have some problems ...
0
votes
1answer
55 views

Shrinktheweb plugin problem

I've added the following code to a page: <?php echo do_shortcode("[thumb]'".bp_profile_field_data('field=2')."'[/thumb]"); ?> This pulls a url from my database, and it should, according to my ...
0
votes
2answers
181 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
326 views

Update Wordpress Custom Field with AJAX on cached page

I'm new to ajax am trying to create a simple hit counter that updates a custom field in Wordpress after the page loads. The page is cached, so any attempts to use PHP alone will not work. I'd like ...
1
vote
2answers
9k views

how to get page id of a page using page slug

Im pretty new to wordpress and I was wondering if I could get a page id with it's slug. Is it possible please let me know.
0
votes
1answer
64 views

Should I use Wordpress to skin a database website?

I am going to start programming a website which allows users to post adverts for aircraft for sale. (Think autotrader for planes). It will be free to use. There are a few websites that do this already ...
0
votes
2answers
393 views

Fatal Errors on pluggable.php

I was looking to change the "Wordpress" name in all of my sent mail. In the past I have customized my Wordpress backend to display my desired email. But I have downloaded a new plugin that has altered ...
0
votes
1answer
421 views

Fatal Error wp-settings.php on line 119

Receiving this error message after a post update: Warning: require(/home/thomwhite/wparch.com/wp-includes/post-template.php) [function.require]: failed to open stream: Permission denied in ...
1
vote
1answer
61 views

Common abstract class for plugins

I have a few plugins and intend to move them to a very common base with an abstract class. The issue is that even if I apply solutions in order to avoid class duplications ( like EarnestoDev's answer ...
1
vote
1answer
3k views

Get a list of galleries from an album in NextGEN Gallery [closed]

I want to get a list of galleries of a certain album. Than I would create a link to this galleries. How do I get the list of galleries in PHP? I saw that there is some code like global $nggdb; ...
0
votes
1answer
187 views

php include not working in custom page

The Problem I have a db.php file which contains mysql login details. I want it in a separate file like this so it can be linked in several different pages for easier tracing later. This all works ...
0
votes
2answers
79 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
1answer
460 views

How do I unserialize this?

I don't know the most about WordPress, but I see some serialized data in the DB that a plugin creates. The plugin works just fine, so I guess it unserializes it just fine too. When I try to ...
0
votes
0answers
190 views

Save Changes function after table is sorted using jquery

I have a simple table, and the jquery works great for sorting. The fields drags an drops perfectly, and updates then and their. Also of course the data in the fields are saved in a array. The data in ...
0
votes
1answer
68 views

Target all images that are not the first attachment

I'm querying image attachments on a template I'm writing. For a layout purpose, I'd like to apply a css class to all the images that are not the first. Here is the code I'm currently working on, I'm ...
0
votes
2answers
3k views

Create placeholder text for wordpress search box [closed]

I need to create a search box in my default searchform.php file that has similar behaviour as the default ability in HTML5 with the "placeholder" attribute. This is what I have in my searchform.php ...
0
votes
1answer
49 views

Menu's breaking, now showing all page links on site

There's something quite odd happening on a site I'm working on I can't figure out why at all. I have a custom post type set up for news and categories so the user can select what type of news it is ...
0
votes
1answer
449 views

How to style this wp_list_pages markup

I'm wanting to custom style the output of this wp_list_pages $children echo, here is the code: <?php if($post->post_parent) $children = ...
0
votes
1answer
602 views

dynamically filter by category via sub-menu

I'm trying to figure out if it's possible to dynamically filter my custom post types by category via a sub-menu I have set up. So I've set up a custom post type: news and enables categories that I ...
0
votes
1answer
23 views

How to tell if a user has gone in and created a menu

By default if a user has not created say a footer or a top level menu then WordPress, in the case of the footer, will use default content like pages and so on to "create" a menu. I don't want this to ...
0
votes
1answer
1k views

Theme my Login plugin, how to update fields

I'm using the Theme my Login plugin for a client project and I'm having trouble updating profile fields once a user has been registered; I followed the instructions here but they didn't seem to have ...
0
votes
1answer
226 views

using images in next/previous_post_link [closed]

In my blog's pagination section, I've used <?php previous_post_link(); ?> and <?php next_post_link(); ?> to generate the newer and older posts links. Within that action, though, I've ...
0
votes
2answers
315 views

how to remove sidebar from particular one page

I am writing this code in page.php for removing the sidebar in one page <?php if (is_page('x')) : ?> <?php else : ?> <?php get_sidebar(); ?> <?php endif; ?> ... where "x" is ...
0
votes
1answer
87 views

How do I custom code the start page?

I'm pretty experienced in development in general, and also did some PHP coding to generate hmtl pages. I've also got a running WordPress blog with a number of posts. As a start, I want to "generate" ...
0
votes
1answer
79 views

How to call custom function outside from the admin page?

I've created a function but i have some problems with it... echo get_option( 'my_function', 'custom_logo' ); I try to use this in my code but it returns me an array not a string. When i use echo ...
0
votes
0answers
164 views

Using Select HTML in Bootstrap Popovers

I want to be be able to utilize a select few HTML tags in a Bootstrap popover. I know that I could include the option HTML = true in the settings, but this would leave me exposed to an XSS attack ...
0
votes
0answers
110 views

Postal address auto-complete on profile page

Is it possible to have an address auto-complete function (Where you enter your house number and post code and it automatically populates the address fields for you) within the Wordpress user profile ...
0
votes
2answers
33 views

How to modify the default feed via a function

I am trying to add a functionality to the default wordpress feed. The problem is i managed to do this modifying the rss feed php file. The problem number two that i have in mind is when wp gets an ...
1
vote
1answer
77 views

wp_kses and magic quotes

In the wp_kses codex page it says: You have to remove any slashes from PHP's magic quotes before you call this function. I am new(ish) to PHP and I wiki'd Magic Quotes and it was apparently ...
0
votes
2answers
1k views

Using file_exists to check file in Uploads

Context: For a site's images used in a particular section, each post relies on a base name put into meta data, which then is used with automatic extensions to generate large images, gallery thumbnail ...
-1
votes
0answers
77 views

How to force wordpress custom slider text to be static? [closed]

I have created my own customized slider plugin for wordpress and it is well created with all the features. But now i want to do that 'title' and 'description' displaying with each image should remain ...
0
votes
1answer
119 views

How to callback custom field text

I have a plugin where the user can click a button to feature a post. I added a text field but i want the text field to call back whatever is posted in it Here is how it looks now ...
1
vote
1answer
320 views

Showing user ID on user main page from screen options

On the user main page in the screen options, you have some choices for displaying user information e.g.. e-mail, role, posts etc.. Is there a way to be able to display the user's unique ID?
2
votes
2answers
119 views

Unable to set right time in admin and frontend template

When I run a simple php file called test.php (placed in the root of the wp installation) that contains something like that: <?php echo date('H:i:s'); ?> The result is right: 15:30:00 and the ...
0
votes
1answer
179 views

WP Query conflict on tag.php and category.php template

My WP_query in the header menu fails to pull any posts on tag and category pages only. Error occurs even with the Loop removed from those template pages. The menu in the header lists the parents. ...
3
votes
1answer
2k views

Ajax Load More Posts in Category Page

I am developing a theme where I need to load more posts with ajax. Currently, when I click load more on the category pages, all the posts are loading. The category.php looks like this : ` ...
2
votes
1answer
76 views

Why do filters/actions require an argument count?

I was just looking at plugin.php trying to answer the above question and I couldn't work it out. The actual code that calls filters is this: do { foreach( (array) current($wp_filter[$tag]) as ...
0
votes
1answer
458 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 ...
1
vote
2answers
540 views

Get Wordpress Category ID from a URL string

How can you get the category ID of "category-name" from a nice URL (e.g. http://www.example.com/category/category-name/)? I need to retrieve the category ID from a URL of wordpress because this ...
0
votes
0answers
47 views

Getting recent posts corresponding to category items in custom menu

I'm trying to create a tabbed navigation, each tab containing 5 recent post excerpts of category items that are listed in a custom menu. I'm planning to load all these posts at once and put each ...