4
votes
1answer
449 views

Customizing HTML Editor Quicktags button to open a dialog for choosing insert options

I am looking for adding custom quicktag buttons,that would allow me to display a intermediary dialog before inserting the code. Situation 1) Clicking a quicktag button opens a dialog or thickbox ...
3
votes
1answer
18 views

How to configure Wordpress Multisite by bash script?

I apologize if it's not the right place but I don't know where to ask my question. I've searching the whole web to find a bash script that convert a single site install to a multisite install. Using ...
3
votes
1answer
11 views

How do I stop my blog from pinging back itself?

I connect a lot of my posts to my new ones, and that is probably why I keep getting self pingbacks. Besides a plugin, is there a script I can use to get rid of this?
3
votes
1answer
42 views

Apply the_content filter for specific post types only

I'm trying to modify a snippet of code I found here for a wordpress website: http://support.membermouse.com/support/discussions/topics/9000007386 Here is the code: <?php add_filter( ...
3
votes
1answer
41 views

Why does WP not use relative links when linking pages?

Why is it that Wordpress 4.4.2 does not use relative links (get_bloginfo, or such things) when I use the "internal editor mechanism" to link to existing pages and posts in a site. My local WAMP ...
3
votes
1answer
38 views

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 ...
3
votes
1answer
53 views

Display more recent and less recent posts in same category

Is there a way to display not just the-most-recent posts in a category, but the 3 posts in a category more recent (time-wise) than the current post? For example, Jan10post Jan15post Jan17post | ...
3
votes
1answer
97 views

display woocommerce all category title on home page

how can i display in my theme all woocommerce category title are custom filed value. example html like bellow <li><a href="#"> <div> <h2>category ...
3
votes
1answer
21 views

Adding extra pages to plugin that shouldn't appear in the sidebar

I'm trying to add extra pages to my wordpress plugin and link to these pages through links, form forwards etc. I don't want them to appear in the menu on the left - so add_submenu_page isn't the ...
3
votes
1answer
28 views

Display child taxonomy until the last child

I want to show child categories list on parent taxonomy which I almost obtained using wp_list_categories The problem is I want to show my custom post type of the last child category when I reach last ...
3
votes
1answer
34 views

Cyrillic characters in rewrite rules cause 404 Not Found errors

I have a rewrite rule that includes a page's URI: (<page-uri>)/someaction/(\d+) If the page's URI includes cyrillic characters, such as доска-объявлений, the rule is stored as: ...
3
votes
1answer
18 views

do_settings_sections() doesn't escape quotes

I'm using the Settings API on a custom settings page: <form action='options.php' method='post'> <?php settings_fields('myplugin_settingsPage'); ...
3
votes
1answer
30 views

Is it wrong to put header tags inside WordPress help tabs?

We're working on improving accessibility in our plugin. One of the rules for accessibility is apparently that you should have an h1 tag before any h2 or h3 tags etc. Normally that makes sense, except ...
3
votes
1answer
29 views

Page naming when there is a sub-category only sometimes.

I need help with understanding page naming to display a sub-category which only occurs only sometimes. I also need to understand if I need to create a custom Taxonomy to achieve this? I am using CPT ...
3
votes
1answer
58 views

Share session between my site and WP blog

I am using Yii framework for a web site and WP for a blog (don't ask why, I inherited this project). Yii is responsible for users (login/logout...), and in the blog (WP), I need to know when the user ...
3
votes
1answer
52 views

Issue with foreach on duplicate meta_key's

Im storing using add_user_meta custom values that get sent to the front page of the website. Here is the php code. $user_query = new WP_User_Query( array( 'fields' => 'ID' ) ); ...
3
votes
1answer
65 views

Converting mysql to $wpdb

I'm trying to convert this to using a $wpdb class. It will return all the enums possible and i have to use this $wpdb due to mysql_query giving me weird error (no database selected) Code is following ...
3
votes
1answer
65 views

Is it possible to make Wordpress core (iris)colorpicker-wrapper higher instead of making colorboxes scale smaller?

I'm having an issue using wordpress core colorpicker. I'm retrieiving random number of colors from the server (that fetches colors a specific website). These colors I want to use within the ...
3
votes
1answer
144 views

Multiple wp_schedule_event cron jobs in plugin cause multi-execution

over the last week I have been working on some cron jobs for a real-estate website that has hundreds of updates/deletes and new posts added each day. I am very near the end now and looking to ...
3
votes
1answer
64 views

Custom Posttype Inheritance (and url structure)

After looking at documentation and searching around, I haven't been able to find anything, so here goes: Are there any way of custom-post-type-inheritance, and an url structure like this: ...
3
votes
1answer
111 views

How to call “page specific menu items” in template

I have installed a plugin for giving custom command for menu to display on each Page Specific Menu Items, now I need to display these menus on theme header. Can I use anything like wp_nav_menu(). ...
3
votes
1answer
61 views

Is it possible to put tags and category information in the post as text?

Is it possible to put tags and category information in the post area, so one doesn't have to click the appropriate fields and use the mouse? Ideally I just want to type "#art" "cat:painting" in the ...
3
votes
1answer
115 views

SQL Statement generated by WP_Query not producing expected results

I am trying to alter WP_Query on the pre_get_posts action hook, for filtering the posts returned, depending on the built-in category and post_tag taxonomies. I would like that the only posts returned ...
3
votes
1answer
124 views

WordPress category & taxonomy loop with pagination

I have two taxonomies belonging to the same post type (posts). Adventure - belonging to the category taxonomy Adventure - belonging to the holiday-type taxonomy I want to run two queries: $args = ...
3
votes
1answer
83 views

WordPress Multisite Login Access

I have a multisite installation and use an .htaccess directive to close access to wp-login.php. <files wp-login.php> errordocument 403 http://example.com/restricted/ order deny,allow deny from ...
3
votes
1answer
95 views

Wordpress cron isn't scheduled on amazon web services

I'm trying to setup a cron to run every hour, it works fine on my local vagrant box, but it doesn't seem to schedule properly on aws(elastic beanstalk). Here's the code: ...
3
votes
1answer
40 views

Publish post when edit post form submitted with enter/return pressed on keyboard

How do you publish posts when the post edit form is submitted with the enter/return key on the keyboard? By default WordPress saves the post in draft status. To provide some background, I have an ...
3
votes
1answer
74 views

Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?

The parameter "_builtin" => true is a huge help for me, as this will set good permalink structure, like standard posts, for example: example.com/my_category/sub_category/POST-NAME instead of ...
3
votes
1answer
278 views

NGinx + Wordpress Subdomain Multi with core in Subdirectory

I have a WordPress install that works perfectly on a Apache server. I am currently in the process of both changing my hosting company (the new one offer NGinx) and my development stack (moving to ...
3
votes
1answer
172 views

WordPress AJAX Login Screen

In recent versions of WordPress, when you have been logged in to the dashboard a while with the page still open, WordPress times out your session and opens a login box. This box appears in a little ...
3
votes
1answer
212 views

Display message once per session to users with a specific role

I need to display a message to only users with a specific role. The message should appear either as soon as the user logs in or if they re-open their browser after having closed it when logged in to ...
3
votes
1answer
206 views

Prevent sorting and dragging of specific postbox metabox

I'm attempting to limit the jQuery sortable functionality on certain postboxes/metaboxes when editing a post/page. So far I've enqueued my custom .js file in admin. wp_enqueue_script function ...
3
votes
1answer
249 views

Custom Nav Walker menu - Display category count

I have a custom walker menu.( See the code below) I would like to have my nav menu like this: Where 495 is the total of the records containing childrens. Where 42 Number of published articles. ...
3
votes
1answer
99 views

Insert Images at Master Uniform Height

I'm trying to figure out a way to insert images from the media library into the post editor at a uniform height... but by selecting one option. For example, I set a height like "300" somewhere (like ...
3
votes
1answer
326 views

Rewrite rule page url with category

I have enabled the category box for pages with this: // Add to the admin_init hook of your theme functions.php file add_action( 'admin_init', 'page_categories' ); function page_categories() { // ...
3
votes
1answer
143 views

Wrong gravatar showing up?

I've got an install that's loading the wrong gravatar and I can't figure out why. Most confusing is that it's doing it in the front-end templates AND in the admin. Here's a screen cap: The user and ...
3
votes
1answer
503 views

wp_insert_post extremely slow on big table, direct query very fast

My posts table is about 600K, and I don't consider this big at all. Anyway wp_insert_post is becoming very slow. I am trying to import a huge list of hotel information into Posts. The list is about ...
3
votes
1answer
1k views

“Cheatin’ uh?” error message on multple theme directories

In my wp-config.php I've added another theme directory; register_theme_directory( dirname( __FILE__ ) . '\..\themes' );. I'm not sure if this is the correct place to add it. When I then try to ...
3
votes
1answer
482 views

How to remove admin.php?page= from admin using .htaccess?

I've been looking for this everywhere, and can't find it - so I apologize if it is a duplicate question. I can't believe it hasn't been asked before... So please direct me if it has :) I'm looking ...
3
votes
1answer
30 views

Forbid contributors viewing drafts

Is there any way I can forbid a contributor to view draft posts? Right now any contributor can view my draft posts and even edit them (however their edits must be approved by administrator first).
3
votes
1answer
171 views

Bind event on Media gallery elements WordPress

Good day ! Please help to get binding on WordPress Media Upload elements. When i click on any of gallery item need a custom function to fire up. There is a BackBone collection called "Attachment" ...
3
votes
1answer
111 views

Ask user permission when activating a plugin

Is there a specific Wordpress API way to ask the user's permission for something when activating a plugin? Due to the Wordpress plugin directory policy I have to ask the users consent for the ...
3
votes
1answer
132 views

Let readers suggest edits from the frontend

I'd like to make my articles editable at the front-end for any reader who visits the site. (More like a wiki). I don't really want to trouble them through the registration process. I have no idea how ...
3
votes
1answer
305 views

Internalize get_theme_mod CSS Into Stylesheet?

This code adds custom CSS selections from the theme customizer. What I hate about this code is that it outputs the style tags directly into the site's html, rather than tacking the selections onto my ...
3
votes
1answer
422 views

Display (and manage) webcam images?

I have a webcam that write every minutes or so, an image to an ftp folder on the server where WP is installed. My question is how to get the last image displayed on page, with refresh every 60 second, ...
3
votes
1answer
57 views

Where is the source of the media items filter

I couldn't find the source in the php files. What is generating the select drop-down for the attachment filters in the media library?
3
votes
1answer
620 views

Deactivate plugin for a specific user group

I would like to deactivate a plugin for a specific user. I'm using the following code inside a the wp-content/plugin-mu plugin file: add_filter( 'option_active_plugins', 'bo_disable_apm_plugin' ); ...
3
votes
1answer
132 views

Query Custom Meta Value with Increment

I have a Query searching for a meta value I have added to my posts (meta-select). I have it feeding out in a loop with 4 results. Let's say I want this loop to start with the meta value "2" and work ...
3
votes
1answer
888 views

Change label of title field for posts in the backend

I am trying to add some HTML to the title label in the backend of WordPress. Attempt 1: I am using the following (simplified) function: function change_post_titles() { global $post, $title, ...
3
votes
1answer
116 views

Why is group ownership with rwx permissions not enough?

Running PHP 5.4 and Apache2 on Debian 7, with apache configured to use user www-data. I'm trying to figure out why Wordpress cannot modify files in its directory when it has group ownership with ...

15 30 50 per page