Jump to content

Plugin Template PHP


bluebuzzy
 Share

Recommended Posts

Hey guys, I hate being a beggar but I am trying to figure out how to remove links from aawp-box__image and aawp-box__title. That’s a script from a plugin that uses Amazon to get the name, images, and other stuff of products directly on my site. I was wondering if there is a way to delete the links while still have the images downloaded from Amazon (the plugin is AAWP).

Maybe someone can help me here?

 

<?php
/*
 * Box template
 * ------------
 * It's possible to display multiple boxes at once
 *
 * @package AAWP
 */

if ( ! defined( 'ABSPATH' ) ) {
    die( '-1' );
}

?>

<?php foreach ( $this->items as $i => $item ) : ?>
    <?php $this->setup_item($i, $item); ?>

    <div class="<?php echo $this->get_classes('box'); ?>" <?php $this->the_product_container(); ?>>

        <div class="aawp-box__thumb">
            <a class="aawp-box__image-link"
                ?>" title="<?php echo $this->get_product_image_link_title(); ?>" rel="nofollow" target="_blank">
                <img class="aawp-box__image" src="<?php echo $this->get_product_image(); ?>" alt="<?php echo $this->get_product_image_alt(); ?>" <?php $this->the_product_image_title(); ?> />
            </a>

            <?php if ( $this->get_product_rating() ) { ?>
                <div class="aawp-box__rating">
                    <?php echo $this->get_product_star_rating(); ?>

                    <?php if ( $this->get_product_reviews() ) { ?>
                        <div class="aawp-box__reviews"><?php echo $this->get_product_reviews(); ?></div>
                    <?php } ?>
                </div>
            <?php } ?>
        </div>

        <div class="aawp-box__content">
            <a class="aawp-box__title"  ?>" title="<?php echo $this->get_product_link_title(); ?>" rel="nofollow" target="_blank">
                <?php echo $this->get_product_title(); ?>
            </a>
            <div class="aawp-box__description">
                <?php echo $this->get_product_description(); ?>
            </div>
        </div>

        <div class="aawp-box__footer">
            <?php if ( $this->get_product_is_sale() ) { ?>
                <span class="aawp-box__ribbon aawp-box__sale">
                    <?php if ( $this->show_sale_discount() && $this->is_sale_discount_position('ribbon') ) { ?>
                        <?php echo $this->get_saved_text(); ?>
                    <?php } else { ?>
                        <?php echo $this->get_sale_text(); ?>
                    <?php } ?>
                </span>
            <?php } ?>

            <div class="aawp-box__pricing">
                <?php if ( $this->get_product_is_sale() && $this->show_sale_discount() ) { ?>
                    <span class="aawp-box__price aawp-box__price--old"><?php echo $this->get_product_pricing('old'); ?></span>
                    <?php if ( $this->is_sale_discount_position('standard') ) { ?>
                        <span class="aawp-box__price aawp-box__price--saved"><?php echo $this->get_saved_text(); ?></span>
                    <?php } ?>
                <?php } ?>

                <?php if ( $this->show_advertised_price() ) { ?>
                    <span class="aawp-box__price aawp-box__price--current"><?php echo $this->get_product_pricing(); ?></span>
                <?php } ?>

                <?php $this->the_product_check_prime_logo(); ?>
            </div>

            <?php echo $this->get_button('detail'); ?>
            <?php echo $this->get_button(); ?>

            <?php if ( $this->get_inline_info() ) { ?>
                <span class="aawp-box__info"><?php echo $this->get_inline_info_text(); ?></span>
            <?php } ?>
        </div>
    </div>

<?php endforeach; ?>

I hope that isn’t too much hassle, thank you!

 
Link to comment
Share on other sites

I'm probably missing something, but have you tried removing the <a> tag? So this

<a class="aawp-box__image-link"
	?>" title="<?php echo $this->get_product_image_link_title(); ?>" rel="nofollow" target="_blank">
	<img class="aawp-box__image" src="<?php echo $this->get_product_image(); ?>" alt="<?php echo $this->get_product_image_alt(); ?>" <?php $this->the_product_image_title(); ?> />
</a>

 

Would become this

<img class="aawp-box__image" src="<?php echo $this->get_product_image(); ?>" alt="<?php echo $this->get_product_image_alt(); ?>" <?php $this->the_product_image_title(); ?> />

 

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.