Add affiliates links in WordPress post from multiples websites - wordpress

Is there any plugins (or ways) to add maybe 3 or 4 differents affiliates links in my posts automatically ?
I want to add the logo of the affiliate website with a link to the product.
I don't know how to do that.
(Sorry for my english i'm french)
Thank you

If you are comfortable editing PHP, html and css files than you could easily add such functionality yourself via custom fields.
You can add custom fields with product name, link and image url. They can be set as theme options if they are going to be the same or they can be unique per each post if you will assign such custom fields to posts.
Then in single.php template you can output the values and with html markup and some css you can give them any shape and style.
If you don't want to code custom meta boxes for your custom fields yourself, I would recommend Advanced Custom Fields plugin (it has great documentation).

Related

How to create such buttons with Wordpress?

I'm very new to WordPress (tbh, it's my first time working with it). And I need to make a website as my school project using CMS. Creating pages with templates is alright, but I have a lot of troubles with buttons. I found this website, and I can see it using WordPress. I need such buttons as on this page https://movie-chooser.co.ua/random-movie-2/ (they appear when you hover over the image). Is this a default option for buttons in WordPress? If not, is there a plugin for this or what is the way to add them on my images?
First Install Elementor plugin https://wordpress.org/plugins/elementor/
and go to page when you add button and open page with elementor
and do drag and drop any element like button, space, text editor etc.
You have several ways to achieve that:
Overwritting Wordpress CSS
Using a plugin
Create your own shortcode
1 - Overwriting Wordpress CSS
If you manage to display all the elements using wordpress template, and your only issue is to display buttons over the images, then it should only be a matter of CSS
2 - Using a plugin
The idea here is to find a plugin that help you to create/display the informations you need (maybe you'll need to add functionnality to basic post though custom fields or using a custom post type).
Once you find the right plugin, again if the plugin dosen't directly offert some settings on the design then you'll have to overwrite the plugin's CSS rules to display the elements as you want.
3 - Create your own shortcode
If you're new to Wordpress I wouldn't recommend this method as it is kind of advanced, unless you're comfortable with PHP/HTML/CSS (optionaly JS).
This is the more flexible solution as you can basically control anything, but it will require you to understand some core concepts of Wordpress like WP Query and how custom queries works.
The idea here is to create a shortcode.
THis shortcode refere to a custom made PHP function, in which you can create a custom request to fetch the informations you need to display from Wordpress database, and display it in an HTML structure that you decide.
THen angain, you'll just have to customize it though CSS.
Note : no need to create a whole plugin if you decide to create a shortcode, you can use the template functions.php file for that.

how to create custome html section in wordpress?

I am trying to make a wordpress theme with a static header and footer but i want the user to be able to customize the other sections between header and footer , let say i have 5 sections and in each page the user should be able to decide what sections to include in the page . i tried to use page builder plugin put its not what i want exactly because once i remove a row it won't be avilable any more and i want it to be there so the user can add or delete it at any time , is there a way to store my different html sections as a custome post or a custom field??
Advanced Custom Fields would work perfectly in this scenario. The plugin features over 30 field types.

Is There a way to change an attachment to a regular page in wordpress?

I am putting together a site in wordpress, and we want to use the gallery for a product section. The problem is, the gallery seems to only point to the attachment file for the image, and I can't seem to change anything (add meta keyword, desc, etc..)
Is there a way to just make the gallery images point to a page? or is there a way to edit the html for the pre-generated "attachment" pages?
The [gallery] shortcode can be manipulated. But if you want a customized attachment page, you just need the template attachment.php in your theme files.
Here's one tutorial about it: How to Create a Custom Single Attachments Template in WordPress.
In this article, we will show you how to use the additional fields in the media uploader and display them in a custom single attachments template.

Hint for Wordpress Theme

I'm developing a theme for wordpress and would like to know the best way to show highlights on the home page.
Examples:
I thought two ways:
Custom post types -a custom post "highlight" with metabox for image, text and link.
Theme Options - a page with options for each box.
What is the right way?
Neither. What you want can be achieved using either Wordpress' core functions and/or Custom Fields. Consider using Custom Meta Boxes if you have a client that requires a more intuitive setup, or installing something like the Types Plugin to do it for you.
This will allow you to attach your own variables to given Posts/Pages.
To gain access to a post's Custom Fields, click the Screen Options button at the top of the Post Editor to enable Custom Fields.
Personally, I would Enable Support for Thumbnails for your Highlights image, use The Excerpt for your Highlight copy, and use either The Title or a Custom Field for the heading.
This way, you can keep all your eggs in one basket rather than overcomplicating things with Custom Post Types or Theme Options Pages.
Look at the Plugin "Ether Content Builder"
You could use either of the methods you've suggested. In my opinion getting involved with lots of meta boxes on one specific page template for this is a total waste of time - there is only an image, a header and an excerpt linking to a post/page. Three posts (whether custom or not) will handle that with featured image, excerpt and the page/post title.
I also think doing a Custom Post type is too much just for three posts on the homepage. If you go the posts route just create a new post category called Home Highlights and put your three posts in there, pull them in via a custom loop built on WP_Query.
Yes you can go the Theme Options route too. If it's the client updating the site then it can look quite professional this way, I've started using a plugin called Options Tree after it came integrated with Super Skeleton, it makes it very easy to build your custom theme options which work just as well too.
A matter of opinion really, rather than a hard and fast 'this one is definitely better'!

post page in wordpress

In the wordpress reading settings, where you set your "blog" page to post page,
even if I create a custom template for the blog - or add addition text/custom fields etc.
nothing seems to appear....
as far i understood , those will be ignored... as it is set static...
is there a other way, to create a custom page ("blog"), where you can add all those post into this page , style them, add text as well
If you're asking, how can I make a page of posts then there are many answers to this question. I personally ended up using these 2 plugins:
Pages Posts (which lets you present posts of a specific category or tag on a page)
Simply Exclude (Lets you selectively exclude categories and tags from page)
both can be installed via the plugins search

Resources