w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » WORDPRESS » Page 1
WordPress plugin localization, load_plugin_textdomain doesn't work
There are many possible causes: .mo file not readable or not found at all (.po file is not used by WordPress by the way) The string you are expecting is not translated yet Wrong .mo file name, valid names are ar.mo, fr_FR.mo..., invalid ones are br_BR.mo, arabic.po, AR.mo, ar_AR.mo... So make sure you get this one right. for plugins the name will be the concatenation for the text domain, a dash

Categories : Wordpress

want to alter titles on wordpress widgets areas
You need to return the content you want to be assigned to the sidebar property. You're assigning the variable, but not returning it: function tadpole_before_title() { $content = '<p>helllo</p>'; return $content; } function tadpole_after_title() { $content = '<p>goodbye</p>'; return $content; }

Categories : Wordpress

Redirect ALL pages of site to page if using old IE browser - htaccess
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_USER_AGENT} "MSIE [6-7]" [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /wp-content/themes/twentyfourteen/browser-redirect/index.html [R=301,L] RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Rewr

Categories : Wordpress

Wordpress new created sub category page redirects to 404 page
         If you Change permalink on site then must update all category with new permalink then you are able to display category and work properly on site. otherwise you go with existing permalink on site and add new category or sub category.

Categories : Wordpress

WordPress Network install error
Follow the steps in this order 1) Reset your wp-config.php file back to its original state, remove any MULTISITE references 2) Delete the .htaccess file or move it temporarily 3) Drop the following tables from your DB, use a tool like phpMyAdmin if you are not comfortable directly modifying table data wp_blogs wp_blog_versions wp_registration_log wp_site wp_sitemeta wp_signups wp_sitecategori

Categories : Wordpress

Livereload not working in gulp.js with AMPPS and WordPress
gulp-livereload is a wrapper around the tiny-lr package so you don't need to use them both. It uses the same port you're using by default so, accordingly to its documentation page, you can get rid of tiny-lr completely and change your watch step to something like this: gulp.task('watch', function() { livereload.listen(); gulp.watch('build/**', ['less']); });

Categories : Wordpress

Google Calendar API Credentials for WordPress Plugin
If the data is not public, the users will have to authenticate with Google and enter the access code on your plugin configuration. Google Analytics for WP does this, check its source. I don't see the problem with having the users authenticating, but one alternative is to add support for service account, like the Google Drive WP Media does. In this case users of your plugin will enter the service

Categories : Wordpress

Wordpress website Spam/Hacked, Mailout.php
Propably your website was infected by injecting malicious code. On your server you need find weird files like xyz.php folder with different name than wordpress files and folders. The best will be change script for send emails and use smtp options not sending by php. When you need more help I can check that for you but without see problem I can only recommend searching the files at an angle of stra

Categories : Wordpress

Wordpress add rewrite URL look like WPML
Do you forgot question sign? add_rewrite_rule('^([^/]*)/?/([^/]*)/?', 'index.php?theme_var=$matches[0]&pagename=$matches[1]', 'top'); Between index.php and theme_var

Categories : Wordpress

How to use filter to dynamic shortcodes?
The following should get the job done function demo1_init() { // Shortcode Def. here... return "demo1"; } function demo2_init() { // Shortcode Def. here... return "demo2"; } function register_shortcodes() { $shortcodes = array( "demo1" => "demo1_init", "demo2" => "demo2_init", ); foreach($shortcodes as $shortcode => $func) {

Categories : Wordpress

WordPress > htaccess > redirect directory and all its sub-directories to one directory
You can put this rule in your htaccess (before Wordpress' main rule, after RewriteEngine On line) RewriteRule ^old(/.*)?$ /new [R=301,L] Note: you may have to clear your browser cache since your old rule is stored into it

Categories : Wordpress

WordPress with custom rewrite rules in .htaccess throws a 404 error
You should use WordPress Rewrite API function add_rewrite_rule() Example add_rewrite_rule('^highlights-this-week.html$','index.php?highlights-this-week=1','top'); You would add it to a plugin or to a theme functions.php file.

Categories : Wordpress

How to remove keyboard shortcuts in tinyMCE 4?
Here's an elegant solution (original answer here), just add this to your functions.php file: <?php add_action( 'wp_tiny_mce_init', function () { ?> <script> function wp_disable_shortcuts_tiny_mce_init(editor) { editor.on('init', function () { this.addShortcut('alt+ctrl+f', '', function () {}); //altgr is alt+ctrl this

Categories : Wordpress

Is there a way to mock a class and use regular class construction?
When passed an array as the second argument to Mockery::mock, it's expecting constructor arguments, not the methods to be mocked. Instead, you need: $mock = Mockery::mock('WP_Query'); $mock->shouldReceive('have_posts')->andReturn(true);

Categories : Wordpress

Selection of all post ids in wordpress to customise in css
If you view the HTML source of your pages, you'll find that what you're trying to blank out will be wrapped with <div> tags. Inside the div will be a class declaration. Something like <div class = "entry-content"> . The class can be selected with the CSS class selector, "." . So in my example, taken from the 2012 theme, the CSS would be: .entry-content {display:none;} Note this is proba

Categories : Wordpress

Wordpress Attachment Page Title
Here is the base code you can use in the page template: <?php $attachment_id = 1; // ID of attachment $attachment_page = get_attachment_link( $attachment_id ); ?> <a href="<?php echo $attachment_page; ?>">Download Link**</a> Reference: http://codex.wordpress.org/Function_Reference/get_attachment_link Note: If you want to modify the attachment page, you can ei

Categories : Wordpress

how to add page name in url of wordpress
You're asking about what WordPress refers to as Pretty Permalinks. Please see the link above, but in a nutshell... Requirements: Apache web server with the mod_rewrite module installed In WordPress's home directory: The FollowSymLinks option enabled FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All) An .htaccess file (if this file is missing, WordPress will try t

Categories : Wordpress

Wordpress does not allowing to add menu items more than 80
Set max_input_vars 1000 in .htaccess file and follow this link http://wordpress.stackexchange.com/questions/96587/menu-items-disappearing/96593#96593

Categories : Wordpress

wordpress $wpdb->getresults with SELECT .. WHERE .. IN
Your code is absolutely working fine for me nevertheless you can refer this alternative global $wpdb; $special_entries = array( 'inherit', 'auto-draft', 'unanswered' ); $how_many = count($special_entries); $placeholders = array_fill(0, $how_many, '%s'); $format = implode(', ', $placeholders); $query = "SELECT * FROM $wpdb->posts WHERE post_status IN($format)"; $results = $wpdb->get_resu

Categories : Wordpress

RGFormsModel Questions Gravity Forms
the RGFormsModel class (deprecated in favor of GFFormsModel) is a simple class wrapper that contains a variety of functions used to interact with the forms. This class is in the process of being mostly gutted in favor of the GFAPI class which has a host of helpful functions when working with Gravity Forms. Here is an example where I'm getting the form data where all the form and field settings ar

Categories : Wordpress

Difficulty updating Wordpress from 3.9.1 to 4.0
You need to check your file/folder permissions. Your webhost may have them set too strictly for WordPress to write its own temp folders and extract its own archive in /wp-content/upgrade/. See Changing File Permissions « WordPress Codex: Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should

Categories : Wordpress

Subdomain throwing error 404 to few customers.
It looks like your blog host has both IPv4 and IPv6 addresses: blog.mouryadandu.com. 3600 IN CNAME cpanel17.fozzy.com. cpanel17.fozzy.com. 14400 IN A 78.140.140.207 cpanel17.fozzy.com. 14400 IN AAAA 2a00:1178:1:43:4::11 When accessing via the 78.140.140.207 address (IPv4), I see your blog just fine. When accessing it via the 2a00:1178:1:43:4::11 addre

Categories : Wordpress

Wordpress functions in Laravel
1. Add WordPress to app/vendor Download WordPress into the vendor folder (./vendor/wordpress) User require in composer.json, see (3). 2. Find the function location Check the Codex page for the function you need, let's say esc_url(), as you can see in that page, the function resides in wp-includes/formatting.php 3. Include the file containg the function Include that file, use your composer.js

Categories : Wordpress

How can I keep Wordpress from stripping out my

and
tags?

If you add a meaningless data attribute to the <p> and <br> tags, they will continue to show. Example When switching from text to visual editor and back, the following text <p>Some paragraph text <br> and a second line.</p> becomes Some paragraph text and a second line. However, <p data-x>Some paragraph text <br data-x> and a second line.</p>

Categories : Wordpress

How to filter atts for every shortcode in WordPress
I'm not sure what you're trying to do exactly, but you can catch any attribute and modify (or unset) the corresponding output with something like the following: foreach( array_keys( $GLOBALS['shortcode_tags'] ) as $tag ) { add_filter( "shortcode_atts_{$tag}", "so26932914_shortcode_atts", 25, 3 ); } function so26932914_shortcode_atts( $out, $pairs, $atts ) { if( isset( $atts['foo'] ) &

Categories : Wordpress

Git: problems creating a repository
This is the section that's causing it: #===================================# # WP Core, except content # #===================================# /* !.gitignore !wp-content/ # !media/ !favicon.ico !favicon.png !robots.txt !humans.txt Notice the leading /*. This means that it's ignoring EVERYTHING by default. From the documentation: A leading slash matches the beginning of the pathnam

Categories : Wordpress

Wordpress: Find which plugin is being updated
After spending some good amount of time, I got my answer add_filter('upgrader_post_install','myFunction', 5, 3); with 3 parameters for myFunction gives updating file details from where we can get version myFunction($t1,$t2,$t3){ //$t2 & $t3 gives info about files being updated }

Categories : Wordpress

Product images distorted/too large in WooCommerce
One of the first things you need to know about image dimensions in WooCommerce is that many themes (and the default WooCommerce CSS) specify product image widths to ensure consistent layouts across multiple devices. The dimensions you specify on the Products tab of the WooCommerce settings screen affect the size of the thumbnails that the theme uses when displaying product images. They do not cha

Categories : Wordpress

BreadCrumb URL in Wordpress VertiMagazine Theme
You can certainly Implement Breadcrumbs to your blog by using WordPress SEO by Yoast plugin and bit of php code . Visit the following link for more detail -> https://managewp.com/breadcrumbs-wordpress-seo-by-yoast

Categories : Wordpress

CSSO Gulp and WordPress Comments
The csso documentation page says that it will remove the comments,because they do not affect rendering, but: If you want to save the comment, CSSO can do it with only one first comment in case it starts with !. So I don't think you can preserve a comment with the wordpress metadata format. Why don't you apply gulp-csso first and then add the metadata as a prefix using gulp-header?

Categories : Wordpress

WordPress custom post type archive with description
read up on creating post types there is a option for has archive, set it to no, it wont create the standard urls for list view etc. You can modify archive.php to include all post types as well. I think you are confused about the way wordpress custom post types exist on your server. Basically they only exist in php code, so everytime the wp system loads, your custom code runs to create the custom

Categories : Wordpress

Can't display values in my page ......ACF
The problem is solved by making a frontpage .php ,in which you include all the index .php code.Then in settings you set front page the home page you've made and posts page the blank blog page. And so simple you can fix the problem.Here is the frontpage.php i made and i solved my problem. <?php /** * Template Name: front-page.php Template */ get_header(); ?> <?php $args = array( 'post

Categories : Wordpress

wooCommerce call function in checkout page
woocommerce_after_checkout_shipping_form might be more appropriate for displaying something after the shipping address. Either way, the only variable that is passed to the woocommerce_after_checkout_shipping_form hook is the $checkout variable. You can var_dump that variable to see what it is available. add_action( 'woocommerce_after_checkout_shipping_form', 'wc_checkout_description_so_1' ); func

Categories : Wordpress

301 redirect a Trailing Slash in .htaccess
In this case you must have to access via FTP client like FileZilla or login to your hosting cPanel. You can try the following code : ** ROptions +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] ** Reference: http://kb.mediatemple.net/questions/85/Using+.htaccess+rewrite+rules#gs

Categories : Wordpress

Wordpress - Setting a default 'featured image' for each Catergory
You could create a new template for each category, and do a WP_Query that assigns the category. Then within the loop, you can say if have featured image, show, otherwise show my image. If that makes sense. If not, i'll try post an example soon. I'm on the fly atm :P

Categories : Wordpress

Grunt browser-sync not watching php file changes in Wordpress
For anyone fairly new to this as I am and wanted to know what i did: browserSync: { dev: { options: { proxy: "localhost:8888", files: ['style.css', 'js/**/*.js', '**/*.php'], watchTask: true, } } } Stating the port explicitly as per my quesiton example meant the browser sync wouldn't go to its defa

Categories : Wordpress

Wordpress perma links
Since you know the page ID, you can simply use get_permalink(): $location = get_permalink( 21 ); EDIT: It looks like you don't actually know the ID...In that case, if you know the title, you can use: $location = get_permalink( get_page_by_title( 'Your Page Title' ) ); However, if you're using wp_insert_post() to create the post in the first place, that function returns the page ID of the add

Categories : Wordpress

Plugin Development - wp insert post not working
You forgot to declare your $post_id variable. Use the following: $post_id = wp_insert_post( $new_post, true ); This will return the post ID on success or a WP error on failure. Use print_r( $post_id ) to check the result.

Categories : Wordpress

Enable or Disable Paypal Sandbox (Wordpress)
According to the Woocommerce site: You can enable PayPal Sandbox as a testing area during the development of your store. With sandbox enabled no payments will be taken. (emphases added) If the website is going live and you are finished testing then yes turn off the sandbox or you won't get any payments for anything ordered.

Categories : Wordpress




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.