How to insert payments logo opencart footer - icons

How can I insert payments logos in the footer for opencart 3.X?

you can Edit Footer Template file : catalog\view\theme\default\template\common\footer.twig
Replace
<p>{{ powered }}</p>
to
<p>{{ powered }}<img src="/image/yourimage path/yourimagename.png"
width="500" height="50" class="img-responsive" alt="Payment"
style="float:right"></p>
I think it will be working fine.

Edit footer template file catalog/view/theme/default/template/common/footer.tpl
Change
<p><?php echo $powered; ?></p>
to
<p><?php echo $powered; ?></font><img src="/image/yourimage path/yourimagename.png" width="480" height="40" class="img-responsive" alt="payment methods" style="float:right"></p>
May need to vary width\height as required

In 3.x if you have BurnEngine installed you can change it via BurnEngine -> Theme Settings -> Payment images.

Related

How to add image at email footer wordpress

I would like to add a small logo with a link at the footer of the wordpress email template
add_filter('comment_notification_text',
function ($notify_message){
$notify_message .= '<a href="https://example.com/">
<img alt="example" src="http://example.me/wp-content/uploads/2022/02/k.png" width="64" height="64">/a>';
return $notify_message;
}
);
the email template displays this HMTL code at the bottom
<a href="https://example.com/">
<img alt ="example" src="http://example.me/wp-content/uploads/2022/02/E.png" width="64" height="64">/a>
What should I do to display the image not the code? Thank you!

How can I display ads in amp pages

I added this code to functions.php to perform the operation, but yet ads are not displaying on my amp pages.
//Adding Header Code in AMP pages in WordPress
add_action(‘amp_post_template_head’,’nhb_amp_my_custom_head’);
function nhb_amp_my_custom_head($amp_template) { ?> //adsense_header_code <?php }
//Adding Footer Code in AMP pages in WordPress
add_action(‘amp_post_template_footer’,’nhb_amp_my_custom_footer’);
function nhb_amp_my_custom_footer($amp_template) { ?> //adsense_body_code <?php }
You can display ads on your amp pages using the <amp-ad> or <amp-embed> tags.
A container to display an ad. The amp-embed is an alias to the amp-ad
tag, deriving all of its functionality with a different tag name. Use
amp-embed when semantically more accurate. AMP documents only support
ads/embeds served via HTTPS.
Example: Displaying a few ads
<amp-ad type="a9"
width="300"
height="250"
data-aax_size="300x250"
data-aax_pubname="test123"
data-aax_src="302">
</amp-ad>
<amp-ad width="300"
height="250"
type="industrybrains"
data-width="300"
data-height="250"
data-cid="19626-3798936394">
</amp-ad>
<amp-embed type="taboola"
width="400"
height="300"
layout="responsive"
data-publisher="amp-demo"
data-mode="thumbnails-a"
data-placement="Ads Example"
data-article="auto">
</amp-embed>
For more examples, you can try visiting this link.

Get post title from ACF - select post

I have beginner with ACF and WordPress as developer.
So, I want to select which title post has to be displayed in div from WordPress panel. I have got some ACF file called "hot_news" which is post object. Returned content is post object, not ID.
I have got also "Show if post is equal to (some post title)".
This is my code:
<div class="bp1-col-1-1 news-line">
<a class="button button-hot-news" href="#">Aktualności</a>
<img class="hot-icon hot-icon-left" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
<div class="morquee-efect">
<a class="hot-news-title" href="#"><?php the_field('hot_news'); ?></a>
</div>
<img class="hot-icon hot-icon-right" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
</div>
When I make it is displayed, but does not display post title. What is wrong?
to retrieve a field from ACF you should use get_field so
<?php echo get_field('hot_news'); ?>
prints the current post custom field named "hot_news".
If you want you can specify a post ID :
<?php echo get_field('hot_news'[,post_ID]); ?>
You said in your question that hot_news is a post object. Therefore, if you try to echo an object, you're not going to get what you want.
Instead, you'll have to do something like:
<div class="bp1-col-1-1 news-line">
<a class="button button-hot-news" href="#">Aktualności</a>
<img class="hot-icon hot-icon-left" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
<div class="morquee-efect">
<a class="hot-news-title" href="#"><?php
$hotnews = get_field('hot_news');
if($hotnews) echo $hotnews->post_title;
?></a>
</div>
<img class="hot-icon hot-icon-right" src="<?php echo get_bloginfo('template_url') ?>/images/warning-icon.png" alt="Hot news!">
</div>
You can get more info on how to work with an ACF post object here: https://www.advancedcustomfields.com/resources/post-object/
My method should work if you just need the simple post title, but if you start needing permalinks to the post and stuff like that, it may make sense to use the setup_postdata($post) code that the ACF docs use.

WORDPRESS: Slider with Image, Caption & Excerpt from custom fields, of the same post

Good Morning and Seasons Greetings! I am looking for help. I am trying to create a custom post, single page template where I want to embed a slider that fetches images, title and excerpt from the data of the same post. Let me describe the problem I seek help for.
The BACKGROUND Info
1) I have created a custom Post Type called "HPC Products"
2) It is linked with Custom Taxonomy called "HPC Product Categories"
3) The custom fields group for HPC Product includes Key Highlight 1, Key Highlight 2, Key Highlight 3 (all 3 as Single text fields) it also has fields called Product Image 1, Product Image 2, Product Image 3 (All 3 Image fields) , there are some other fields too such as title, features etc,
4) I have made a Custom Content Template for the Single-HPC-Product.
THE GOAL (Which I am not able to achieve)
Within the single-hpc-product page, I have the title and tagline followed by product description.Under that I want to have a slider with 3 slides.
Slide 1 – Should fetch Prod Image 1, The title of Key Highlight 1 and the Details of Highlight 1
Slide 2 – Should fetch Prod Image 2, The title of Key Highlight 2 and the details of Highlight 2
Slide 3 – Should fetch Prod Image 3, The title of Key Highlight 3 and the details of Highlight 3.
I have searched a lot of the forum strings, I have tried more than 25 different attempts at views and templates with different options such as Post is Parent, Post is Child, – Template is slider, template is custom display etc etc, But for some reason I am not getting success.
I really would be grateful if you could help me out by guiding me with simple steps to do this, I am a newbie with no knowledge or experience in php or coding.
I think you are using Advanced Custom Fields plugin to create your custom fields. If not use get_post_meta() instead of get_field()
First you need to find a slider that match with your requirements. After you found one look at it's markup. Imagin it's look like following code ,
<div id="slider-main">
<div class="slide">
<img src="images/img1.png" />
<span class="caption-1">Key Highlight</span>
<p class="caption-2">Key highlight details</p>
</div>
<div class="slide">
<img src="images/img2.png" />
<span class="caption-1">Key Highlight</span>
<p class="caption-2">Key highlight details</p>
</div>
<div class="slide">
<img src="images/img3.png" />
<span class="caption-1">Key Highlight</span>
<p class="caption-2">Key highlight details</p>
</div>
</div>
your template file look like this,
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="main">
<div id="slider-main">
<div class="slide">
<img src="<?php echo get_field('product_img1'); ?>" />
<span class="caption-1"><?php echo get_field('key_highlight1'); ?></span>
<p class="caption-2"><?php echo get_field('highlight_details1'); ?></p>
</div>
<div class="slide">
<img src="<?php echo get_field('product_img2'); ?>" />
<span class="caption-1"><?php echo get_field('key_highlight2'); ?></span>
<p class="caption-2"><?php echo get_field('highlight_details2'); ?></p>
</div>
<div class="slide">
<img src="<?php echo get_field('product_img3'); ?>" />
<span class="caption-1"><?php echo get_field('key_highlight3'); ?></span>
<p class="caption-2"><?php echo get_field('highlight_details3'); ?></p>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>

wordpress apply_filter values are not coming inline

I am using follwing code in my wordpress custom theme template
<p id="news"> <?php echo apply_filters('the_content',$myNews)?></p>;
And the desired output should be like this
<p id="news"> Herer goes my news content from $myNewsvariable </p>
But i am getting output like this
<p id="news"></p>Here goes my news content from $myNewsvariable
Please tell me how i can fix this
the_content function prints out content by default. So there is no need to do a duplicate echo before apply_filters.
Also you can apply your filter to get_the_content:
<?php echo apply_filters('get_the_content', $myNews); ?>

Resources