Tag Info

New answers tagged

0

This ended up being a weird conflict with how no-conflict mode works in Gravity Forms. Finally, working with their support and trying n+1 combinations it turns out that conflict mode is causing the issue: Set no conflict mode to ON will prevent extraneous scripts and styles from being printed on Gravity Forms admin pages, reducing conflicts with other ...


0

same boat, nine months later. Wordpress… hmph... In widgets.php, there is a class called WP_Widget_Factory (line 319), in it’s constructor, it attaches _register_widgets to the widgets_init hook. This callback function, in all it's great wisdom, then decides to iterate through the array of registered widgets and any that are already registered, it deletes ...


0

Plugin settings are generally saved via the WordPress database. For example, if you were manually updating the plugin Contact Form 7 via your FTP, your form settings would not be overwritten because these live in the database. However, if you have edited the core plugin files via your server (this includes style alterations or other code edits), those ...


0

Using the answer by @Matth_eu, you can enable/disable the actual admin bar but to hide the option within the user-edit.php and profile.php screens, use this: //Removes the 'Show Toolbar' option. function as_remove_personal_options( $subject ) { $subject = preg_replace( '#<tr class="show-admin-bar">.+?/tr>#s', '', $subject, 1 ); return ...


0

Although it shouldn't change based on your theme, this may be an issue caused by how this new theme handles images. As of WordPress 3.5, when you add a media object such as an image, there's a sidebar that appears on the right. Underneath the "Attachment Details" (preview, title, caption, etc.) there's a section called "Attachment Display Settings". In ...


0

It sounds like you want a membership site that restricts content to certain membership levels. There are several membership plugins available for WordPress and several reviews of the options. One site what has several articles on membership plugins is: chrislema.com


0

In order for it to save the data you need to hook your validate_dw_quote() onto to an action, such as admin_init or init. add_action('admin_init', 'validate_dw_quote');


3

A convenient way to use $wpdb in plugins, with custom tables and custom functions is write a class or a couple of functions that get the wp object, and configure it. An example: /* Return global wpdb aready setup with custom tables */ my_plugin_get_db( wpdb $wpdb = NULL ) { static $db; if ( is_null($db) || ! is_null( $wpdb ) ) { $db = ...


2

Globalizing WordPress-defined vars is not the same as creating your own global variables. In the former, you have no choice, it's the latter which you can choose to avoid. Wrap your functions in a class and define your table name as a member var. This lets you define it in one place and keeps it out of the global scope.


0

Although the answer of toscho is better, the easiest way is to hide it with CSS. .woocommerce-result-count { display: none; }


0

Do I have enough visitors to cover the cost of doing this (currently 500/month)? I have two hands, is it enough to earn a living? Well, it depends on what and where I am doing a lot. Visitors do not magically make money appear. Advertisement is part of the process and it depends on a lot of things how well advertisement works in specific niche and how ...


1

Note on input arguments: You are using the filter callback function (FCB) with two input arguments, but the default is one. In general you should replace: add_filter( 'some_filter', 'some_filter_callback' ); function some_filter_callback( $arg1, $arg2 ) { with something like: add_filter( 'some_filter', 'some_filter_callback', 10, 2 ); function ...


0

WC 2.1 update: function wpa_120062_scripts(){ ?> <script type="text/javascript"> jQuery(document).ready(function($) { $('.product_attributes > div').removeClass('closed').show(); $('#product_attributes a.expand_all').click(); }); </script>


1

Edited Answer: TMG is a very popular auto plugin installer for WordPress and a lot of Premium theme author use it. You can get the php class here https://github.com/thomasgriffin/TGM-Plugin-Activation. Also when you will download it you will get a php file named example.php. You just have to include that example.php file in your function.php file and you ...


0

If you want to make the output filterable, you simply need to define a custom filter, and pass the output through it. Your function outputs (echoes) this value: <h1>test</h1> If you want it to be filterable, you need to put that output in a PHP string. Instead of this: ?> <h1>test</h1> <?php Do something like this: ...


0

I found the solution...crazy to answer my own question but here is the solution http://wordpress.org/plugins/get-different-front-page/ Thanks for your help. Why is_home() not working in this context I still don't know. function GET_Different_Page_on_front_parameter() { if (!session_id()) { session_start(); } } add_action( 'init', ...


0

Note as of wordpress 3.8.2 the type of the plugin item passed to this function has changed and it is now an object. /** * @package Plugin_Filter * @version 2.0 */ /* Plugin Name: Plugin Filter Plugin URI: http://www.brideonline.com.au/ Description: Removes certain plugins from being updated. Author: Ben Wise Version: 2.0 Author URI: ...


1

Your problem is here: 'exclude' => '$user_id,1', This will generate the string '$user_id,1', it won't insert the user ID into your string. The reason for this is the difference between '$hello' and "$hello" E.g. $hello = 5; echo '$hello'; // prints out $hello echo "$hello"; // prints out 5 So using double rather than single quotes would fix your ...


0

I assume that the ACF you added to your post type "book" is a "Post Object" with the option "select multiple values" acitvated. So for each book you have, multiple stores can be linked to this one. Here is some code that could help you : <div class="bookdata"> <?php // Get the linked stores // if the ACF is a type "Post Object" and the ...


0

I think you could use the template_redirect hook. I needed to change your code a bit for my own readability: <?php /* Plugin Name: Homepage redirect for SEOT Plugin URI: Description: Version: 0.0.1 Author: Douglas L Sesar Author URI: License: GPLv2 */ function GET_Different_Page_on_front_parameter() { if (!session_id()): ...


0

I got the gallery working like I wanted to, using the following plugin: https://wordpress.org/plugins/rocket-responsive-gallery/ Also, if I will have time, I will apply the information in this article: http://ottopress.com/2011/photo-gallery-primer/ Furthermore: with this answer I no longer need the default Wordpress gallery styles because I can ...


0

I have figured this out. The trick is to use the get_sidebar hook and run some conditionals to check if we're on a CPT page (archive or singular or cpt taxonomy archive) and if the sidebar we've hooked into is the one we want to replace ($sidebar == 'content'). If these conditionals are met we unregister sidebar-2 and add our own sidebar. This probably ...


1

There are several problems with your code. Unless you, or a plugin, has added wp_frm_item_metas to $wpdb, $wpdb has not idea what $wpdb->wp_frm_item_metas is. You will get an "Undefined Property" error, and your query won't work. You can't just use $wpdb-> plus any table name. That won't work. You have to add the property to $wpdb, which isn't that ...


0

I wouldn't use unregister_sidebar I would copy over the sidebar-content.php file to a plugin and add conditionals to the default sidebar-2 as well as add a new sidebar-4 in that file with the conditional for it. <?php if( is_active_sidebar( 'sidebar-4' ) && is_singular('your-cpt') ) { } ?> <div id="content-sidebar" class="content-sidebar ...


0

I did some checking in the dropbox.js code (v2) to see what was happening and how to best solve this. As it turns out, the data-app-key is only used to set the variable Dropbox.appKey. I able to set the variable with the following extra line. Using the javascript example on the Dropbox page https://www.dropbox.com/developers/dropins/chooser/js: ...


1

If my guess is right that you think you add your site URL inside the plugin's head and it will magically update everyones plugin, then I have to tell you that wont work. You have choices: Either you host your plugin on wordpress.org and updates work pretty much without you doing anything then pushing your plugin to svn with the right stable tag in the ...


0

the best option here if you want to use a plugin is to use the woo sidebars plugin which is from from woo themes, its also packaged in their free plugin woo dojo which has several free plugins, if your good with options framework by devin or smof and don't mind using cmb meta boxes by jaredatch then i have a github gist that will allow you to select the ...


1

In a nutshell there is no generic reliable way to load WordPress core from arbitrary file. Since core and extensions directories are independent from each other (they are co-located by default, not by necessity) only core configuration "knows" where extensions are, but not other way around. In private code things like this just get hardcoded. In public code ...


0

If there is no license on the plugin that explicitly allows for re-distribution rights, then the answer is no. If the plugin is licensed under the GPL, then yes.


0

Read http://www.gnu.org/licenses/gpl-3.0.html and http://www.gnu.org/philosophy/selling.html Except for one special situation, the GNU General Public License (GNU GPL) has no requirements about how much you can charge for distributing a copy of free software. You can charge nothing, a penny, a dollar, or a billion dollars.... The one exception ...


0

Found the problem! It was the is_single() line. It's not working because its outside the loop.


0

This is the solution from Peter Baylies (Plugin Author) add_filter( 'option_aioseop_options', 'itdge_sitemap_addl_pages' ); function itdge_sitemap_addl_pages( $option ) { if ( !empty( $option ) && !empty( $option['modules'] ) && !empty( $option['modules']['aiosp_sitemap_options']) ) { $my_sitemap_entries ...


0

This is not a solution to my question but it helps me to solve my problem in Wordpress, and I want to share it. I create a separate sitemap using XMLWriter. Here is the code. Wordpress hook: add_action('parse_request', 'my_custom_url_handler'); function my_custom_url_handler() { $c = new EventsSitemapBuilder(); if( $_SERVER["REQUEST_URI"] == ...


2

You could create a simple page template with just five lines of code: /* Template Name: Protected Page */ if ( ! is_user_logged_in() ) auth_redirect(); else require_once './page.php'; Then select that template for the page you want to protect. auth_redirect() will send the user to the login page and back to the original URL after they are logged ...


1

You didn't provide a link to the plugin but I guess you mean this one. I wonder if you mean: line #20 in the file /public/evr_public-show_event_list.php: echo '<caption>'.__('Click on Event Name for description/registration','evr_language').'</caption>'; line #338 in the file evr_content.php: <b>Click on Event Name for ...


0

I would store the array to the options able as a serialized value. update_option('dw_quotes', serialize($quotes)); and retrieve with: $quotes = get_option('dw_quotes', null); if ($quotes !== null) { $quotes = unserialize($quotes); } Other things to consider: Add handling in case the quotes option does not exist. Also add handling to delete quotes ...


0

Questions and answers work as posts, just with 'post_type' 'question' or 'answer' As they're posts they can have comments. Just work around that.


1

Is possible to make bootstrap css "contextualized" inside a selector, i.e. bootstrap styles works inside that selector, and thanks to css specificity rules, there them take precence over other rules. How to do: First of all download bootstrap less. Let's assume that this files are in 'bootstrap/less' folder. Now create a new less file, let's assume ...


0

I don't think G. M.'s answer is correct. As he alluded to, I don't think it will make any difference what value you specify for the third parameter. (By the way, the 'value' element in the args array does not even exist - see http://docs.woothemes.com/wc-apidocs/source-function-woocommerce_form_field.html#1568-1787 ) What you need to do is set the ...


1

There's probably a few ways you could go about doing this: Method 1) Enqueue your styles after theme styles - View Codex Method 2) Use !important which will take 100% precedence - View Stack Overflow Method 3) If you're creating your own widgets you can insert your own <style> tags which will take precedence over any external files - View Stack ...


0

I have my LDAP issues as well. Can you check and see if its not a firewall issue? Usually LDAP directories are behind firewalls and you need to make sure that the connection between your WP and the LDAP directory is open. Also check for if the ldap directory needs to be connected over SSL.


1

Try removing (function($){ from the beginning and })(jQuery); from the end. And change jQuery(document).ready(function() to jQuery(document).ready(function($)


2

You don't need a plugin, if your images names really match with product SKUs and you use media uploader to upload the file, you can use a single function hooked in add_attachment and you are done. Once it require some work, I'd avoid to upload all the hundreds of images in one "session", probably you can upload sets of 25/50 images per time with no ...


0

You have to called this function in your header.php (your wp theme) : <?php wp_head(); ?> And this one into your Footer.php : <?php wp_footer(); ?> Because you are adding action to your Wordpress, so you have to call that function in your theme.


0

The first line is just an HTML comment outside the scope of PHP. It'll output with every response and creates all the kinds of headaches you're experiencing. Solution? Remove it, or make it a PHP comment: <?php /* In a child theme, all of the functions of the parent theme are present, unless overridden here */ You should also make sure there's ...


0

I think the best plug in to solve this problem is Media File Manager Advanced. I let you check the description of it at: http://wordpress.org/plugins/media-file-manager-advanced/


1

Based on your comment to your question, you might take a look at http://www.wpallimport.com they have a woocommerce addon that works pretty well and includes the product image importer. With a custom CSV i'm sure you could wrangle it to import all in one import for you (including the media manager bit). Now if you are looking to attach existing uploaded ...


1

I personally enjoy Visual Columns It uses a 12 column flexible grid to allow you to visually add columns in the editor instead of a bunch of shortcodes.


1

I have run across a few options for this. Many of them create a drag-and-drop interface that generates shortcodes in the post content. Although ACF's Flexible Content Field saves the data as metadata which my make sense for other types of cases. Advance Custom Fields: Flexible Content Field plugin $25.00AUD Visual Composer $30.00USD Drag and Drop Builder ...


4

Not sure if there actually is a in scope answer for what you are asking, but the below are some hopefully helpful informations/thoughts. Besides that, I don't know about (all) the tools you are mentioning, but thats secondary anyway. What you want, of course, is to keep the development process, like you described it, alive. As you said, it looks like this: ...



Top 50 recent answers are included