Deprecated: Function create_function() is deprecated in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/network-latest-posts/network-latest-posts.php on line 1369

Notice: Trying to access array offset on value of type bool in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/slidervilla_v2/includes/builder/functions.php on line 876

Deprecated: Non-static method GoogleSitemapGeneratorLoader::Enable() should not be called statically in /opt/bitnami/apps/wordpress/htdocs/wp-includes/class-wp-hook.php on line 301
Basics Archives - SliderVilla
Warning: A non-numeric value encountered in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/slidervilla_v2/functions.php on line 5806
Create WordPress Slider by Auto Fetching Images from Posts

Create WordPress Slider by Auto Fetching Images from Posts

Images plays a very important role in giving light to the content that has been published. They tend to be an eye catcher for the content that has been published by you. When one decides to use a WordPress Slider then one of the query that arises in his mind is How to get the images from the Post for the WordPress Slider? The WordPress Plugin that has helped to resolve this question is all the Sliders of SliderVilla. All these sliders are capable of auto fetching the images from the post that can be easily used for the WordPress Slider.

Simple steps to create WordPress Slider by auto fetching the images from the post:

NOTE: This will be in reference to the Pointelle Slider, steps are same for other sliders in SliderVilla

Step 1] In order to use the Pointelle Slider to auto fetch the images from the post one needs to download the zip file for Pointelle Slider and add it to the plugin folders.

Admin Panel >> Installed Plugins >> Pointelle Slider >> Activate

Ones the plugin is activated then one will find the Pointelle Slider option in the admin panel and also the related settings can be done from here.

Step 2] To create a new slider go to,

Admin Panel >> Pointelle Slider >> Create New >> WordPress Core Section >> Category Slider (Select the Slider Type accordingly)

cate-point

Fill in the details for the Slider type depending upon the choice that is made.

Step 3] Select the Skin and the Layout for the Slider. An Easy Builder will get appear for it where one will find all the settings of the slider and the changes can be done accordingly for it.

Step 4] In order to auto fetch the images from the post to the WordPress Slider go to:

Admin Panel >> Pointelle Slider >> Manage Sliders >> (Select the particular Slider for which the images are to be fetched) >> Edit

Towards the right it will consists of all the Settings go to:

Settings >> Image Controls >> Image Source (Custom Field,Featured Image, Attached Image Order, Scan content) 

There are the above 4 options for the Image Source that are present and the choice can be made accordingly from the source from which the image is to be fetched.

image controls-pointelle

If the Custom field option is enabled then one needs to mention these details for the Post. Go to the particular Page/Post. Towards the bottom one will find the option to add the Custom Fields. Select the particular custom field and add the value ie. the URL of the image that is to be fetched.

custom field

Accordingly one can fetch the the images by enabling the Featured Image option. One can also enter the order for the attached images where the images will be fetched from the Attached image order option. Similarly one can fetch the images inside the Post/ Page  using the Scan content option. By default this option is disabled.

One can also set the size for the fetched images using the Fetched image size option. There can be other settings that can be done for the particular images from the below settings of the image control (Size, Border, Duration, Cropping etc.)

Fetching Images for all the Posts with a common Settings:

When one wants to fetch the images for all the Posts for a WordPress Slider then this can be easily done from the Settings:

settingset-slide image

Admin Panel >> Pointelle Slider >> Setting Sets >> Slide Settings >> Image Source

One can either enable and disable the options from the image source from where the images are to be fetched from the Post.

Following these simple steps one can fetch the images from the post and accordingly create WordPress Sliders very easily.

Basic: How to Add Template Tags in WordPress Theme Template Files

There are many WordPress plugins that provide template tags or you can say functions that you are asked to add to your theme template file (like index.php or page.php). Let us consider an example of SliderVilla Slider Plugin named Pointelle Slider. Pointelle Slider offers template tags along with shortcodes and widgets to embed the Slider on the WordPres site. The basic Pointelle Template Tag provided in the user guide is as follows:

<?php if ( function_exists( 'get_pointelle_slider' ) ) { get_pointelle_slider(); } ?>

So, if you are learning WordPress and wonder how can I put this slider on the front page of my blog, you can follow the below basic steps to implement the template tag:

1) Say if you are using ‘Twenty Eleven’ WordPress Theme. Go to the Theme Editor in Appearance Settings on WordPress admin panel. If you cannot edit the theme files thru editor, you will have to download them using FTP, then edit them and upload the modified file to the theme folder. Use the code editor or plain text editor to edit the .php files. Do not use Rich Text Editors like MS Word etc., otherwise you will mess up the code badly.

2) Now, go to Settings => Reading => Note what you are showing on ‘Front Page Displays” i.e. either Your latest posts (then your template to edit will be index.php) or A Static Page (then your Template will be page.php or the Page template for the particular page selected to show on the homepage). Also, if your theme has home.php, this can be the template file you would need to edit.

3) In most of the cases the template file to be edited would be index.php

Open the file to edit => Find out the below code in the template file

<?php if ( have_posts() ) : ?>

Paste the Pointelle Slider Template Tag just above this code and save/upload the file.

4) And you are done!!!

So this is an example how the template tag can be added to a WordPress theme’s template file.