2018-10-22         Robert

Minimum characters in WordPress editor

Is it possible to set minimum characters in WordPress editor, meaning that publishing the article is not possible until the minimum is complied? Open up your functions.php file or wherever else you write custom PHP code and paste in the following:function display_short_error_message($messages){global $post;$content = $post->post_content;if (str_word_count($content) < 100 ) {$error_message = 'Post Should be at Least 100 Words';add_settings_error('post_short_error', '', $error_message, 'error');settings_errors( 'post_short_error' );$post->post_status = 'draft';wp_...

 wordpress                     1 answers                     88 view
 2018-10-22         Octavia

Search for attachment ID with URL (Case Sensetive)

I am trying to import products images and have their URLs in the sheet. Now there are 2 images with the same name but one have uppercase letters and other have lower case letters. For example, the image name is ABC.jpg and other image name is abc.jpg. When i run my query it is returning both the records.Here is my Query: $wpdb->get_results( $wpdb->prepare( "SELECT ID as post_id FROM $wpdb->posts WHERE post_type='attachment' AND guid='%s'", $product_img ));I looked in the forums and tried by using the collation but that is also returning me same res...

 wordpress                     1 answers                     17 view
 2018-10-22         Arlen

Delete qtranslateX plugin and code in wordpress

My website using q-translate plugin for wordpress multiple language website https://savvycomsoftware.com/ for (en / vi / ja) but now. They remove vi / ja and keep default language for this website. And SEO staffs want me to remove the code also this plugin from this website to improve seo than bad seo. How do i do? If you are not using the plugin q-translate then you can simply deactivate and Delete the plugin. Only if you are using defaul English language.For this:Just go to admin panel PLUGINS menu. Click All plugins, you will see the list of plugins installed into you...

 wordpress                     2 answers                     71 view
 2018-10-22         Kerr

WordPress rewrite rules not working

Based on the WordPress rewrite rules, I want to change my URLs to user-friendly permalinks.So I used WordPress tips in my functions.php but nothing happened!I don't know it seems it's because of my link.Here is my example page who should change the url:[My sample page][2]Here is my code in functions.php:function custom_rewrite_basic() { add_rewrite_rule('^music/([0-9]+)/?', 'index.php?page_id=$matches[1]&cmd=artist', 'top');}add_action('init', 'custom_rewrite_basic');Actually I want to change this url:page/?cmd=artistto /artistsor this url: page/?cmd=artist_detaile&am...

 wordpress                     1 answers                     39 view
 2018-10-22         Raymond

Do I need a VM instance for each WordPress instance on Google Cloud?

I've been playing with Google Cloud, trying to figure out the most cost-effective way to host multiple low-traffic WordPress websites. With Bitnami, it seems to me that for every new WordPress instance, I'm having to provision a new virtual machine. I also tried Google click-to-deploy WordPress setup, and it forced me to provision a cluster with 3 VM's.Each of the new VM's cost money, so I'm wondering if there's a way to do something similar to shared Linux hosting, where I could host multiple WordPress instances on a single Virtual Machine. In you don't want to use the...

 wordpress                     4 answers                     64 view
 2018-10-22         Denise

wordpress website doesnt load properly on intranet

I have designed a wordpress website in xampp and it looks all good in localhost.But when I access the website from other pc via intranet/lan it looks all messed up and developer tools in chrome says following: "net::ERR_CONNECTION_REFUSED".How is this resolved? What URL you are using to access website on Intranet/LAN?You may need to update URL's (e.g. siteurl) in your database to make it accessible on network. [XXX]This is more of an alternative answer but have you tried using Local by Flywheel? It allows you to create a local environment for Wordpress but also allo...

 wordpress                     2 answers                     54 view
 2018-10-22         Dale

Can I generate a SSL certificate with only WordPress admin account?

I want to setup SSL for a client but all they have is a WordPress admin account. No domain account/email, no hosting account, no cPanel account and no FTP/SSH access. Is it possible? It's on a shared host and the original guy charge a lot.I'm planning to use Let's Encrypt. It is not possible to add an SSL with "only" WordPress access. However, you may have more access than you have told us. For example, if you have access to your site's DNS, you could run your DNS through CloudFlare or a similar service and get an SSL solution there. [XXX]

 wordpress                     1 answers                     7 view
 2018-10-22         Ira

Swapping Joomla Over To Wordpress

I'm currently attempting to swap a client's website over from Joomla to WordPress and I'm having some difficulties. When I install WordPress, everything works fine except it becomes a second website.The Joomla website (i.e. the original website and URL) stays the same but the URL with the /wp-admin appended becomes a separate website. I need to replace all Joomla files on the original website with WordPress files without creating a second website. I've tried removing all files in the public_html directory entirely and replacing them with WordPress files but nothing works, I...

 wordpress                     1 answers                     76 view
 2018-10-22         Tina

Override Plugin function

I am using the WP Jobs Plugin with the add-on WP Jobs Application Deadline and there is a function that I need to change: public function display_the_deadline() { global $post; $deadline = get_post_meta( $post->ID, '_application_deadline', true ); $expiring = false; $expired = false; $date_str = null; if ( $deadline ) { $expiring_days = apply_filters( 'job_manager_application_deadline_expiring_days', 2 ); $expiring = ( floor( ( current_time( 'timestamp' ) - strtotime( $deadline ) ) / ( 60 * 60 * 24 ) ) >= -$expiring_days ); ...

 wordpress                     1 answers                     91 view
 2018-10-22         Fitch

Free Like&Dislike Wordpress Plugin

i search a free like & dislike wordpress plugin (for post,comment,page...), that give a possibility to copy and paste a shortcode of plugin and place it any where in ours comments or pages ..... (FREE PLUGIN)thanks you Try this : Plugin I found : LINKShortcode :[vd_likes id='POST_ID']This is for page or post. Replace POST_ID and add post/page id. [XXX]You can also try WTI Like Post with much more downloads and options. [XXX]

 wordpress                     2 answers                     93 view
 2018-10-22         Sheila

Fix Wordpress 301 redirect to post with slash

I have a blog post up at https://www.mysite.com/blog/mypost/ which loads fine.However, https://www.mysite.com/blog/mypost redirects to a post on a different domain https://mysite.azurewebsites.net/mypost/I have nginx setup as a reverse proxy to load mysite.com/blog from mysite.azurewebsites.net. I think that the redirect is being caused by Wordpress and I'm not sure how to fix it. The redirect is happening in wp-includes/canonical.php. It's looking at the HOST header. I setup nginx to reverse proxy to mysite.azurewebsites.net, but the correct solution was to setup a cust...

 wordpress                     1 answers                     36 view
 2018-10-22         Joyce

Azure Administration screen wordpress

Initially while creating website in azure i opted for Wordpress option and successfully done the job. After doing few changes of alignment and removing unnecessary things i log out from word press from my site.But now i m not getting any way for login in back to my Administration Screen of Wordpress over my site. Sounds like more of a WordPress issue than an Azure issue. In any case: try visiting yoursite.azurewebsites.net/wp-login.php. [XXX]

 wordpress                     1 answers                     100 view
 2018-10-22         Frank

How to remove 'index.php' from permalinks [WordPress on Composer]

I have local server, on which I'm running WordPress with Composer.After database migration from my local to AWS RDS, the permalinks changed it's behaviour: now there's 'index.php' in the beginning of tags, like: http://example.com/index.php/name-of-pageAlso, in the wp-admin->Settings->Permalinks the structure is custom now: /index.php/%year%/%monthnum%/%day%/%postname%/Details about my local server:Xubuntu 18Apache2AllowOverride All for both / and var/www/it's on Composer, with custom dir (wp-content is seperated from wp core).htaccess:# BEGIN WordPress<IfModule mod_re...

 wordpress                     1 answers                     45 view
 2018-10-22         Eartha

wordpress - how to get current term in functions.php

I want to get current term in functions. but apparently this function does not work in functions.php. Is there an idea to solve this problem?$term = get_term_by('name', get_query_var('download_tag'), 'download_tag' ); Simple function to get the current term, you can write the code in functions.php file<?php/** * getCurrentTerm * get the current term which archive is being displayed * good for categories, tags and custom taxonomies * @author Ohad Raz * @return current term object or false is not in a term archive. */function getCurrentTerm(){ if (!is_category() &am...

 wordpress                     1 answers                     16 view
 2018-10-22         Judy

Remove product dimensions from single product pages in Woocommerce

Anyone knows how to hide the product dimensions from the additional tabs on Single Product page but still show the Weight value?I search and see this filter but it hides both weight and dimensions.add_filter( 'woocommerce_product_get_dimensions', '__return_false' ); To hide only dimensions (but not weight), there is 2 ways to make it work.1) using hooks (here composite filter hooks):Looking at the template that displays dimension in single products, you can see this line:<?php if ( $display_dimensions && $product->has_dimensions() ) : ?>Then if you look ...

 wordpress                     2 answers                     43 view
 2018-10-22         Gloria

Call wordpress plugin methods from functions file

I'm looking to utilize the woocommerce paypal pro plugin in some rest API calls, in my theme's functions.php file. The goal would be to get the constructed html form in one call, and process payment with another. I still have not quite wrapped my head around how to interact with the plugins classes. Is there a simple explanation or an example of this sort of pattern (for any similar plugin setup) that can be used? Now that I'm a bit more awake...It's as simple as interacting with the plugin methods as normal PHP class:$ppp = new WC_PP_PRO_Gateway();$html = $ppp->paym...

 wordpress                     1 answers                     43 view

Page 1 of 512  |  Show More Pages:  Top Prev Next Last