WordPress questions and answers

WordPress

Upload multiple images and insert them into custom html code

Good evening. :) Well, my mother is currently using a wordpress installation for her day to day blogging. Often, a post consists of some text and a few images, which are displayed via the very nice flexslider script (http://flex.madebymufffin.com/). Usually, when the post is ready, I handle the flexslider part. ....

Leo Leo: 12 minutes ago

WordPress

How to get list of all hooks of current theme / plugin?

I want to get the list of all available hooks from active theme / from a specific plugin. I was tried to get it from global variables $wp_actions & $wp_filter But, They are showing all registered hooks. E.g. global $wp_actions, $wp_filter; echo '<pre>'; print_r($wp_filter); E.g. If theme or plugin register ....

Julian Julian: 15 minutes ago

WordPress

Should I use an additional column in the DB?

I'm building a site for a client. They need a functionality where WordPress can tell if a logged in user has viewed a post in order that they might serve a notice or hide the original content. I have never needed to do this before but am weighing up two ....

Ayla Ayla: 24 minutes ago

WordPress

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 don't cause error? ....

Emma Emma: 39 minutes ago

WordPress

How Can I Register Menus and Widgets Conditionally Based on Theme Options/Settings?

I have theme options/settings page and options/settings fields set as outlined here: http://code.tutsplus.com/tutorials/the-complete-guide-to-the-wordpress-settings-api-part-2-sections-fields-and-settings--wp-24619 What I would like to know, is how to register both 1) widgets and 2) menus based on specific theme option/setting field. Note: I want to 'register' the menu/widget, not merely display it. The logic being that ....

Jaxson Jaxson: 1 hour ago

WordPress

Change password notification email

By default, when customer changed their password using "Lost your password?" link, an email notification saying "Password changed for user: ***" will be sent to Admin's email address. Is there way to change the email address recipient without changing the website's admin email address? ....

Violet Violet: 1 hour ago

WordPress

WordPress widget / plugin....fields not appearing in my widget

Trying to create my first plugin. A simple one. It's doing mainly what I want to do except the widget itself in Appearance-->Widgets doesn't display my fields. Wondering if anyone could point me in the right direction to make my fields appear? function form($instance) { $title = esc_attr($instance); ?> <p><label ....

Josiah Josiah: 2 hours ago

WordPress

How do I display a friendly URL link in the frontend?

I'm creating a separate (simple) directory that does not use any internal WP permalinks or pretty link structure. I've been studying how to make my own custom SEF URLs for this part of my site, and almost have it (or thought so). I have a separate table with records like ....

Willow Willow: 2 hours ago

WordPress

Display Custom Taxonomy names

Im trying to display a custom taxonomy for a custom post type. So this taxonomy is specific to this custom post type. Unfortunately I cant get them to display. Here is my code in functions.php to register the custom taxonomy: add_action('init', 'products_categories', 0); function products_categories(){ $labels = array ('name' => ....

Eleanor Eleanor: 2 hours ago

WordPress

Unit testing to simulate the loop

How do you construct unit tests with PHPUnit and the WordPress test framework that simulate being in the loop? For instance, if I want to test a function that is only able to be called in the loop because it assumes the post data is set up appropriately for the ....

Jameson Jameson: 2 hours ago