FAQ Database Discussion Community


Uniquely identifying a WordPress blog?

php,wordpress,wordpress-plugin
I'm working on implementing a WordPress plugin which has a one-click setup procedure that calls my server to set things up by sending a unique key to the server, and then use that code from that time on to configure the system in the future. Is there a way in...

add_magic_quotes() is not working in wordpress

php,wordpress,wordpress-plugin,code-snippets,magic-quotes
Here is the code that's run by the plugin. It passes the CSV file data to MySQL.: $new_post = array( 'post_title' => $row['Account Name'], 'post_content' => $row['Yellow Page Business Description'], 'post_status' => 'publish', 'post_author' => 1, 'post_type' => 'business', 'post_category' => array(0) ); try { $result = wp_insert_post(add_magic_quotes($new_post), true); if...

How can I put this php into this html?

php,html,wordpress-plugin
So I have the following php: $latest_cpt = get_posts("post_type=event&numberposts=1"); $theidone =$latest_cpt[0]->ID; $this_post_id = $theidone; //get_the_ID(); $key_2_value = get_post_meta( $this_post_id, 'custom_select', true ); if( ! empty( $key_2_value )) { $thisisworking = $key_2_value ; ;} I need to put all the php code above where '.$thisisworking.' is below. I keep getting semi...

Prevent Wordpress settings save - validation

php,wordpress,validation,wordpress-plugin
My function for validation: function my_plg_validate_options( $input ) { $valid = array(); if ( is_numeric( $input['num_tags'] ) ) $valid['num_tags'] = $input['num_tags']; else add_settings_error('my_plg_validate_num_tags_field','my_plg_validate_num_tags_error','Incorrect value entered!','error'); if(!empty($valid)) { return $valid; } } EDIT function my_plg_options_page() { ?> <div class='wrap'> <h2>Tagara | Postavke </h2> <form action="options.php" method="post"> <?php settings_fields('my_plg_options'); ?>...

How to show post formats in custom post types?

php,wordpress,wordpress-plugin,custom-post-type
I create custom post type in wordpress. but i also want to show post formats quote and image. where i choose post format quote or image. this is my custom post type code! function Quotes_sky() { $labels = array( 'name' => _x( 'Quotes', 'post type general name', 'your-plugin-textdomain' ), 'singular_name'...

How come Page content won't align when creating new page with Visual Composer?

wordpress,wordpress-plugin
For some odd reason when I create a new page with Visual Composer my content doesn't align at all, however when I edit an existing page that came with a template It does. Video Demonstration: https://www.youtube.com/watch?v=Z1LFcmUs1tg...

What's a cleaner way to output HTML from a Wordpress plugin?

php,wordpress,wordpress-plugin,wordpress-plugin-dev
My Wordpress plugin creates a few shortcodes that return blocks of HTML. When I register the shortcodes, I do so like this: add_shortcode('bb-loans-form', function() { return Shortcodes::loanApplicationForm(); }); And here is the static method from the Shortcodes class: public static function loadApplicationForm() { $form = new \AdamWathan\Form\FormBuilder; $html = $form->open()->action('/apply')->class('bb-loan-form');...

Wordpress - How to login user to frontend programmatically

wordpress,wordpress-plugin
I created function for loging in users on frontend using this example: https://gist.github.com/iandunn/8162246 After user logs in is_user_logged_in() function returns true only inside this function where I placed code for login part. How do I login users globally? This is my code: function programmatic_login( $username ) { if ( is_user_logged_in()...

How to crop image from center using wp_image_editor

wordpress,image,wordpress-plugin,resize-crop,wp-image-editor
I am working on WordPress plugin. In plugin the user upload images from meta field and in back end i use wp_image_editor for cropping and re sizing the images. The images re sized very well but on cropping the images not cropped very well. I give x-dimension 100 and y-dimension...

How to change custom admin menu?

wordpress,function,wordpress-plugin,wordpress-theming,wordpress-plugin-dev
I have created an admin menu in wordpress with these functions: function list_menu(){ add_menu_page( 'My Plugin', 'My Plugin', 'administrator', 'mylist', 'list_page', plugins_url('favicon.png'), 24); } add_action('admin_menu', 'list_menu'); function add_menu(){ add_submenu_page( 'mylist', 'Add New', 'Add New', 'administrator', 'add_new_page', 'add_page'); } add_action('admin_menu', 'add_menu'); But it create a menu with duplicate value in the...

To grep version number from Wordpress plugin folder

regex,wordpress,grep,wordpress-plugin
What will be grep regex to extract version number like Version: 3.1.5 * Version: 3.1.5 Will output 3.1.5 But It should not catch likes MIME-Version: 1.0\n Here is my grep command grep -ri 'version\s*:\s*[0-9\.]\w*' /home/test/public_html/wp-content/plugins/plugin_name @anubhava woocommerce is a folder. There is file woocommerce.php under this folder. **Content of woocommerce.php...

Bootstrap is overriding my submit button on the form on my website

css,wordpress,forms,twitter-bootstrap,wordpress-plugin
Rocksaw.com's Contact page Alright, so I am having a pretty tough time with my contact form working. I am using bootstrap framework to lay everything out and each column is playing nicely until I view the site on a mobile device; a device with a screen size of 650px and...

Wordpress custom post action hook

php,wordpress,wordpress-plugin,wordpress-plugin-dev,custom-post-type
I'm working on a plugin for wordpress that I would like to fire every time a custom post of the type 'job' is posted, published, edited, trashed, untrashed, etc. (basically whenever there is an update to that post type). I'm having a bit of trouble finding the correct action hook...

Add an hint field in the admin page of a plugin

wordpress,wordpress-plugin
I made a plugin and now I'm making an admin page for it. I know how to properly add a field in an admin page but do you know how I can add an "hint field"? Example : "This address is used for admin purposes, like new user notification". Thanks...

get_posts - orderby desc wrong order

wordpress,wordpress-plugin,wordpress-theming
In my WordPress plugin I am getting posts using the following: $args = array( 'post_type' => 'wpplugin_pp_order', 'posts_per_page' => -1, 'order' => 'ASC', 'orderby' => 'ID' ); $posts = get_posts($args); The problem is the result is returning like so for the post_id: 3000 3001 3002 3003 2999 2998 How can...

How use theme's function into plugin's file in Wordpress

wordpress,wordpress-plugin,wordpress-theming
I am building a simple plugin of wordpress, and trying to use theme's function into plugin's file, but it is saying "Call to undefined function", while that function exists in themes.php of current active theme.that function is in use in theme's files but can't accessible in plugin's file, can anyone...

What does internally hosted means

php,wordpress,wordpress-plugin,wordpress-theming,wordpress-plugin-dev
I have built a site in WordPress and the client wants to control things through WordPress but he wants the live version to be static for which someone told me to use StaticPress plugin. He would like to have the WordPress version internally hosted and the live version would be...

Do I have to be admin to make requests to wp-admin/admin-post.php?

php,wordpress,wordpress-plugin
I have developed a custom plugin and it all works fine when I'm logged in as admin. My plugin collects details from a custom form the plugin creates. When the form is submitted it sends a POST request to admin-post.php. This works fine when logged in. When I log out,...

Wordpress Registration Plugin with payment option [closed]

wordpress,wordpress-plugin
May I need a help member registration plugin with payment option with 2 or 3 types for user, Please tell me a good plugin for registration payment plugin. Thank you so much.

Better Search box for wordpress

wordpress,search,wordpress-plugin,wordpress-theming
Please take a look on this WordPress theme, when you click on search icon, a search box appear in the middle of page with a cool effect. I want to add this to my WordPress site. I have looked on google but still no luck, Please suggest me a plugin...

How can I imitate this modal effect in a Wordpress site?

jquery,wordpress,wordpress-plugin
I want to imitate the effect on http://www.homeloanrepublic.com.au/ such that when you click on the mail icon on their navigation bar, it will display an existing section in the homepage on a modal form. How can I do this (preferably with no plugins, but plugin suggestions are welcome too)? Any...

Add shortcode inside another with echo

wordpress,wordpress-plugin,shortcode
I try to nest a shortcode to another in my page. Why this isnt working? [toggle] <?php echo do_shortcode('[Best_Wordpress_Gallery id="1" gal_title="my"]'); ?> [/toggle] ...

formidable:- Hide short code closing bracket on page

wordpress,wordpress-plugin,formidable
I am using formidable plugin here i have created one page and using bellow short code on page to display form entry using view id 438. [display-frm-data id=438 user_id=[176 show=id]] my problem is that in the end of view's entries it's showing closing bracket of short code like this "]"...

How to avoid the product's limit for taxonomy in WooCommerce?

php,wordpress,wordpress-plugin,woocommerce,wordpress-plugin-dev
Recently I'm faced with an interesting effect which seems to go with default settings. When you just display products in mixed order it's ok, but when you're trying to create custom category for them - there are I'm getting the limit for loop: only 12 products are displayed in tab...

How to redirect a user with specific “ROLE” to a specific page after login in Wordpress [closed]

php,wordpress,wordpress-plugin,wordpress-plugin-dev
I have created a new user role named student_role I want to redirect the user with this role to form page(which I created from wp front end) when he logs in. I tried peter login redirect plugin but failed....

How to call a function on click

javascript,php,jquery,plugins,wordpress-plugin
I'm having trouble re-initializing some code. I have a function from a plugin that I need to reinitialize on click. I started learning JS and PHP last month so I am still uncomfortable with manipulating code I have not written. Here's the code that I need to reload, It was...

need wordpress plugin to show 3 type of different kind of text, image and 2 buttons

wordpress,plugins,wordpress-plugin
I have slider image on http://techturners.com/arman-badwal/ page in "featured work" section. I need plugin to create dynamic slider like image in section.I use many sliders like cyclone-slider but they show only title, description and image.

How to hook into Contact Form 7 Before Send

wordpress,wordpress-plugin,contact-form-7
I have a plugin I am writing that I want to interact with Contact Form 7. In my plugin I added the following action add_action add_action("wpcf7_before_send_mail", "wpcf7_do_something_else"); function wpcf7_do_something_else(&$wpcf7_data) { // Here is the variable where the data are stored! var_dump($wpcf7_data); // If you want to skip mailing the data,...

jQuery ajax call works only if its debugged step by step

php,jquery,ajax,wordpress,wordpress-plugin
$('.single_add_to_cart_button').click(function() { $.ajax({ type: "POST", url: script_e.ajaxurl, //url loaded from the plugin data: {id:test}, cache: false, success: function(data){ alert(data); } }); }); //php public function enqueue_scripts(){ wp_enqueue_script( 'e_jquery', plugin_dir_url( __FILE__ ).'../assets/js/script_e.js' ); wp_localize_script( 'e_jquery', 'script_e', array( 'ajaxurl' => plugin_dir_url( __FILE__ ).'event-capture.php' , ) ); } add_action( 'wp_enqueue_scripts', array($this,'enqueue_scripts') );...

Contact Form 7 submit failed validation

php,wordpress,wordpress-plugin,contact-form-7
I need Contact Form 7 to send one email when validation has been failed. Then send the normal CF7 email when the form is submitted correctly. Ridiculous I know but clients! I think I'm relatively close with the following: function send_failed_vaildation_email( $data ) { $messagesend = 'Name:' . $_POST['your-name']; $messagesend...

How to insert text on post link Wordpress?

wordpress,.htaccess,wordpress-plugin
only post link current: http://mydomain/post-name I want change only post link : http://mydomain/blog/post-name

woocommerce conditional products/categories on user role

wordpress,wordpress-plugin,woocommerce
Looking for a plugin that helps me to restrict woocommerce products or product categories based on role. Let's say that I only want to sell bulk products to whole sale buyers. Any help is awesome, thanks!...

jQuery while loop stopping prematurely

jquery,while-loop,wordpress-plugin
I'm working on my first Wordpress plugin, a simple linked periodic table shortcode. In it I've set up a jQuery script that shrinks the font size within the table to fit within its parent. However, the loop stops short, leaving part of the table sitting in the parent's padding. Can...

Wordpress Add my plugin admin menu to my admin new role

wordpress,wordpress-plugin,wordpress-plugin-dev
I created a new plugin including a admin menu (add_menu_page) I created also a new role "my_plugin_admin_role" Now I would like to add my plugin menu only to my new role. How can'I do this. Sorry for my bad English....

Syntax error when moving Wordpress Site

php,sql,wordpress,wordpress-plugin,syntax-error
I recently tried to migrate a Wordpress site from a development server over to a live server. I moved all the contents of the site, imported the database and connected the database via the wp-config file. Unfortunately however I am getting the error... Parse error: syntax error, unexpected 'if' (T_IF)...

Wordpress plugin with classes, namespaces and psr-0 autoloading

php,wordpress,namespaces,wordpress-plugin,psr-0
I'm pretty new at this Wordpress thingy and I've now made my own theme and would like to create a plugin that handles my slideshow. (I have to teach this for some pupils later on, so I cannot just use an existing plugin) I have implemented the autoloader from http://www.php-fig.org/psr/psr-0...

How to Get Current Custom Post Type Associated Taxonomy Term

wordpress,wordpress-plugin,wordpress-theming
I have a single.php file like below <?php get_header(); ?> <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); echo '<div">'; the_content(); echo '</div>'; } // end while } // end if ?> <?php get_footer(); ?> now I need to get Current Custom Post Type Associated Taxonomy...

locating where wordpress stores plugin information - for purpose of a git repo

wordpress,git,wordpress-plugin,revolution-slider
I have installed Revolution Slider plugin for Wordpress and it works just fine. However, I'm also working in a collaborative environment using GIT, and would like to just push my code to production vs. install the plugin again on the target server. This of course means that none of the...

How do I disable or hide a survey for my WP users once it has been submitted?

php,wordpress,wordpress-plugin
I have a survey inside a modal. The intent is to display this to logged in users only. That part works fine. The issue is how to prevent it from displaying again once they have submitted it. I'm guessing there are hooks or methods in WP which would make this...

Nivo Slider custom height/width problems

html,css,wordpress,wordpress-plugin,nivo-slider
I have searched for a resolution to my problem, but have not yet been successful. I have images of different sizes in Nivo Slider, but I need to create a viewport that displays the image centered in a div. It's hard to explain, but I have included a diagram below....

Can't use field name for have_rows() on WordPress ACF repeater fields

php,wordpress,wordpress-plugin,advanced-custom-fields
have_rows() is not returning any rows for the field name. I have a repeater field on an option page. Works: have_rows('field_554a52eedd894', 'option') Doesn't work: have_rows('advert_placements', 'option') The database entry looks like this: _options_advert_placements | field_554a52eedd894 and those values are on the WordPress page too. It seems to me that the...

Facebook ignoring OG image on first share

facebook,wordpress-plugin
I'm developing a WordPress site and using the yoast seo plugin to generate an og image on a dynamic page. However, I think this is not related to that. The og image link appears perfectly, but if I click on the share button, no image is included unless I have...

Overriding plugin functions from a theme

wordpress,wordpress-plugin,wordpress-theming
There is a plugin that has all of its presentation functions declared so that they can be overriden. I.e.: if (!function_exists('show_thing')){ ... } How should this be done? I tried declaring the function in my themes functions.php but it was already declared by that point of execution. If I create...

Stop form submission on photo uploding (userpro plugin)

wordpress,wordpress-plugin
I am using user-pro plugin and in my registration page having field like below.. (1) Profile-picture (2) First name (field required validation) (3) Last name (field required validation) (4) Country....etc problem is their when I upload image and click on submit button then it fire the validation to other field...

How to get JSON id after item is created

php,json,wordpress,wordpress-plugin
Im using a function to share a collection of bookmarks with other users and i need to get the id after the new item is created in wordpress userpro bookmarks plugin function share_collection($id,$name,$cbcolor,$user) { $user_id = get_user_by( 'email', $user ); $user_id_current = get_current_user_id(); $collectionscurrent = $this->get_collections($user_id_current); $collections = $this->get_collections($user_id->ID); $collections[]...

Display Popup when text is clicked in wordpress

wordpress,text,popup,wordpress-plugin
I have a Html code In wordpress.: '<a href="">example</a>' When this "example" is clicked, it needs to show a popup window with some texts. i came across some wordpress popup plugins like uji popup,etc.. they given some short codes. how can i use this shortcodes into my "href". or any...

Add custom functionality on WooCommerce complete button

php,ajax,wordpress,wordpress-plugin,woocommerce
I've a situation to add some data to the database tables on order status completed button. I can see the url in class-wc-admin-post-types.php Can someone help me for any hook? Or how the admin-ajax.php works? I have to add status to some of mine custom database tables....

Wordpress - Attach uploaded image to post

php,wordpress,image,post,wordpress-plugin
I'm using the Wordpress plugin Alchimist Ajax Upload to upload an image via Ajax, the post is created after submission of the form and after uploading the unattached images. My problem is that I need to attach those uploaded images to that created post. I have the post ID and...

Composer custom installer paths with WPackagist

php,wordpress,wordpress-plugin,composer-php,packagist
By default, dependencies from http://wpackagist.org/ install to /wp-content/plugins or /wp-content/themes to mimic the default locations for WordPress but I've previously been able to specify that dependencies from http://wpackagist.org/ should go in a specific directory with the following: "extra": { "installer-paths": { "vendor/{$name}/": ["type:wordpress-plugin"], "vendor/{$name}/": ["type:wordpress-theme"] } } i.e. to put...

JSON API for Wordpress returns clutter

objective-c,json,wordpress-plugin,json-api
I am trying to parse a JSON data fetched from a Wordpress blog in Objective C, but it's returning clutter/garbage that I don't need. For example there are 10 posts on main page, I can access title and date of the post correctly but content (main post area) includes garbage...

Usermeta in wordpress plugin won't save - development

wordpress,wordpress-plugin,wordpress-plugin-dev
I am trying to create a plugin, in which I have to save a usermeta. The code for adding and saving the usermeta is below. The usermata field is being shown in the userprofile section, but saving it doesn't do anything. Can someone please help me! function add_adslot_text() { ?>...

Unable to add bullets before post title on WP

php,css,wordpress,wordpress-plugin
How to add square bullets before post title [generated by flexible recent post (frp) WP plugin] on different categories like health, entertainment, etc on my site lagatar dot com Plugin shortcode: frp_title frp_link Here's the css copy of frp: http://lagatar.com/copyof-frp-front.css http://lagatar.com/copyof-frp-admin.css...

Call to undefined function add_action()

wordpress,plugins,wordpress-plugin
I am developing a plugin for custom registration form.I have first file customapplicationform.php file , other files in side registration and shortcode folder. So, My Plugin Directory structure like this : --->customapplicationform |--js |--ajax-registration.js |--registration |--registration.php |--regsubmit.php |--scripts.php |--shortcode |--display.php |--shortcodes.php --customapplicatioform.php It's give error : Fatal error: Call to...

How can I make content disappear when a user logs in?

php,css,wordpress,login,wordpress-plugin
I am working in Wordpress, and I would like to make certain elements on my navigation bar disappear once a user logs in. How can I do this?

Wordpress - Custom plugin to return related posts by category

wordpress,wordpress-plugin,categories,posts
I'm learning how to create custom plugins for Wordpress, I am trying to get related posts by category. The problem is, I am returning all posts regardless of it's category whether it's the same category or not. I've done a var_dump on the $categoriesIds[] and it is pulling the right...

Undefined variable in a class when I have defined it

php,wordpress,wordpress-plugin,wordpress-theming,wordpress-plugin-dev
Coding a new version of my own Wordpress plugin, this time using OOP to make it more readable for other collaborators. It is based on Wordpress Plugin Boilerplate and also Cuztom, to facilitate the creation of Custom Post Types. My CPTs are created, they update well. Although I can call...

How to add image dimensions in an image being added via regex

php,html,regex,wordpress-plugin
Here is a piece of PHP code from a WordPress plugin that adds an image into the content by using preg_replace. The problem is that the added image has no dimensions specified and as this image is added multiple times on every page, it slows down page rendering (to a...

Wordpress Pre Fill content in Posts

php,wordpress,wordpress-plugin,wordpress-plugin-dev
I have an admin plugin that has a list of articles in it with a button "Add to Posts" along side. On the click of that button, I want to redirect to "/wp-admin/post-new.php" with the form pre filled. I can set the title in the url like wp-admin/post-new.php?post_type=post&post_title=My Titlle. But,...

How to set woocommerce checkout form values to empty

wordpress,wordpress-plugin,woocommerce
I am using Woocommerce plugin for a WordPress site. But when as user I checkout I can see form populated with last user's details. How to set form entries to blank in Woocommerce. Please help. Fields are pre-populated with last user's detail. Is there a way to avoid this?

disable update for wordpress plugin named Dropbox Folder Share

wordpress,plugins,wordpress-plugin,wordpress-plugin-dev
I have found the following plugin. Dropbox Folder Share which is licensed under the GNU General Public License. In the plugin I have made some minor changes. mainly added my language. but i have also changed som other things. How can I ensure that the plugin will not be updated....

Update a post without update post title

wordpress,wordpress-plugin,hook,posts
I want to update post data without update post title even if user change the post title. For this functionality I have write the following codes. But it's not working. My code is as follows : function update_post_without_update_title($post_id,$data) { $post = get_post($post_id); if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )...

Passing variables from PHP to Javascript with wp_localize_script function

ajax,wordpress,wordpress-plugin
I´m trying to get my PHP variables into a JS file, in my wordpress plugin. Following the cake recipe, a code the below snippet. * PHP * $someone = 'whatever'; function admin_script_style( $hook ) { global $post_type; wp_register_script( 'my_scripts', plugins_url( '', __FILE__ ) .'/js/' . 'scripts.js', array( 'jquery' ), '1.0',...

Woocommerce tax calculation with cart custom fees

wordpress-plugin,woocommerce
I have 3 custom fees added to my cart using this code, and it works fine function woo_add_cart_fee() { global $woocommerce; $admin_fees = get_option( 'admin_fees', 10 ); $stamp_duty = get_option( 'stamp_duty', 10 ); $refundable_deposit = get_option( 'refundable_deposit', 10 ); $woocommerce->cart->add_fee( __('Admin Fees', 'woocommerce'), $admin_fees ); $woocommerce->cart->add_fee( __('Stamp Duty', 'woocommerce'), $stamp_duty...

how to automatically install a wordpress plugin when activating a wordpress theme?

wordpress,wordpress-plugin
I am new to wordpress. I want to install a wordpress plugin automatically when I activate a particular wordpress theme and when I deactivate that theme at that time that plugin should also be deactivated. How can I do that? Thanks in advance.

How to display page content in custom theme in wordpress?

php,wordpress,wordpress-plugin,wordpress-theming,content-type
I have been searching for this a few hours now and I might just overlook it or asking the wrong questions in google, but I would really like to know how I can get the content I type in e.g. the About page in the WordPress dashboard, to display on...

Wordpress - how to show links to 'private' pages in wp_nav_menu?

php,wordpress,wordpress-plugin,wordpress-theming
In my WordPress site I have a requirement to show private links in the main navigation (via wp_nav_menu) even if the user isn't logged in (I just need to show the link, not change who can view the actual content). I can do this elsewhere, using wp_list_pages and specifying the...

Buddypress: Language not changing

wordpress,wordpress-plugin,buddypress
I'm getting crazy because everything seems to be fine, but impossible to get a solution. I want to translate my buddypress to Spanish. Seems like I have everything ok: My language files: My wp-config define('WPLANG', 'es_ES'); My config on dashboard: Setted to Spanish My wordpress version : 4.1. My wordpress...

Custom page / message after installation of wordpress plugins

wordpress,wordpress-plugin,wordpress-plugin-dev
I want to give some tips to the people that install my plugins. So after the installation of the plugin I want them to see an instruccion page, or go directly to the configuration of the plugin. Any hook after the activation of the plugin where I can redirect to...

Authentication Issue with WP-API and Net::Http

ruby,wordpress,oauth,wordpress-plugin,net-http
I am new to Wordpress. I want to access WP-API to create a post using REST API. I am unable to perform POST, PUT and Delete request. Though I can retrieve data only. I wrote a ruby script for this. Below is my code snippet. require 'net/http' require 'net/http/oauth' require...

Change upload_dir folder at a certain cpt but cant change back

wordpress,upload,wordpress-plugin,wordpress-plugin-dev,custom-post-type
im try something with the upload_dir filter I check the current CPT with this function function get_current_post_type() { global $post, $typenow, $current_screen; //we have a post so we can just get the post type from that if ( $post && $post->post_type ) { return $post->post_type; } //check the global $typenow...

Yoast SEO multilanguage site

wordpress,wordpress-plugin,seo,multilanguage
I have the following issue. I'm building a website that have 4 languages. I've installed BWS multilanguage plugin to do the different language version. With this plugin I can only change the post language but the SEO meta are ever the same. How can I have different metas for each...

We need to output this as a static site to be hosted on the clients servers [closed]

php,wordpress,wordpress-plugin,wordpress-theming,wordpress-mu
My Client is willing to follow an unusual approach and wants to control the back-end through WordPress internally but output it as an static one on the live server. I this possible? Well I think it is, can anyone suggest me how should I do it or send me any...

How can I wrap this text so it doesn't overflow past the widget container?

html,css,wordpress,wordpress-plugin,wordpress-widget
http://imgur.com/5GHqLQX I have a Wordpress widget and inside the widget I am displaying profile information. Some times the text for the 2nd row is too long and it overflows past the widget container. What would be a good way to deal with this, and how could I implement it in...

wp_schedule_event hook sheduled but not working

php,wordpress,cron,wordpress-plugin,cron-task
I'm trying to trigger cron job from WordPress Plugin that I'm writing (It's gonna take all new Products and export them to CSV every day) so the problem is that when I'm put this code in functions.php all working great and the code is valid but from the plugin folder...

Prevent theme styles from loading in custom page template

wordpress,wordpress-plugin
I have a wordpress website with a theme. To implement some changes I created a child theme. That works fine. Now I want to add a page template that allows me to enqueue styles via wp_enqueue_style. For that to work I need to add wp_head() to my page template if...

Wordpress Query by Meta key, type date numeric

php,wordpress,wordpress-plugin
i have problem with WP Query, can't order by meta key I use Event Manager plugin, and need query 4 post on my Homepage, I need post only current and future events(posts) and sort by start date. Here is my code $time = date('Y-m-d'); $timeStro = strtotime($time); $myNewQuery = new...

How to move the red marker on a google maps wordpress plugin?

wordpress,wordpress-plugin
I am modifying a wordpress website which has google maps as a plugin (although it's not on the plugin list). On the map which comes up when visitors open the contact page there is a red marker which indicates the location of the business. But the location has changed and...

How to add additional settings on error in Contact form 7?

jquery,wordpress-plugin,contact-form-7
I already know the function 'on_sent_ok' to add jQuery actions when the form is submitted with success. However I want to display a modal window alerting the user when there are submitting erros. There's some function like the one above, but to be called on errors?

Wordpress - Undefined index on unset field

wordpress-plugin,undefined-index
Still trying to figure my way around Wordpress plugin development, how can I resolve this undefined error? This appears when I add a new post, it can't find the post so I'm trying to figure out how to resolve it with an isset. Notice: Undefined index: kk_youtube in /var/www/html/wordpress/wp-content/plugins/video_widget/video_widget.php on...

Custom WooCommerce Gateway

wordpress,wordpress-plugin,woocommerce
I`m trying to develop a custom payment gateway for WooCommerce plugin, but I have a problem with the checkout page. What I want is to insert a form on the checkout final step page that is submitted automatically after 5 seconds. My code is: ... add_action('woocommerce_receipt_' . $this->id, array($this, 'receipt_page'));...

How can I assign a php return value without causing my sql to run twice?

php,mysql,wordpress,wordpress-plugin
I am making a wordpress plugin that deals with forms. I have a form that upon submit, a function is called to insert the values into the DB. From that function, I am returning the clientID value which was auto Incremented. I then assign that returned value to a new...

Trying to show a user's custom post type posts in their buddypress profile?

wordpress,wordpress-plugin,custom-post-type,buddypress,author
-I have successfully added a new tab to the Buddypress profile page and I also have my custom tab displaying my custom recipes template located in (buddypress/members/single/recipes.php) function my_setup_nav() { global $bp; bp_core_new_nav_item( array( 'name' => __( 'My Recipes', 'buddypress' ), 'parent_slug' => $bp->profile->slug, 'slug' => 'recipes', 'position' => 30,...

how add_submenu_page set for multiple role?

wordpress,wordpress-plugin
I have created some wordpress admin menu and I want to add these menu for multiple roles: add_submenu_page('Events', 'Colloqui', 'subscriber, editor', 'events', 'ww_events'); This is only working for subscriber role. But, I want this menu also for administrator role....

remove animation from Nav buttons javascript

javascript,jquery,wordpress-plugin
this is website on which I am working http://liveatdevonwood.com/floor-plans/ When I click on any of the image ,the image appears in lightbox when I mouse-over the image, left-right navigation comes with it .. and disappears on mouse out. can we make it static.. like when the lightbox is opened the...

WooCommerce - Checking for brand page

php,wordpress,wordpress-plugin,woocommerce
I'm using WooCommerce on our site along with their Brands add-on to be able to group products together by brand - I know WooCommerce has it's own built in selection of hooks and filters but I want to write a function that checks if I'm on a Brand page or...

Add New Input Field in Wordpress Post Entry

wordpress,wordpress-plugin
I am hoping someone can help with this. I am a Wordpress newbie, and I have heard about how great Wordpress nowadays. I have a quick question, how do I add or modify the Post form entry so that I can add more input fields like drop down, checkboxes, or...

Wordpress page can't continue due to this error

php,css,wordpress,wordpress-plugin,wordpress-theming
I just faced this problem recently, I don't what causes it . But I need help fixing it. The error are : http://www.udesign.my/aaf4/wp-admin/admin-ajax.php?action=woocommerce_checkout Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://fonts.googleapis.com/css?family=century+gothic+:300,400 Failed to load resource: the server responded with a status of...

How to display Posts in wordpress page using mysql query?

php,mysql,wordpress,wordpress-plugin
I want to display Posts details in WordPress page. I have added MySQL query in WordPress page(All Pages -> Add New Page --> Added the Code). I am using INSERT PHP WordPress plugin for that.. Still it displays the error.. How to do this..? The Code which I have used...

Wordpress Custom Post Type Search

wordpress,wordpress-plugin,wordpress-theming,custom-post-type,wordpress-theme-customize
I have a WP installation with a menu/restaurant theme that adds a custom post type for "food". "food" has a title and an excerpt field it doesn't have the regular "content" field. It seems that the default WP search facility will search in the title and the content fields but...

How can I add the custom text fields under own plugin of WordPress?

wordpress,wordpress-plugin,wordpress-plugin-dev
I am creating a plugin I want a functionality of the text fields in admin panel options of the plugin in which I want to set the API key and URL and other things. So how can I add the three text fields in custom plugin?

Youtube Channel Gallery getting no longer supported video from YouTube

wordpress,youtube,wordpress-plugin
Suddenly the feed on our homepage has the - This device is no longer supported - video from YouTube. Everyone is seeing this no matter what device they are on, so we think it doesn't like something about the plugin now after YouTube changed and knew they would not be...

Render wp_editor input in theme file using get_post_meta

php,wordpress,wordpress-plugin
I have a meta box with wp_editor other than the main content editor. public function add_custom_meta_boxes() { add_meta_box( 'ux_page_header', __( 'Page Header', 'ux' ), array($this, 'ux_render_page_header'), 'page', 'normal', 'core' ); } public function ux_render_page_header() { $page_header = get_post_meta($_GET['post'], 'page_header' , true ) ; wp_editor( htmlspecialchars_decode($page_header), 'ux_page_header', $settings = array('textarea_name'=>'page_header') );...

Previous and Next Button for post on wordpress

css,post,pagination,wordpress-plugin,blogs
I am trying to figure out how I can change the typical pagination links (i.e Pages: 1 2 3) at the bottom of a WordPress post show up as "Previous" and "Next buttons instead. Just like: http://mediawtf.com/featured-posts/walk-on-water/...

Breadcrumb menu in wordpress

wordpress,menu,wordpress-plugin,breadcrumbs
I am stuck on how to create a breadcrumb menu in my wordpress so that when I select the main menu, the path shows its first inner menu. For example I have a main menu About us and Company Profile as its child. When I am select the About us,...

In woocommerce how to add Participant List on checkout page and show in order detail page

wordpress,wordpress-plugin,woocommerce,wordpress-theming,wordpress-loop
How to add list of participant in check out and show in order detail page. using function and wordpress action and filters

Woocommerce : Replace ' Product Categories ' by ' Short Description ' on Product Page

wordpress,wordpress-plugin,woocommerce,product
In the product page, each product has an image, and below two sub caption : the title and a link to the product categories. I'd like to replace this product categories field with the short description of the product. I had a look at every php file in the woocomerce...

Insert a row when create a user in wordpress

insert,wordpress-plugin,user-registration
I want to INSERT a row in a custom table when Admin will create an user from admin panel. I have written a function for this but it is not working. <?php add_action( 'user_register', 'myplugin_registration_save', 10, 1 ); function myplugin_registration_save( $user_id ) { global $wpdb; $user_info = get_userdata($user_id); $admin_id =...

How to use update and delete query in wordpress

php,mysql,wordpress,wordpress-plugin
First i write manually update, delete, insert and select query and execute data with mysql_query function Like this: Select query $prefix = $wpdb->prefix; $postSql = "SELECT DISTINCT post_id FROM " . $prefix . "postmeta As meta Inner Join " . $prefix . "posts As post On post.ID = meta.post_id Where...

WordPress Widget creation helper

wordpress,wordpress-plugin,wordpress-theming
Is there any helper for creating WordPress widgets? I fount this https://github.com/sksmatt/WordPress-Widgets-Helper-Class but it have not been updated 3 years. Is there any good solution?...

Wordpress - next_post_link() not filtering by post_type showing nothing

php,wordpress,wordpress-plugin,wordpress-theming
I'm trying to add previous and next links to my portfolio posts. I have various custom posts, but I only want to link to my portfolio custom posts. I have been looking in the documentation and have tried using this in the wordpress loop <?php next_post_link('%link', 'Next post in category',...