I can’t see your site. However, based on the code you added, you could try something like this:
css:
.owl-controls .owl-pagination .owl-page span{
height: 50px;
width:50px;
background-size: cover;
background-position: center;}
JS:
$('.owl-controls .owl-pagination .owl-page').each(function(index, value){
$(this).children('span').css('background-image', "url('"+$('.owl-carousel .owl-wrapper .item').eq(index).find('img').attr('src')+"')");
});
Here is a working example:
http://codepen.io/BertoMejia/pen/LRLRBg
Related Posts:
- How to use SRCSET with get_the_post_thumbnail()?
- How to display recent posts on home page with custom HTML
- Use wp_get_recent_posts with search term
- Load a page into a div with Ajax
- Converting HTML Template to WordPress Theme
- Recent Posts slider, using WP_Query(), loads duplicate sliders
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Syntax error when I try to insert my loop into an unordered list? [closed]
- How to retrieve the data from the sever and displaying it in a page?
- How do I get the content excerpt of the recent post?
- Getting posts to exclude from array
- Get all posts as an array ID => Name
- Custom post type permalinks do not appear using the link functions
- Using php inside javascript [closed]
- Toolbar Hidden in a Virtual Page
- Search.php gets metadata from first post
- Search AJAX Filters – Multiple Query Loops Into One Loop (Optimization)
- Displaying images outside the content
- PHP inside echo HTML
- Trying to get pagination working on WP_Query() post grid
- Collapsible menu on post sidebar only expands and does not collapse
- Add Text Area To Child Theme’s Home Page
- WooCommerce – Print Processing orders [closed]
- Variable ++ in query loop
- Font Awesome Icons as squares [closed]
- How to show correct td of table tags in wp_query loop
- Exclude first post from wp query
- How could I prevent using the same custom loop in a template file when I only need to change one meta_query parameter?
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- To echo or not to echo?
- Blank space at beginning of tag?
- WordPress WP_Query() Not working properly
- How do I add HTML to a PHP function [closed]
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- Custom image upload
- WordPress automatically adds tags when pasting code, how to stop it?
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Remove annoying WP Adminbar CSS
- What is the fastest way to load PHP functions that are only used in one theme template?
- Sorting Posts | Alphabetical Order
- My Own layout in WooCommerce pages [closed]
- Get taxonomy terms only of the WP_Query current posts
- Placing raw HTML inside a WordPress shortcode
- How to only show page id as body class?
- How to get to a specific position in wp_query?
- Get category name from custom loop and echo it once
- Differences when using the the_time and the_date functions
- Exclude posts from homepage having a specified tag
- Why is this Ajax not working?
- How do I access the media settings
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Changing the template hierarchy
- Looking for most performant way to execute several similar WP queries within shortcodes
- API response to be stored locally
- using add_action for a header hook that has an additional parameter
- Slide in Panel WordPress Post
- custom shortcode will not display the wrapped content
- Shortcode content output but not in correct place
- WP_Query loop, does not display special characters in title correctly
- Remove query string specific key value
- Correct syntax to html php conversion
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Can’t load WP function into external function
- Hide post if matches current month and year
- Custom category code not showing all posts
- Upload Image in a WordPress page using PHP
- Displaying theme options in css
- Show post in slider
- Get the last month with posts using a recursive function…
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- max_input_vars: how many am I using?
- Use WP_Query in shortcode
- have_posts() execution failure
- How to show a dynamic_sidebar if main content content’s height is > a set amount?
- Removing unneccessary p-tags (Not every p)
- Set WordPress Default Template
- How can I hide Home in my menu in a specific page?
- WordPress automatically adding html tag around PHP code
- Custom URL parameters in template files
- Missing sidebar parameter “fix” – before_content
- How to filter posts by post format “standard” from wp-json api?
- Why is variable not working on custom sql query using wpdb?
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- How Display Posts on category
- Can’t search posts using WP_QUERY inside AJAX Function
- How to query for pages/post depending on slug?
- How to get the POST TITLE using the POST ID?
- How can I use wp_query to show all product data using just the products ID?
- Adding country tags automatically
- write custom woocommerce templates and forms
- Implement toggle switch for theme options in settings API
- Using a `Template Parts` folder instead of an `Includes` folder in a Custom WordPress Theme
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- HTML tags in bloginfo description
- Using a variable in is_page(array())
- Random order of WP_Query results with highest meta value
- Trigger popup in a php if/else statement
- Anyway to output the registration form like the login form with wp_login_form()?
- Custom page archive query by url var calling page twice on one of my custom queries?