Adding social share in blog posts Simply access Settings › General › Page Settings › Single Post › Social Sharing links and you should be able to find the options related to the social icons eg: screenshot . You can disable them or add/remove other icons. Adding social share in product pages Please access Settings […]
Topic: Code & Snippets
CSS, JavaScript, PHP snippets, child theme and template overrides.
CSS, JavaScript, PHP snippets, child theme and template overrides.
15 articles
How to add custom CSS
To add custom CSS there are several methods: Child theme’s style.css First, you need to make sure you have a child theme installed. Read how to install child theme. Once you have it installed, open style.css and paste the CSS code inside it. WordPress has a built-in code editor, so you can access WordPress > […]
How to install child theme
Manual installation In the theme’s files, please access /rey/inc/files/ and you can find the rey-child.zip archive which contains the child theme. Simply install it like you install any theme in Appearance > Themes > Add new and activate it. Automatic installation When the Parent theme is active, you should be able to see a box […]
How to hide a page / post title
To hide the title of a post or page, edit it, and you should see the options tabs with the option called “Title Display”, eg: Please know that in order for all these options to be shown, you will need to make sure Advanced Custom Fields PRO plugin is installed. Read more on installing plugins.
Code snippets
Most of these codes should be pasted into wp-content/themes/rey-child/functions.php . Product catalog Change Product title’s heading tag By default it’s H2 but you can change it with this snippet below. Change “New” badge text Change “SOLD OUT” badge text ACF fields: Place custom data over the product thumbnail in product catalog ACF fields: Add custom […]
How to add custom code in child theme’s functions.php
Basic code editing method The easiest way of editing the child theme’s functions.php file to add your custom code is to: Please make sure the code is valid and doesn’t have errors. Otherwise you can lockdown your site. Normally the safest way is through FTP or cPanel’s File manager, however if you know exactly that […]
How to add custom JavaScript
This article refers how to add custom JS through the child theme. So before starting, make sure it’s installed and active. If it’s not installed, access Rey Theme > Dashboard in the backend and you should see a red button “Install Child theme” . Note: If you want to avoid using a child theme, you […]
Override template files
A template file is the small PHP file that prints one piece of a page: the logo, the cart panel, the price on a product page. When you need to change what one of them outputs, and no setting or filter can do it, you copy that file into your child theme and edit the […]
How to equalize product item’s height
Equalize titles height Titles vary in length, so some may be displayed in one row, others in 3 rows. This option will force an equal height for all titles in each row, the largest title providing the minimum height. Access Settings › WooCommerce › Catalog › Product Card › Title › Titles Height and choose […]
Editing content inside the cart panel, when empty
This feature allows to assign a Generic Global Section inside the Cart Panel, when empty (without any products added into the cart). To enable or disable this option, please head over to Settings › Header › Cart › Empty Cart settings and choose any item you want in the “Empty Cart Content” select list eg: […]