Magento 1.9 Custom extension not displaying block in product view

I have been trying to display a custom template in the product view page in a simple extension but it only works for some references: product.info.additional, product.info.extrahint, product.tooltip and product.info.addtocart.

My app/design/frontend/base/default/layout/productest.xml looks like this. I m trying to display a simple text now but to no success:

<?xml version="1.0"?>
<layout version="0.1.0">
  <catalog_product_view>
    <reference name="product.info">
        <block type="core/text" name="core-text"><action method="setText"><text><!(CDATA(<div>Souh</div>))></text></action></block>
    </reference>

  </catalog_product_view>
</layout>

I have also echoed the block names that are used in the product page:

Array
(
    (0) => product.info.media
    (1) => alert.urls
    (2) => product.info.upsell
    (3) => product.info.additional
    (4) => product.description
    (5) => product.attributes
    (6) => catalog.product.related
    (7) => product.info.addto
    (8) => product.info.sharing
    (9) => product.info.addtocart
    (10) => product.info.extrahint
    (11) => product.info.options.wrapper
    (12) => product.info.options.wrapper.bottom
    (13) => product.info.container1
    (15) => product.info.additional.recurring.schedule
    (16) => product.reviews
    (17) => product.info.simple
    (18) => product.info.availability
)

I don’t understand why not all of them can be extended/referenced when they all appear to be called in the product page.

Thank you in advance for your help.

css – Cannot hide block with jQuery

This seems to be a trivial CSS question and should be asked on SO, but I think there are many subtleties in here that it’s better to ask in here.

I add a CSS class to a block and use jQuery to hide it. It’s simple, but it doesn’t work. How do I debug this?

<script>$("hidetab").css("display", "none");</script>

block editor – Get value of custom checkbox from Gutenberg sidebar in plugin

In older WordPress versions I have used post_submitbox_misc_actions. Now with the new Gutenberg editor, I’m struggling to achieve the same functionality with my existing WordPress plugin.

So basically I just need to add a simple checkbox in the “Post & Visibility” section/block in Gutenberg that must not be pre-filled or permanently stored. I just need the information whether the checkbox has been checked or not in the (PHP) WordPress plugin to perform a simple cURL call.

I have managed to add the the checkbox to Gutenberg using an registered JS file and the following code:

function MyPlugin({}) {
    return el(
        PluginPostStatusInfo,
        {
            className: 'my-plugin'
        },
        el(
            CheckboxControl,
            {
                name: 'notify',
                label: __( 'Send notification' ),
            }
        )
    );
}

registerPlugin( 'my-plugin', {
    render: MyPlugin
} );

But how can I process/read the checkbox information in my (PHP) WordPress plugin?

Thanks for helping!

Hotmail / Outlook block my business email


Hi,

Since some years ago hotmail block my emails each 6 months – 1 year, and my clients no receive my notifications.

I’m not sending spam, only notifications to my clients: orders, services, account access, etc.

Now I configured SPF, DKIM and DMARC but hotmail/outlook still not unblock me.

Gmail always work correctly, but hotmail always have problems.

Can you tell me recomendation for solve this and not happen again?.

Thank you very much.

bitcoin core – How to get the time when a block is received at a node?

Is there any variable in the bitcoind code that records the timestamp when a block is received for the first time by a particular node? To be more precise, for transactions, transaction information returned by Bitcoind JSON RPC API contains timereceived. Is there similar field for blocks in the API?

There happens to be similar existing questions in stackexchange but none of them has been appropriately answered.

wp query – posts_per_page not working in block

I have created a new Block for the WordPress Editor, and I am trying to get a simple WP_Query to work, but so far, the $args in the query are mostly ignored, apart from the post_type setting. For example, I want to set posts_per_page to 3, but this is ignored. Why is this?

<?php
wp_reset_postdata();
wp_reset_query();

$latest_news_args = (
    'post_type'             => 'post',
    'posts_per_page'        => 2,
    'post_status'           => 'publish',
    'nopaging'              => true,
    'ignore_sticky_posts'   => true
);

$latest_news_query = new WP_Query($latest_news_args);

if ($latest_news_query->have_posts()) : while ($latest_news_query->have_posts()) : $latest_news_query->the_post();
    $post_id                = get_the_ID();
    $post_title             = get_the_title();
    $post_url               = get_the_permalink();
    $post_excerpt           = get_the_excerpt();
    $post_image             = get_the_post_thumbnail_url();
    $post_image_id          = get_post_thumbnail_id( $post->ID );
    $post_image_alt_meta    = get_post_meta ( $post_image_id, '_wp_attachment_image_alt', true );
    $post_image_alt         = $post_image_alt_meta ? esc_html($post_image_alt_meta) : $post_title; // If no alt text specified, fall back to post title
    ?>
    <div class="latest-news-block__post">
        <?php if($post_image): ?>
            <img class="latest-news-block__post-image" src="https://wordpress.stackexchange.com/<?php echo $post_image; ?>" alt="<?php echo $post_image_alt; ?>">
        <?php endif; ?>

        <h3 class="latest-news-block__post-title">
            <a href="<?php echo $post_url; ?>"><?php echo $post_title; ?></a>
        </h3>

        <div class="latest-news-block__post-excerpt">
            <p><?php echo $post_excerpt; ?></p>
            <a href="<?php echo $post_url; ?>" class="latest-news-block__post-more more-link"><?php _e('Read more','site'); ?></a>
        </div>

    </div>
<?php endwhile; endif; wp_reset_postdata(); wp_reset_query(); ?>

block editor – Better plugin search on wordpress.org?

I’m trying to find some specific plugin for Accordion (FAQ), but to be in a form of Gutenberg Block. There is a group of “block enabled” plugins on https://wordpress.org/plugins/browse/blocks/

There should be a simple way of achieving this task. I’ve done a lot of experimenting, but none of the results were satisfactory enough.

Using specialized sites

  • https://wpdirectory.net/;

    Tried searching for (?mi)(^s*Plugins+Name:.+accordion.+$) to achieve case-insensitive search for accordion in plugin name. But I can’t search also for “blocks” plugins as there is impossible to achieve AND functionality 🙁

  • https://wpcore.com/plugin-directory; I tried to use their search-form, but the results are not better than on wordpress.org

  • lots of unmaintained or defunct sites:

Using Google

I’ve had some results using Google queries like this one:

inurl:wordpress.org/plugins/browse/blocks/ accordion

… but that gave me only “list” and not “plugin” pages. Not satisfactory at all!

I still believe that it is somehow possible to get better results from Google

Experiment with WordPress.org public API

I’ve found “some solution” via WordPress.org API. Read my own answer…