spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » WORDPRESS » Page 1
functions.php cause white-screen and media-library issues
Try removing the PHP-ending tag ?> from the file functions.php. It is unneccessary and I've encountered situations where whitespace / line breaks that come after "?>"-tag cause WordPress to throw a blank screen, because headers are sent too early / multiple times (Headers already sent).

Categories : Wordpress

Why can't Googlebot crawl this robots.txt?
sorry i dont have permission to comment , so maybe sounds silly but you can check in admin panel go to settings --> reading --> and Search Engine Visibility got to be unchecked also in your frontend press ctrl+u and look for a meta <meta name="robots" content="noindex"> maybe a plugin is setting the meta robots,

Categories : Wordpress

Unable to clone repository of bitbucket for Wordpress development
The tutorial Atlasian (company that makes bitbucket) provides for ssh is pretty good, I'd suggest you follow their steps. https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git

Categories : Wordpress

Error 400 when open tag in wordpress
Please refer below : http://stackoverflow.com/questions/17963784/how-to-open-url-having-arabic-text-using-php-file-get-contents-function http://stackoverflow.com/questions/2742852/unicode-characters-in-urls Above will help you to convert your arabic URL to browser friendly..

Categories : Wordpress

Completely changing custom post type through child theme
In my personal opinion, the best route here would be to simply register a new post type. If you change the custom post type name, you have to change every instance where that name is used to the new name, and what if there are functions in the parent theme that can't be overwritten or are not filterable. Remember, custom post types should be in plugin, not in a theme. Here is my idea. Do the fol

Categories : Wordpress

Wordpress pagination on homepage not working
Place this code in functions.php and try., Replace the post type and posts_per_page as you need.. function alter_query_vars($query) { switch($query->query_vars['post_type']) { case 'post': //if($query->is_category()) Use this if you want to pagination on category page $query->query_vars['posts_per_page'] = 6; break;

Categories : Wordpress

How can I use a tool such as Live HTTP Headers or Firebug to diagnose a 404 error in my header?
Your issues are not html related, html is "client" side and php is server side so php finishes running on your server sends the information to your browser and then it will find the resources required (the urls) do_action is a php wordpress hook, it basically means do all actions hooked here... What the other answers are saying that if a page is not found, it will redirect to another page and he

Categories : Wordpress

How to make online store for a specific of time?
Many solutions, you can disable gateways so customer can't buy (and then change the default message) add_filter( 'woocommerce_payment_gateways', 'disable_gateway_time', 99, 1 ); function custom_gateway( $gateways ){ $current_time = date('H'); // If ok return $gateways if ( ( $current_time > 9 && $current_time < 12 ) || ( $current_time > 16 && $current_time

Categories : Wordpress

WooCommerce Force SSL Creates 404
I'm not sure whether this is something that is going to benefit others, but if you're on shared hosting, testing on a subdomain is a bad idea. Rather test on "www.yourdomain.com/testing/", as opposed to "testing.yourdomain.com". Don't ask me why, the nerdy reasons I will leave to the back-end guys who answer my questions with grammatically unintelligible questions and down-votes. You can have cu

Categories : Wordpress

How to prepare all urls for a transfer from: Domain/ftpfolder/page to domain2/page?
Use "Search and Replace Script" as advised by the WordPress Codex. Use to replace 1 with 2: domain.com/ftpfolder/page domain2.com/page Oh, did I tell you to do a backup first?

Categories : Wordpress

Classified Nested Category->Sub Category->Post View for Wordpress
This is done via custom post types and custom taxonomies. For example, you could create a custom post type rom, and assign the custom taxonomy roms with child categories Android ROMs -> Asus ROMs. This child category is assigned to the custom post type.

Categories : Wordpress

WooCommerce - Making a checkout field required
You should try to had something like that : add_action('woocommerce_checkout_process', 'my_custom_checkout_field_process'); function my_custom_checkout_field_process() { // You can make your own control here if ( ! $_POST[ 'e_deliverydate' ] ) wc_add_notice( __( 'Please select a delivery date' ), 'error' ); } For the email, the easiest is to save the meta value ( I think it's a

Categories : Wordpress

WP - Display latest posts in different boxes
if i understand your question you just need include counter and class in your wp_query, becouse easyer make that "format" what you want.. i'll post here one sample: <?php // The Query $query = new WP_Query(array( 'post_type' => 'post', 'cat' => 1 )); query_posts( $args ); $i= 1; // The Loop while ( $query->have_posts() ) : $query->the_post(); ?> <div class="sum

Categories : Wordpress

define ('Disallow_File_Edit', true ) is not working in WordPress 4.0
Notice that WordPress uses the DISALLOW_FILE_EDIT constant and not the Disallow_File_Edit constant. You should therefore use: define ('DISALLOW_FILE_EDIT', true ); Another option would be to allow the case-insensitive definition by using the third parameter of the defined() PHP function: define ('Disallow_File_Edit', true, true );

Categories : Wordpress

Customizing Wordpress Pagination Permalinks
default query: <?php $args = array( 'base' => '%_%', 'format' => '?page=%#%', 'total' => 1, 'current' => 0, 'show_all' => False, 'end_size' => 1, 'mid_size' => 2, 'prev_next' => True, 'prev_text' => __('« Previous'), 'next_text' => __('Next »'), 'type' => 'plain

Categories : Wordpress

High CPU usage in wordpress
Please check your site using below : https://developers.google.com/speed/pagespeed/insights/ Do and solve rules suggest by google as per above link use.

Categories : Wordpress

Wordpress price /kg /piece
You can add this on your functions.php // Filter on cart price add_filter( 'woocommerce_cart_product_price' , 'custom_price', 10, 2); // Filter on product page add_filter( 'woocommerce_get_price_html' , 'custom_price', 10, 2); function custom_price( $price, WC_Product $product ){ // You can store the unit as custom fields $unit = get_post_meta( $product->id, 'unit', true );

Categories : Wordpress

WordPress Pages are not showing in the pages section and it is not working
Add this code at top of your template-page <?php /* Template Name: My Custom Page */ ?> OR go->setting->reading->set front page->home page and blog page-->blog and save

Categories : Wordpress

Can't load WP admin panel and can't figure out why..?
Most likely if you have changed any files for your theme this can cause the dashboard and site to go down and not load, you may need to restore the default files for your theme you can do so by going to the public_html folder thru cpanel of your host and upload the theme files back again.

Categories : Wordpress

Some WordPress page links redirectinf to home page
You have a problem with the form that does the redirect on that button. See below <form method="link" action=" http://tazara.mwanawanga.com/?page_id=389"> <input type="submit" value="View fare charts and train timetables"> </form> If you can see, theres a space in the action field of the form which will error the form's action and go to the root. Try changing it for this:

Categories : Wordpress

Wordpress Fatal error after update 4.0?
As the error points out, get_category_id() isn't a valid WordPress function. You'll need to use get_cat_ID() instead. The only way this could have worked before is if that custom function was defined in functions.php or a plugin that was updated.

Categories : Wordpress

How to redirect user after success login to admin dashboard in multisite of wordpress
This can be used for wordpress multisite. It will direct user roles and redirect to specific page. function login_redirect_page( $redirect_to, $request, $user ) { global $user; if ( isset( $user->roles ) && is_array( $user->roles ) ) { if ( in_array( 'administrator', $user->roles ) ) { return get_site_url().'/wp-admin/'; } else {

Categories : Wordpress

Getting posts by guid
If you inside invalid argument/value, get_post will return first post data. get_post only accept $post_id. http://codex.wordpress.org/Function_Reference/get_post $post = get_post(7); $title = $post->post_title; If you want to specific filtering post, you can use get_posts. http://codex.wordpress.org/Template_Tags/get_posts Example: $args = array( 'posts_per_page' => 1, 'categ

Categories : Wordpress

Woocommerce: Can I share category properties across products?
This is what Attributes are used for. Once you have your Attributes setup when you go into a product you can add the attribute that you are looking. This video should help https://www.youtube.com/watch?v=7PX8MWBOAeo

Categories : Wordpress

WordPress FaceBook Plugin Error
It is an error in the code .. it is no longer supported by Facebook .. but it will only tell you how to create the object(Article) and the action(publish) Which can be done in very easy steps: Go to your facebook developer page; Select Open Graph from the left sidebar; go to the Object Type Tab and press add new .. and write article on the pop-up then go to action types, press add new and wri

Categories : Wordpress

Wordpress URL rewrite with GET variables
Add both the code snippets to functions.php 1.We are telling WordPress that /party/nameoftheparty/4/ should be internally mapped to /party/?title=nameoftheparty&id=4 add_action( 'init', 'so27053217_init' ); function so27053217_init() { add_rewrite_rule( '^party/([^/]*)/([^/]*)/?', 'index.php?pagename=party&title=$matches[1]&id=$matches[2]', 'top' ); }

Categories : Wordpress

hotlinking prevention via htacess doesn't work
Your current rewrite configuration allows anyone to directly access your image by typing its URL in their address bar and the HTTP_REFERER header will not be set, making your first condition fail. # Check other conditions and rewrite rule only if %{HTTP_REFERER} is NOT empty RewriteCond %{HTTP_REFERER} !^$ Your conditions are implicitly AND unless you use the [OR] flag. When the first conditio

Categories : Wordpress

Add a New Site to WordPress Multisites Network
Okay, i did this kind of things before. here are the tips to follow you debug: before we start, We assume your multisite network is setup successfully. setting up adding new site 1.Go to login main site wp-admin, which will lead you to network wp-admin then you can create new site by the build in wizard. 2.by creating a new site, it also auto create a set of cloned tables in your multisite

Categories : Wordpress

PHP Error in wordpress
Your local and Wordpress versions of PHP are different. For your Wordpress version of PHP, your code should look like this: <img src="<?php $x=get_option('logo'); echo $x['logo'];?>" height="243" width="187">

Categories : Wordpress

How to create a pdf when add a post from admin panel in WordPress
Haven't seen anything on doing this from the admin panel but I have seen several plugins that allow you to create a PDF from the published content. The PDF & Print plugin is rated to work with the latest version of Wordpress 4.0 and has a fairly good feedback score. Url for the plugin is: https://wordpress.org/plugins/pdf-print/ Hope this helps.

Categories : Wordpress

Wordpress loop through posts and check if posts are in same category
My strategy would be to set a check array for the previous categories and then compare each time. So inside the loop you can do a check for the current categories e.g. //set a check array $previous_categories = array(); while ( $the_query->have_posts() ) { $the_query->the_post(); // get the categories for this post $current_categories = get_the_category(); // set up a t

Categories : Wordpress

How to fix comments template in wordpress?
Simply you need to put this code in comments.php page in you project check comment_form(); in that page & replace that code with this one comment_form( array( 'comment_notes_after' => ' ', ) );

Categories : Wordpress

How to remove part of a widget in WordPress?
More information is needed. Is the site hosted on WordPress or on your own self-hosted site? (Such as GoDaddy or 1and1). If it is the former, it is almost impossible to change plugins but if it's self hosted you should be able to edit the plugin that is creating the links.

Categories : Wordpress

How can i get price in woocommerce cart product title hook
try this : add_filter( 'woocommerce_cart_item_name', 'cart_product_title', 20, 3); function cart_product_title( $title, $values, $cart_item_key ) { return $title . ' - ' . $values[ 'line_total' ] . '€'; } I don't know your version of woocommerce but woocommerce_in_cart_product_title is depreciated, it's why I use woocommerce_cart_item_name, so you should try both ;)

Categories : Wordpress

wordpress Custom theme should supprot woocommerce
The code which you have mentioned is correct and it will also help you to declare WooCommerce support if you write the same in functions.php of the theme/child-theme of yours. Just in case you need to verify whether the theme supports WooCommerce after making these changes you can check the using the following approach. Theme without WooCommerce Support Theme after adding WooCommerce Support

Categories : Wordpress

A loop that shows all posts on the single post page
You can't just copy and paste the loop again and expect it to show you something different. You need to first do wp_reset_postdata(). You then need to write a new query, and do a new loop. For example: <?php // First Query ?> <?php wp_reset_postdata(); // reset the post data so we can run another query ?> <?php get_sidebar(); ?> <?php // The Second Query $the_query

Categories : Wordpress

Unable to fix garbage url
Find that particular link in your web files and replace it, that's it. You can use notepad++ or similar programs to search text in multiple files. My advice to you would be to not use nulled themes downloaded from random websites

Categories : Wordpress

Where to edit Wordpress widgets?
[cl_display_thumbnail_list] is a shortcode. Typically, shortcodes are defined in edited in a shortcodes.php or functions.php file, within a theme's root folder. However, it's also possible that a custom plugin is doing it. You'll want to have a basic understanding about the WordPress Shortcode API before changing anything.

Categories : Wordpress

How to add or use check box on SMOF in Wordpress
I just find out an way. I have used this code: <?php global $data; ?> <?php if($data['your_option_id']): ?> <......Something here.....> <?php endif; ?> The menubar code is like this <?php global $data; ?> <?php if($data['menu_primary_enable']): ?> <?php if (function_exists('wp_nav_menu')) { wp_nav_menu( array( 'theme_location' => 'menu-primary

Categories : Wordpress


Recently Add
Woocommerce cropping not working as it should?
functions.php cause white-screen and media-library issues
Why can't Googlebot crawl this robots.txt?
Unable to clone repository of bitbucket for Wordpress development
Error 400 when open tag in wordpress
Completely changing custom post type through child theme
Wordpress pagination on homepage not working
How can I use a tool such as Live HTTP Headers or Firebug to diagnose a 404 error in my header?
How to make online store for a specific of time?
WooCommerce Force SSL Creates 404
How to prepare all urls for a transfer from: Domain/ftpfolder/page to domain2/page?
Classified Nested Category->Sub Category->Post View for Wordpress
WooCommerce - Making a checkout field required
WP - Display latest posts in different boxes
define ('Disallow_File_Edit', true ) is not working in WordPress 4.0
Customizing Wordpress Pagination Permalinks
High CPU usage in wordpress
Wordpress price /kg /piece
WordPress Pages are not showing in the pages section and it is not working
Can't load WP admin panel and can't figure out why..?
Some WordPress page links redirectinf to home page
Wordpress Fatal error after update 4.0?
How to redirect user after success login to admin dashboard in multisite of wordpress
Getting posts by guid
Woocommerce: Can I share category properties across products?
WordPress FaceBook Plugin Error
Wordpress URL rewrite with GET variables
hotlinking prevention via htacess doesn't work
Add a New Site to WordPress Multisites Network
PHP Error in wordpress
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.