Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels


Channel Catalog

Channel Description:

WordPress › Support

older | 1 | .... | 393 | 394 | (Page 395) | 396 | 397 | .... | 413 | newer

    0 0


    Could you please help me to understand - how I can change list of available translations on the plugin page in the repository?

    I have published plugin , in the /lang/ sub directory it contatins .po and .mo files for Russian and German translation.

    However translations list in the right column on the page contains only Russian translation, while German translation not appeared.

    0 0

    Hello, I have this plugin, that allows me to echo what python prints

    <?php # -*- coding: utf-8 -*-
    /* Plugin Name: test */
    header('Content-Type: text/html; charset=cp1252');
    add_shortcode( 'test', 'execute_python_with_argv' );
    function execute_python_with_argv(){
    $description = array (
        0 => array("pipe", "r"),  // stdin
        1 => array("pipe", "w"),  // stdout
    $application_system = "python ";
    $application_path .= plugin_dir_path( __FILE__ );
    $application_name .= "";
    $separator = " ";
    $application = $application_system.$application_path.$application_name.$separator;
    $pipes = array();
    $proc = proc_open ( $application , $description , $pipes );
    if (is_resource ( $proc ))
        $var= stream_get_contents ($pipes [1] ); //Reading stdout buffer
    echo "<br>".$var."<br/>";
    $output = ob_get_clean();
        return $output;

    So the question is, if python prints 123(each number in the different line) why is this plugin printing in same line? How do I make it to print to separate line? Thank you.

    0 0

    All I want to do is query the user list (with custom params defined by on-screen options), then add "Next" and "Prev" links to the bottom, just like with posts.

    After a huge amount of searching, the best I can find is this ridiculously complex and unwieldy setup requiring two queries and a whole ton of manual manipulation:

    Is there really no simpler way to paginate a custom user list?

    0 0

    I use the module for calculating delivery by local carrier,but the module do not calculate shipping costs to the total.
    In the "wp-content / plugins / woocommerce / templates / order / order-details.php" I added the following code to take the amount of shipping and subtotal:

    '<? php $ a = array (
    get_post_meta ($ order_id, 'Order_subtotal', true),
    get_post_meta ($ order_id, 'Econt_Customer_Shipping_Cost', true));
    <tr class = "total-cost">
    <th> <? php _e ( 'Total:', 'woocommerce'); ?> </ Th>
    <Td> <? php echo array_sum ($ a); ?> <? php echo get_woocommerce_currency_symbol (); ?> </ td>
    </ tr>'

    As a result, I get only the value of "Econt_Customer_Shipping_Cost", but not from "Order_subtotal" to get the total.
    Please if someone can tell me what to use to get a subtotal.

    0 0


    For my shop I need to have all items in one category (KMC Product) to not have an Add To Cart Button when I am logged in. Below is the code I used to do that:

    function kmc_buy_buttons(){
    $current_user = wp_get_current_user();
         * @example Safe usage: $current_user = wp_get_current_user();
         * if ( !($current_user instanceof WP_User) )
         *     return;
       $product = get_product();
       if ($current_user->ID >= 3){
       if ( has_term('kmc-product', 'product_cat') ){
           // removing the purchase buttons
           remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
           remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
           remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
           remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
           remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
           remove_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
    add_action( 'wp', 'kmc_buy_buttons' );

    However, there is one item in the shop loop that is in the KEO Product category. It appears in that loop because the page lists all Dovetail HSS products, which that item is a part of. The item also doesn't have an Add to Cart button, though it should.

    0 0


    I am trying to integrate a wordpress menu into magento and am wanting to save a text file with the relevant menu information every time the menu is saved so that my magento function can just access this text file to get the menu items html rather than make a database call every time.

    Is this possible and is this a good solution?

    I am using the magento wordpress integration plugin (what was the james kemp one) NOT fishpig one in order that I can then use wordpress properly so it is not possible to use the fishpig approach where I can access the wordpress menu easily in magento.

    Many Thanks,


    0 0

    I use MySQL as Database Management System , But it doesn't have foreign-key support by default configurations in WordPress.
    So My question is in case of parent-child relationship what is the best solution when we want to delete parent records?

    0 0

    Hello, I am just studying the core of wordpress and I struggled with this conditional check which is mentioned in wp-admin/includes/upgrade.php:

    if ($oldfile == 'index.php') {
        $index = implode('', file("$oldpath/$oldfile"));
        if (strpos($index, 'WP_USE_THEMES') !== false) {
            if (! @copy(WP_CONTENT_DIR . '/themes/' . WP_DEFAULT_THEME . '/index.php', "$site_dir/$newfile"))
                return false;
    	// Don't copy anything.

    What is the purpose of this check "if (strpos($index, 'WP_USE_THEMES') !== false)"

    0 0


    this part of code I added to index.php page

    <h1 class="pagestitle"><?php echo(get_category_parents($cat, TRUE, ' ')); ?> české návody</h1>
    <div id="vypis">
    if (is_category()) {
    $this_category = get_category($cat);
    $this_category = wp_list_categories('orderby=id&show_count=0
    "&echo=0"); else
    $this_category = wp_list_categories('orderby=id&depth=1&show_count=0
    if ($this_category) { ?>

      <?php echo $this_category; ?>

    <?php } ?>

    in order ho have fine H1 and list at category page f.e. here

    But it causes problem in search here:

    Is there any way how to selve it? For example add some condition tha will restrict that part of code at search page?

    Thanks in advance

    0 0

    I'm using WP REST API to publish contents for my website. Is it possible to generate chart and insert into posts by coding?

    I tried Visualizer Library but did not know how to do it automatically by coding. Please advice!

    0 0

    Hi everyone,

    I have TAG-CLOUD enabled in my widget, for more information:

    I have added this code to my functions.php (child theme)

    add_filter( 'widget_tag_cloud_args', 'my_widget_tag_cloud_args' );
    function my_widget_tag_cloud_args( $args ) {
    	$args['number'] = 34;
    	$args['order'] = rand;
    	//$args['exclude'] = array(20, 80);
    	return $args;

    In my error log it's showing error on line 10, it's this one:

    $args['order'] = rand;

    Why am I getting this error? It's working correct on my website, the tags are getting randomized

    Thank you

    0 0

    Hi all,

    I've tried altering the orderby code in WPTiles to display gallery photos in a specific order.

    This is what I've tried so far that doesn't work. I'm not sure I'm formatting the array correctly.

    [wp-tiles post_type="jetpack-portfolio" post__in=(87,84,110,109,86,83,82,85,88,157) orderby="post__in"  order="ASC" grids="Golden Ratios" full_width="true"]
    <hr />
    [wp-tiles post_type="jetpack-portfolio" orderby="date" order="DESC" grids="Golden Ratios" full_width="true"]

    The first section is my attempt at setting up the array for post__in.
    The second section is the original code.

    Here's the test page I created to try out WPTiles:

    Tiled Gallery Test Page

    Thanks for your help!

    0 0

    Hi all,

    I'm stuck. I'm working on a site that has a Parallax Banner that takes up most of the screen height.

    I'm trying to modify the function that creates my "read more" links after my excerpts in my Recent Posts to link to the #content id in my single.php (opening the page after the tall banner).

    I'm using the suggestion from the Codex on Customizing the Read More, (see below) but I don't know enough .php to be able to insert the anchor tag (#content) that I'd like to postpend to the get_permalink without breaking the code.

    // Replaces the excerpt "Read More" text by a link
    function new_excerpt_more($more) {
           global $post;
    	return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More...</a>';
    add_filter('excerpt_more', 'new_excerpt_more'); and


    Many thanks in advance!

    0 0

    I have an "include" that loads a PHP script that contains some enqueues. I originally put my 'include' in the top of my template for the page but I found that the code didn't get loaded because it looks like "template load" time is too late in the load sequence. I moved the 'include' to my functions.php and all works fine BUT I don't want to load all of this code for all pages---which is what happens with the 'include' in functions.php. BUT, I discovered that in functions.php I don't know what the page is that is being loaded.

    Any ideas?

    0 0


    I'm developing a plugin that hooks into the upload_dir filter: it creates a custom upload folder in folder wp-content.

    But how can I delete whole folder again, when uninstalling plugin? I would like to add this in my uninstall.php.


    0 0

    Hi, I am working on a website. It has a custom registration system where visitors have to register to use the service. How should I save those registrations? Should I use WP's users table or should I create a new table for that?

    0 0

    Hi WordPress,

    Recently i've been experiencing this popup on my site and cant see where it has come from? Its not something I can seem to replicate easily as it doesn't seem to come up at every visit? Has anyone else seen something like this?



    0 0


    I've been trawling through themes and plugins for about a thousand years now just trying to turn my post pagination into big buttons instead of the default 'easily missed' text.

    I think I've found a plugin that will do what I want but I'm having trouble locating the code that I need to replace in order for the plugin to work.

    The plugin is: Simple Pagination
    My WP site is:

    The instructions for the plugin say do this:-

    Usage for posts

    In your theme, open the theme files where you'd like pagination to be used. You need to find calls to next_posts_link() and previous_posts_link() and replace them.

    Usually this is the loop.php file.

    You would replace those two lines with this:

    <?php if(function_exists('wp_simple_pagination')) {
    } ?>

    but I can't find those files because my theme doesn't have a loop.php file.


    0 0


    In my news website author have to change author to a common name. is there any way to get post count of original author.

    0 0

    down vote

    I have created a Custom Post Type with the Custom Post Type UI plugin.

    I have added a number of custom fields which are connected to this custom post type.

    I want to create a Backend View for the custom post type where the user can see the post without the ability to Edit the post.

    I need help on the following issues:

    Overriding the 'View' button shown for every entry to point to the 'Backend View' page
    Creating the 'Backend View'

    The Custom Post type that I have created isn't shown through the website it is meant as Booking, each Booking input is added as a post entry, which currently can only be viewed in Edit mode. Which creates a problem as I want the edit mode to be available to 'Super' Admins only.

    Apart from the above the View button which is automatically shown for each entry directs you to the homepage, I want this to be either overriden and directed to a View page or completely removed so to not confuse the users.

older | 1 | .... | 393 | 394 | (Page 395) | 396 | 397 | .... | 413 | newer