Viewing 30 results - 3,241 through 3,270 (of 11,207 total)
  • Author
    Search Results
  • #1124050

    Hi Carsten,

    Classes in CSS are what always starts with a dot:

    .my-class {
      CSS goes here
    }

    To add your own class to an element then you can activate that option under Enfold->Layout Builder->Show element options for developers. Then add your own class to the element. The documentation is using dummy (made up, example) classes, so you would have to replace my-custom-button in the example with your own class:

    .my-custom-button a.avia-button:hover {
    background: rgba(112, 112, 112, 1) !important;
    }

    Best regards,
    Rikard

    #1124020

    Hi,

    Thank you for using Enfold.

    There’s a load more button in the Masonry element. Have you tried that? You can select the portfolio entries taxonomy instead of the default posts to display your portfolio items.

    Best regards,
    Ismael

    #1123980
    chachaprince1
    Participant

    Hello!

    When I try to use the update button, I get the following message:

    “An error occurred while updating Enfold: Download failed. A valid URL was not provided.”

    So, I tried manually installing it by using the “add new” feature in the themes section, and I get this:

    “Destination folder already exists. /home/emxubfgf/public_html/wp-content/themes/enfold/

    Theme installation failed.”

    I’m currently using 3.3.2

    What should I do? Thanks!

    #1123549
    FelixB
    Participant

    I have a question regarding an infinite scroll function. We are looking for a way to have more posts being displayed without clicking a „load more“ button. For example when the user is scrolling past the posts that are currently displayed, additional posts should be loaded. Is there a way to integrate this within Enfold?

    I’m looking forward to your feedback.

    Best regards
    Fabian

    #1123479

    Hi Nikko,

    That make no sense. Every pagination must follow filters choice…

    Even in your kriesi forum when you search something (for example https://kriesi.at/support/search/?bbp_search=enfold+button), the pagination buttons are updated, there are 274 pages, not all the 4521 pages…

    Will you plan fixing the problem in the next version ?

    Best regards,
    Olivier.

    #1123445
    Screener_muc
    Participant

    What is behind the Share Buttons in the Enfold theme. If you use a facebook share Button, does leads to the same rights problems like a Facebook Like button? (Regarding the EuGH Judgment)
    Thanks for Help

    #1123397

    Hi,
    Happy Birthday!! :) Yay!!
    So I created a test page and published and updated again, but I found no “Failed to initialize plugin: avia_builder_button” error, visually on the backend, or in the browser console. When you see the error is it in the console?
    Please see the link in the Private Content area.

    But I do see that you are getting a 400 error in admin-ajax.php and the 403 for Jetpack, these are both server errors, and would be corrected by deactivating the plugins.
    Please try deactivating your plugins and activate them one at a time to find the conflicts, I believe you will find issues with Jetpack, & TinyMCE Advanced, perhaps others like Sucuri.

    The Jetpack error is something Jetpack has been working on but so far no clear solutions other than deactivating it.

    Did you know that we have included the “Classic Editor” in the theme options at Enfold Theme Options > Select Your Editor? This will allow you to remove your “Classic Editor” plugin and possibly a conflict.

    Sorry, I didn’t get this sorted out today, but please try deactivating your plugins to see if you can isolate the conflict.

    Best regards,
    Mike

    Hi slui,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    .modified_width .button {
        width: 20%;
        margin: 0 auto;
        display: block;
    }
    .avia_ajax_form .form_element_three_fourth.modified_width {
        width: 100%;
        margin-left: 0;
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1123085

    Hey Jak73,

    In your WordPress Dashboard, go to Enfold > Advanced Styling.
    Then click ‘Select an element to customize’ then choose h1 (do this on h2 and h3 as well), then click Edit Element button.
    You should be able to change the font size and font weight.
    Hope this helps.

    Best regards,
    Nikko

    #1123051

    Dear Victoria
    1. I tried to use css you gave me, but it doesn’t work. I delete the div code in the beginning, then it works fine.
    .main_color .button.single_add_to_cart_button {
    color: aqua;
    background-color: navy;
    border: green 1px solid;
    border-radius: 11px;
    font-size: 15px;
    }

    2. You told me to use filters or modify templates. I try to find some docs

    But it’s not enough. would you give me more detail docs teach why to do it?

    Best regards.
    Thomas

    • This reply was modified 6 years, 7 months ago by thomasvr4.
    #1123005

    In reply to: Fullscreen slider

    Hey ofekw,

    Thank you for using Enfold.

    You should be able to attach a link to the image and redirect it to a post or page. Edit the image, go to the Caption panel and enable the “Apply a link or buttons to the slide?” settings. You can also add buttons if you want.

    Best regards,
    Ismael

    #1122799

    Topic: cookie opt-in EU

    in forum Enfold
    dondela
    Participant

    Heute wurde ein neues EU Urteil zum Datenschutz gefällt: https://datenschutz-generator.de/eugh-urteil-like-button-cookie-opt-in-abmahnbarkeit

    Ist bei der Cookie-consnet-Funktion von Enfold ein separates Opt-In für jedes Javascript geplant oder sollte man hier auf plugins zurückgreifen?
    Zum Beispiel diese hier: https://de.borlabs.io/borlabs-cookie/

    Vielen Dank und mit freundlichen Grüßen
    Joachim Biehl

    slui
    Participant

    Hi,

    I’m having issues with the submit button on the Enfold contact element. I have 29 elements that are checkboxes and are setup to be 1/4 page width. That part works fine. The part that does not work well is that the submit is automatically formatted for 3/4 of a page.

    See the screenshot:

    Image 2019-07-29 at 11.11.46 AM.png

    Please advise on how to fix this. Thanks.

    sl

    if you realy want to get rid of that button – you can use remove for it – place that in child-theme functions.php
    f.e. you placed an enfold button and give a custom class to it f.e.: button-customclass

    function remove_a_button_with_custom_class(){
    ?>
    <script>
    (function($){	
    	$(".button-customclass a").click(function(){
        	$(this).remove();
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'remove_a_button_with_custom_class');

    Hello Ismael,

    I’m not using the grid function – I only want to be able to change the order of the next / previous buttons on a page.

    What determins the order of these arrows, I tried to order by date of creation of the portfoilio entries, but does not work and its also not the alphabetical order.

    I neet do sort this our, please.

    This is an issue since years, why is it so complicated to order the portfolio entries via ENFOLD, not understandable for clients.

    Thank you in advance,

    PS I tried this code but the lines do not match !

    Open up /enfold/functions-enfold.php and change lines 395 – 403 from this.

    {
    $entries[‘prev’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    $entries[‘next’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    }
    else
    {
    $entries[‘prev’] = get_previous_post($settings[‘same_category’]);
    $entries[‘next’] = get_next_post($settings[‘same_category’]);
    }
    To this.

    {
    $entries[‘next’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    $entries[‘prev’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
    }
    else
    {
    $entries[‘next’] = get_previous_post($settings[‘same_category’]);
    $entries[‘prev’] = get_next_post($settings[‘same_category’]);
    }
    Best regards,
    Elliott

    Best AB

    #1122709
    hasbeat
    Participant

    Dear Enfold team,
    I put button on the back of “icon grid” – unfortunately they do not work.
    Obviously a number of people are facing the same problem. What is the solution?

    Thanks !
    Bob

    #1122638

    In reply to: Update

    Hi mike2805,

    You can click the massive blue button on top of the Enfold sub forum, or follow this link to open a new thread.

    Best regards,
    Rikard

    #1122408
    Business16
    Participant

    Dear Support – Team from Enfold,

    I have buyed the enfold theme and I am already on making a website with it, but I stumbled on two problems, I can’t solve alone (when somebody has already an answer to this published, please link to it :) )

    1. With Enfold, I can use the “Advanced Layout Builder” – so far so good. But I can just use it for new posts – not for the posts I created before using Enfold (I used a free theme before Enfold). At this posts I can’t find the “Advanced Builder” – Button.

    Is there a way to solve this problem?

    2. When I click on a category, all articles are in their whole length on the site. How can I change that, so that only the preview text and the image for each article can be seen?

    I´am not a English native speaker, so I apologize for eventual mistakes :)

    I look forward to your answer,

    Best regards

    #1122129
    AdrianSmithUK
    Participant

    Hi

    Before Gutenberg, Enfold used to have a button below the editor icons that made the editor go full width and the icons used to stick to the top of the screen.

    This was very useful for long pages. Am I going mad or has it disappeared?

    Kind Regards,

    • This topic was modified 6 years, 7 months ago by AdrianSmithUK.
    #1122017

    Hi,
    Oops, wrong button :)
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

    #1121935
    alvaromasiammp
    Participant

    Hello Enfold Team,

    I would like to move or hide the <i>cart icon</i> which appears in the Add to cart button in a page displaying Woocommerce products in a <i>product raster</i>.

    I have added a quantity dropdown before the add to cart hook (via functions.php) and the result is not goog at the moment. It is showing the cart icon, then the dropdown and then the button.

    Can you provide any guidance on how to hide that button (cant find any unique selector) or tell me where it is in the templates so that I can remove it or make it unique?

    Thanks,

    Alvaro

    #1121891
    Jerome
    Participant

    Hey guys,

    I have one question. On this page (private-section), there six buttons with squaremeters etc. I want to make the buttons in the same size ( same width).
    Normaly it is not a problem. I tested it with the chrome-console, i used this code:

    .avia-button.avia-size-medium {
        padding: 12px 24px 10px;
        font-size: 13px;
        min-width: 150px;
    }

    I looks perfect, but when i put it into the quick css in enfold. Nothing changed… this is a littlebit weird.
    I refreshed the page, deleted chache and purged the cdn… maybe the code is wrong. Do you have a idea how to solve this problem?

    Would be great.

    Cheers,
    Jerome

    #1121848

    Hey cidcreative,

    Thank you for using Enfold

    The “return to shop” button should not be visible if there is at least one item in the cart. Where do you see the “green” button?

    Best regards,
    Ismael

    #1121656

    Hi Thomas,

    1. Try adding this code at the bottom of your functions.php file:

    remove_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16);

    2. You can use our Avia Layout Builder to customize single product pages and use button element.

    3. Go to Enfold > Advanced Styling > select Buttons, then tweaks the color and border.

    Hope this helps.

    Best regards,
    Nikko

    #1121494

    In reply to: contact form sizes

    Hi marketingnr1,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    #top #custom_html-3 .avia_ajax_form .text_input,
     #top #custom_html-3 .avia_ajax_form .select, 
     #top #custom_html-3 .avia_ajax_form .text_area {
             padding: 7px;
     }
    #custom_html-3 .avia_ajax_form .button {
        padding: 11px;
    }
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    mynick
    Participant

    Hi Enfold,

    We’ve been using your theme a lot and it’s very good. Thank you!
    After dozens of projects I’d like to share my thoughts with everyone. My goal of this post is to make Enfold even better by letting the devs add more , in my opinion, necessary features and changes:

    It was hard to get some “structure” in this post so the list is in random order. I hope you don’t mind.

    Add scroll to top options
    show on mobile: yes / no
    show on desktop: yes / no

    Add more topbar settings
    show on mobile: yes / no
    stick on mobile: yes / no
    show on desktop: yes / no
    stick on desktop: yes / no

    Add uniform button styling
    Changing the style of buttons should affect all buttons (advanced styling). In lots of projects I need to style the form & slider buttons seperately.

    Add more hover-effects on buttons
    The 1 default hover-effect ( subtly lower opacity ) is not enough. I would like to see at least 10 options just to have more visual control over my projects.

    Add control over slider elements animations
    Let us choose the animations that occur in the sliders ( titles en subtexts )

    Add more slider slide animations
    Add more options besides ‘fade’ and ‘slide’

    Add option to choose the color of the icons in accordeons
    You can change the colors of everything in accordeons, but not the icon.

    Add the option to easily display social media icons in a row.
    Currently I’m using ‘Button Row’ with some CSS tweaks to accomplish this. Maybe give the ‘Button Row’ some different styles like you do with f.e. the accordeon element (accordion:minimal, elegant, … )

    Add more control over blog & portfolio items. Directly in the element let us:
    hide/show date
    hide/show categories
    hide/show tags
    hide/show author
    hide/show title
    hide/show text
    Choose icon for hover-state

    Add use custom page as socket
    ‘use custom page’ as footer and socket is awesome! Even better would be to have a seperate ‘page’ for socket and a seperate page for ‘footer’.
    Just to have more control. Some pages don’t really need a footer.
    This way you can have the option on each page to show: A. Footer & socket (default). B. Footer or C. Socket.

    ADVANCED STYLING section
    Add scroll-to-top styling

    SOCIAL PROFILES section
    Add phone, mail, Whatsapp etc by default and the option to add our own icons very easily.

    Add H-tag control
    Let us choose what H-tag elements use

    Add more catelogue styles
    Just like you did with accordeon (f.e. elegant, minimal, modern, … )
    A must to support more horeca-websites, coffeeshops, …

    Add ratings to testimonials
    Because what’s a testimonial without a nice score or star next to it?

    General:
    Add different styles to loads of elements –> elegant, minimal, modern, …

    I’ll try to add more to this list now and then.

    Please consider adding this list with changes to Enfold over time.

    Regards and thank you again for this awesome theme.

    #1121411

    Hey jonnyckk,

    Thank you for using Enfold.

    I can’t find the toggle button in your page. Most of the links redirect to a pdf file. Anyway, you can probably toggle the button itself after the click event. Just find the button selector and use the toggle function as shown in the previous threads.

    Best regards,
    Ismael

    #1121353

    Hey sumio17,
    Please use our pre-built child theme
    You will want to take a couple of steps, 1: please export your theme settings at: Enfold Theme Options > Import/Export > Export Theme Settings File to your computer, this is just for backup.
    2: Once you install your child theme, please import your parent theme settings at:
    Enfold Theme Options > Import/Export > Import Settings from your Parent Theme
    Then you’ll need to re-set your menu options.
    Finally, sometimes it is necessary to save your theme options one more time, to encourage the settings to be saved and activated in the merged /wp-content/uploads/dynamic_avia/ folder, a simple way to do this is to go to General Styling > Quick CSS field and place a space in the field so the theme options “Save all changes” button is clickable.

    You can then add your customizations to the child theme.

    Best regards,
    Mike

    #1121266
    thomasvr4
    Participant

    Hi,
    I have several questions in Enfold product page,
    1. how to remove add to cart button, all woocommerce function, pages, frontpage cart icon?
    2. how to add a new button in single product page, click that button can redirect to another url?
    3. how to custom style the add to cart button, such as color, border….

    Best regards
    Thomas

    #1121208

    Hey guys,

    in which position should I implement the piece of code to display the date?

    blog.php

    <?php
    /**
     * Blog Posts
     * 
     * Displays Posts from your Blog
     */
    if ( ! defined( 'ABSPATH' ) ) {  exit;  }    // Exit if accessed directly
    
    if ( ! class_exists( 'avia_sc_blog' ) )
    {
    	class avia_sc_blog extends aviaShortcodeTemplate
    	{
    			/**
    			 * Create the config array for the shortcode button
    			 */
    			function shortcode_insert_button()
    			{
    				$this->config['self_closing']	=	'yes';
    				
    				$this->config['name']		= __('Blog Posts', 'avia_framework' );
    				$this->config['tab']		= __('Content Elements', 'avia_framework' );
    				$this->config['icon']		= AviaBuilder::$path['imagesURL']."sc-blog.png";
    				$this->config['order']		= 40;
    				$this->config['target']		= 'avia-target-insert';
    				$this->config['shortcode'] 	= 'av_blog';
    				$this->config['tooltip'] 	= __('Displays Posts from your Blog', 'avia_framework' );
    				$this->config['preview'] 	= false;
    				$this->config['disabling_allowed'] = "manually";
    				$this->config['disabled']	= array(
    												'condition'	=> ( avia_get_option( 'disable_blog' ) == 'disable_blog' ), 
    												'text'		=> __( 'This element is disabled in your theme options. You can enable it in Enfold &raquo; Performance', 'avia_framework' )
    												);
    				
    			}
    			
    			function extra_assets()
    			{
    				//load css
    				wp_enqueue_style( 'avia-module-blog' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/blog/blog.css' , array('avia-layout'), false );
    				wp_enqueue_style( 'avia-module-postslider' , AviaBuilder::$path['pluginUrlRoot'].'avia-shortcodes/postslider/postslider.css' , array('avia-layout'), false );
    			}
    			
    			
    			/**
    			 * Popup Elements
    			 *
    			 * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
    			 * opens a modal window that allows to edit the element properties
    			 *
    			 * @return void
    			 */
    			function popup_elements()
    			{
    				$this->elements = array(
    					
    					array(
    							"type" 	=> "tab_container", 'nodescription' => true
    						),
    						
    					array(
    							"type" 	=> "tab",
    							"name"  => __("Content" , 'avia_framework'),
    							'nodescription' => true
    						),
    					
                        array(	'name' 		=> __( 'Do you want to display blog posts?', 'avia_framework' ),
    							'desc' 		=> __( 'Do you want to display blog posts or entries from a custom taxonomy?', 'avia_framework' ),
    							'id' 		=> 'blog_type',
    							'type' 		=> 'select',
    							'std'		=> 'posts',
    							'subtype'	=> array( 
    												__( 'Display blog posts', 'avia_framework' )						=> 'posts',
    												__( 'Display entries from a custom taxonomy', 'avia_framework' )	=> 'taxonomy')
    											),
    											
    											
    
    					array(	"name" 		=> __("Which categories should be used for the blog?", 'avia_framework' ),
    							"desc" 		=> __("You can select multiple categories here. The Page will then show posts from only those categories.", 'avia_framework' ),
    				            "id" 		=> "categories",
    				            "type" 		=> "select",
    	        				"multiple"	=> 6,
                                "required" 	=> array('blog_type', 'equals', 'posts'),
    				            "subtype" 	=> "cat"),
    
                        array(
                            "name" 	=> __("Which Entries?", 'avia_framework' ),
                            "desc" 	=> __("Select which entries should be displayed by selecting a taxonomy", 'avia_framework' ),
                            "id" 	=> "link",
                            "fetchTMPL"	=> true,
                            "type" 	=> "linkpicker",
                            "subtype"  => array( __('Display Entries from:',  'avia_framework' )=>'taxonomy'),
                            "multiple"	=> 6,
                            "required" 	=> array('blog_type', 'equals', 'taxonomy'),
                            "std" 	=> "category"
                        ),
    					
    					array(	
    						'type'			=> 'template',
    						'template_id' 	=> 'date_query',
    					),
    					
    					array(
    							"name" 	=> __("Blog Style", 'avia_framework' ),
    							"desc" 	=> __("Choose the default blog layout here.", 'avia_framework' ),
    							"id" 	=> "blog_style",
    							"type" 	=> "select",
    							"std" 	=> "single-big",
    							"no_first"=>true,
    							"subtype" => array( __('Multi Author Blog (displays Gravatar of the article author beside the entry and feature images above)', 'avia_framework') =>'multi-big',
    												__('Single Author, small preview Pic (no author picture is displayed, feature image is small)', 'avia_framework') =>'single-small',
    												__('Single Author, big preview Pic (no author picture is displayed, feature image is big)', 'avia_framework') =>'single-big',
    												__('Grid Layout', 'avia_framework') =>'blog-grid',
                                                    __('List Layout - Simple (Title and meta information only)', 'avia_framework' ) =>'bloglist-simple',
                                                    __('List Layout - Compact (Title and icon only)', 'avia_framework' ) =>'bloglist-compact',
                                                    __('List Layout - Excerpt (Title, meta information and excerpt only)', 'avia_framework' ) =>'bloglist-excerpt',
    
    												/* 'no sidebar'=>'fullsize' */
    										)),
    
                        array(
                            "name" 	=> __("Blog List Width", 'avia_framework' ),
                            "desc" 	=> __("Define the width of the list", 'avia_framework' ),
                            "id" 	=> "bloglist_width",
                            "type" 	=> "select",
                            "std" 	=> "",
                            "required" 	=> array('blog_style', 'contains', 'bloglist'),
                            "subtype" =>   array(
                                __('Auto',  'avia_framework' ) =>'',
                                __('Force Fullwidth',  'avia_framework' ) =>'force_fullwidth'
                                )),
    
                        array(
    							"name" 	=> __("Blog Grid Columns", 'avia_framework' ),
    							"desc" 	=> __("How many columns do you want to display?", 'avia_framework' ),
    							"id" 	=> "columns",
    							"type" 	=> "select",
    							"std" 	=> "3",
    							"required" 	=> array('blog_style', 'equals', 'blog-grid'),
    							"subtype" => AviaHtmlHelper::number_array(1,5,1)),
    
    					array(
    							"name" 	=> __("Define Blog Grid layout", 'avia_framework' ),
    							"desc" 	=> __("Do you want to display a read more link?", 'avia_framework' ),
    							"id" 	=> "contents",
    							"type" 	=> "select",
    							"std" 	=> "excerpt",
    							"required" 	=> array('blog_style', 'equals', 'blog-grid'),
    							"subtype" =>   array(
                                        __('Title and Excerpt',  'avia_framework' ) =>'excerpt',
                                        __('Title and Excerpt + Read More Link',  'avia_framework' ) =>'excerpt_read_more',
                                        __('Only Title',  'avia_framework' ) =>'title',
                                        __('Only Title + Read More Link',  'avia_framework' ) =>'title_read_more',
                                        __('Only excerpt',  'avia_framework' ) =>'only_excerpt',
                                        __('Only excerpt + Read More Link',  'avia_framework' ) =>'only_excerpt_read_more',
                                        __('No Title and no excerpt',  'avia_framework' ) =>'no')
                                ),
    
    					array(
    							"name" 	=> __("Blog Content length", 'avia_framework' ),
    							"desc" 	=> __("Should the full entry be displayed or just a small excerpt?", 'avia_framework' ),
    							"id" 	=> "content_length",
    							"type" 	=> "select",
    							"std" 	=> "content",
    							"required" 	=> array('blog_style', 'doesnt_contain', 'blog'),
    							"subtype" => array(
    								__('Full Content',  'avia_framework' ) =>'content',
    								__('Excerpt',  'avia_framework' ) =>'excerpt',
                                    __('Excerpt With Read More Link',  'avia_framework' ) =>'excerpt_read_more')),
    
    					array(
    							"name" 	=> __("Preview Image Size", 'avia_framework' ),
    							"desc" 	=> __("Set the image size of the preview images", 'avia_framework' ),
    							"id" 	=> "preview_mode",
                                "required" 	=> array('blog_style', 'doesnt_contain', 'bloglist'),
    							"type" 	=> "select",
    							"std" 	=> "auto",
    							"subtype" => array(__('Set the preview image size automatically based on column or layout width','avia_framework' ) =>'auto',__('Choose the preview image size manually (select thumbnail size)','avia_framework' ) =>'custom')),
    
    					array(
    							"name" 	=> __("Select custom preview image size", 'avia_framework' ),
    							"desc" 	=> __("Choose image size for Preview Image", 'avia_framework' ),
    							"id" 	=> "image_size",
    							"type" 	=> "select",
    							"required" 	=> array('preview_mode','equals','custom'),
    							"std" 	=> "portfolio",
    							"subtype" =>  AviaHelper::get_registered_image_sizes(array('logo'))
    							),
    
    					array(
    							"name" 	=> __("Post Number", 'avia_framework' ),
    							"desc" 	=> __("How many items should be displayed per page?", 'avia_framework' ),
    							"id" 	=> "items",
    							"type" 	=> "select",
    							"std" 	=> "3",
    							"subtype" => AviaHtmlHelper::number_array(1,100,1, array('All'=>'-1'))),
    
                        array(
                            "name" 	=> __("Offset Number", 'avia_framework' ),
                            "desc" 	=> __("The offset determines where the query begins pulling posts. Useful if you want to remove a certain number of posts because you already query them with another blog or magazine element.", 'avia_framework' ),
                            "id" 	=> "offset",
                            "type" 	=> "select",
                            "std" 	=> "0",
                            "subtype" => AviaHtmlHelper::number_array(1,100,1, array(__('Deactivate offset','avia_framework')=>'0', __('Do not allow duplicate posts on the entire page (set offset automatically)', 'avia_framework' ) =>'no_duplicates'))),
    
    					array(
    							"name" 	=> __("Pagination", 'avia_framework' ),
    							"desc" 	=> __("Should a pagination be displayed? Pagination might not work as expected when there is more than one blog posts element on a page, a post or on the blog page.", 'avia_framework' ),
    							"id" 	=> "paginate",
    							"type" 	=> "select",
    							"std" 	=> "yes",
    							"subtype" => array(
    								__('yes',  'avia_framework' ) =>'yes',
    								__('no',  'avia_framework' ) =>'no')),
    								
    								
    					array(
    							"name" 	=> __("Conditional display", 'avia_framework' ),
    							"desc" 	=> __("When should the element be displayed?", 'avia_framework' ),
    							"id" 	=> "conditional",
    							"type" 	=> "select",
    							"std" 	=> "",
    							"subtype" => array(
    								__('Always display the element',  'avia_framework' ) =>'',
    								__('Remove element if the user navigated away from page 1 to page 2,3,4 etc ',  'avia_framework' ) =>'is_subpage')),
    					
    					array(
    							"type" 	=> "close_div",
    							'nodescription' => true
    						),
    						
    						
    								array(
    									"type" 	=> "tab",
    									"name"	=> __("Screen Options",'avia_framework' ),
    									'nodescription' => true
    								),
    								
    								
    								array(
    								"name" 	=> __("Element Visibility",'avia_framework' ),
    								"desc" 	=> __("Set the visibility for this element, based on the device screensize.", 'avia_framework' ),
    								"type" 	=> "heading",
    								"description_class" => "av-builder-note av-neutral",
    								),
    							
    								array(	
    										"desc" 	=> __("Hide on large screens (wider than 990px - eg: Desktop)", 'avia_framework'),
    										"id" 	=> "av-desktop-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    								
    								array(	
    									
    										"desc" 	=> __("Hide on medium sized screens (between 768px and 989px - eg: Tablet Landscape)", 'avia_framework'),
    										"id" 	=> "av-medium-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    										
    								array(	
    									
    										"desc" 	=> __("Hide on small screens (between 480px and 767px - eg: Tablet Portrait)", 'avia_framework'),
    										"id" 	=> "av-small-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    										
    								array(	
    									
    										"desc" 	=> __("Hide on very small screens (smaller than 479px - eg: Smartphone Portrait)", 'avia_framework'),
    										"id" 	=> "av-mini-hide",
    										"std" 	=> "",
    										"container_class" => 'av-multi-checkbox',
    										"type" 	=> "checkbox"),
    			
    								
    							array(
    									"type" 	=> "close_div",
    									'nodescription' => true
    								),	
    								
    								
    						
    						
    					array(
    						"type" 	=> "close_div",
    						'nodescription' => true
    					),
    					
    					
    				);
    				
    				
    				
    
    				if(current_theme_supports('add_avia_builder_post_type_option'))
                    {
                        $element = array(
                            "name" 	=> __("Select Post Type", 'avia_framework' ),
                            "desc" 	=> __("Select which post types should be used. Note that your taxonomy will be ignored if you do not select an assign post type.
                                          If yo don't select post type all registered post types will be used", 'avia_framework' ),
                            "id" 	=> "post_type",
                            "type" 	=> "select",
                            "required" 	=> array('blog_type', 'equals', 'taxonomy'),
                            "multiple"	=> 6,
                            "std" 	=> "",
                            "subtype" => AviaHtmlHelper::get_registered_post_type_array()
                        );
    
                        array_splice($this->elements, 4, 0, array($element));
                    }
    
    			}
    
    			/**
    			 * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
    			 * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
    			 * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
    			 *
    			 *
    			 * @param array $params this array holds the default values for $content and $args.
    			 * @return $params the return array usually holds an innerHtml key that holds item specific markup.
    			 */
    			function editor_element($params)
    			{
    				$params['innerHtml'] = "<img src='".$this->config['icon']."' title='".$this->config['name']."' />";
    				$params['innerHtml'].= "<div class='avia-element-label'>".$this->config['name']."</div>";
    				$params['content'] 	 = NULL; //remove to allow content elements
    
    				return $params;
    			}
    
    			/**
    			 * Frontend Shortcode Handler
    			 *
    			 * @param array $atts array of attributes
    			 * @param string $content text within enclosing form of shortcode element
    			 * @param string $shortcodename the shortcode found, when == callback name
    			 * @return string $output returns the modified html string
    			 */
    			function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
    			{
    				global $avia_config, $more;
    				
    				$screen_sizes = AviaHelper::av_mobile_sizes($atts);
    				extract($screen_sizes); //return $av_font_classes, $av_title_font_classes and $av_display_classes 
    				
    				if(empty($atts['categories'])) $atts['categories'] = "";
                    if(isset($atts['link']) && isset($atts['blog_type']) && $atts['blog_type'] == 'taxonomy')
                    {
                        $atts['link'] = explode(',', $atts['link'], 2 );
                        $atts['taxonomy'] = $atts['link'][0];
    
                        if(!empty($atts['link'][1]))
                        {
                            $atts['categories'] = $atts['link'][1];
                        }
                        else if(!empty($atts['taxonomy']))
    					{
    						$term_args = array( 
    										'taxonomy'		=> $atts['taxonomy'],
    										'hide_empty'	=> true
    									);
    						/**
    						 * To display private posts you need to set 'hide_empty' to false, 
    						 * otherwise a category with ONLY private posts will not be returned !!
    						 * 
    						 * You also need to add post_status "private" to the query params of filter avia_post_slide_query.
    						 * 
    						 * @since 4.4.2
    						 * @added_by Günter
    						 * @param array $term_args 
    						 * @param array $atts 
    						 * @param boolean $ajax
    						 * @return array
    						 */
    						$term_args = apply_filters( 'avf_av_blog_term_args', $term_args, $atts, $content );						
    
    						$taxonomy_terms_obj = AviaHelper::get_terms( $term_args );
    						
                            foreach ($taxonomy_terms_obj as $taxonomy_term)
                            {
                                $atts['categories'] .= $taxonomy_term->term_id . ',';
                            }
                        }
                    }
    
    				$atts = shortcode_atts( array(
    											'blog_style'		=> '',
    											'bloglist_width'	=> '',
    											'columns'			=> 3,
    											'blog_type'			=> 'posts',
    											'items'				=> '16',
    											'paginate'			=> 'yes',
    											'categories'		=> '',
    											'preview_mode'		=> 'auto',
    											'image_size'		=> 'portfolio',
    											'taxonomy'			=> 'category',
    											'post_type'			=> get_post_types(),
    											'contents'			=> 'excerpt',
    											'content_length'	=> 'content',
    											'offset'			=> '0',
    											'conditional'		=> '',
    											'date_filter'		=> '',
    											'date_filter_start'	=> '',
    											'date_filter_end'	=> '',
    											'date_filter_format'	=> 'mm / dd / yy'
    										), $atts, $this->config['shortcode'] );
    				
    				$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : get_query_var( 'page' );
    				if( ! $page ) 
    				{
    					$page = 1;
    				}
    				
    				/**
    				 * Skip blog queries, if element will not be displayed
    				 */
    				if( $atts['conditional'] == 'is_subpage' && $page != 1 ) 
    				{
    					return '';
    				}
    				
    				if( $atts['blog_style'] == 'blog-grid' )
    				{
    					$atts['class'] = $meta['el_class'];
    					$atts['type']  = 'grid';
    					$atts = array_merge($atts, $screen_sizes);
    					
    					/**
    					 * @since 4.5.5
    					 * @return array
    					 */
    					$atts = apply_filters( 'avf_post_slider_args', $atts, $this->config['shortcode'], $this );
    					
    					//using the post slider with inactive js will result in displaying a nice post grid
    					$slider = new avia_post_slider( $atts );
    					
    					$old_page = null;
    					$is_single = is_single();
    					
    					if( 'yes' == $atts['paginate'] )
    					{
    						if( $is_single && isset( $_REQUEST['av_sc_blog_page'] ) && is_numeric( $_REQUEST['av_sc_blog_page'] ) )
    						{
    							$old_page = get_query_var( 'paged' );
    							set_query_var( 'paged', $_REQUEST['av_sc_blog_page'] );
    						}
    					}
    					
    					$slider->query_entries();
    					
    					if( 'yes' == $atts['paginate'] && $is_single )
    					{
    						add_filter( 'avf_pagination_link_method', array( $this, 'handler_pagination_link_method'), 10, 3 );
    					}
    					
    					$html = $slider->html();
    					
    					if( 'yes' == $atts['paginate'] && $is_single )
    					{
    						remove_filter( 'avf_pagination_link_method', array( $this, 'handler_pagination_link_method'), 10 );
    					}
    					
    					if( ! is_null( $old_page ) )
    					{
    						if( $old_page != 0 )
    						{
    							set_query_var( 'paged', $old_page );
    						}
    						else
    						{
    							remove_query_arg( 'paged' );
    						}
    					}
    					
    					return $html;
    				}
    				
    				$old_page = null;
    				$is_single = is_single();
    				
    				if( 'yes' == $atts['paginate'] )
    				{
    					if( $is_single && isset( $_REQUEST['av_sc_blog_page'] ) && is_numeric( $_REQUEST['av_sc_blog_page'] ) )
    					{
    						$old_page = get_query_var( 'paged' );
    						set_query_var( 'paged', $_REQUEST['av_sc_blog_page'] );
    					}
    				}
    
    				$this->query_entries( $atts );
    				
    				if( 'yes' == $atts['paginate'] && $is_single )
    				{
    					add_filter( 'avf_pagination_link_method', array( $this, 'handler_pagination_link_method'), 10, 3 );
    				}
    					
    
    				$avia_config['blog_style'] = $atts['blog_style'];
    				$avia_config['preview_mode'] = $atts['preview_mode'];
    				$avia_config['image_size'] = $atts['image_size'];
    				$avia_config['blog_content'] = $atts['content_length'];
    				$avia_config['remove_pagination'] = $atts['paginate'] === "yes" ? false :true;
    				
    				/**
    				 * Force supress of pagination if element will be hidden on foillowing pages
    				 */
    				if( $atts['conditional'] == 'is_subpage' && $page == 1 )
    				{
    					$avia_config['remove_pagination'] = true;
    				}
    
    				$more = 0;
    				ob_start(); //start buffering the output instead of echoing it
    				get_template_part( 'includes/loop', 'index' );
    				$output = ob_get_clean();
    				wp_reset_query();
    				
    				if( 'yes' == $atts['paginate'] && $is_single )
    				{
    					remove_filter( 'avf_pagination_link_method', array( $this, 'handler_pagination_link_method'), 10 );
    				}
    
    				if( ! is_null( $old_page ) )
    				{
    					if( $old_page != 0 )
    					{
    						set_query_var( 'paged', $old_page );
    					}
    					else
    					{
    						remove_query_arg( 'paged' );
    					}
    				}
    				
    				avia_set_layout_array();
    
    				if($output)
    				{
    					$extraclass = function_exists('avia_blog_class_string') ? avia_blog_class_string() : "";
    					$extraclass .= $atts['bloglist_width'] == 'force_fullwidth' ? ' av_force_fullwidth' : "";
                        $markup = avia_markup_helper(array('context' => 'blog','echo'=>false, 'custom_markup'=>$meta['custom_markup']));
    					$output = "<div class='av-alb-blogposts template-blog {$extraclass} {$av_display_classes}' {$markup}>{$output}</div>";
    				}
    
    				return $output;
    			}
    
    			/**
    			 * 
    			 * @since < 4.0
    			 * @param array $params
    			 */
    			protected function query_entries( array $params )
    			{
    				global $avia_config;
    				
    				$query = array();
    
    				if( ! empty($params['categories']) && is_string($params['categories'] ) )
    				{
    					//get the categories
    					$terms 	= explode( ',', $params['categories'] );
    				}
    
    				$page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : get_query_var( 'page' );
    				if(!$page || $params['paginate'] == 'no') $page = 1;
    
                    if($params['offset'] == 'no_duplicates')
                    {
                        $params['offset'] = 0;
                        $no_duplicates = true;
                    }
    
                    if(empty($params['blog_type']) || $params['blog_type'] == 'posts') $params['post_type'] = 'post';
                    if(empty($params['post_type'])) $params['post_type'] = get_post_types();
                    if(is_string($params['post_type'])) $params['post_type'] = explode(',', $params['post_type']);
    				
    				//wordpress 4.4 offset fix
    				if( $params['offset'] == 0 )
    				{
    					$params['offset'] = false;
    				}
    				else
    				{	
    					//if the offset is set the paged param is ignored. therefore we need to factor in the page number
    					$params['offset'] = $params['offset'] + ( ($page -1 ) * $params['items']);
    				}
    				
    				$date_query = array();
    				if( 'date_filter' == $params['date_filter'] )
    				{
    					$date_query = AviaHelper::add_date_query( $date_query, $params['date_filter_start'], $params['date_filter_end'], $params['date_filter_format'] );
    				}
    				
    				//if we find categories perform complex query, otherwise simple one
    				if(isset($terms[0]) && !empty($terms[0]) && !is_null($terms[0]) && $terms[0] != "null" && !empty($params['taxonomy']))
    				{
    					$query = array(	
    								'paged'			=> $page,
    								'posts_per_page' => $params['items'],
    								'offset'		=> $params['offset'],
    								'post__not_in'	=> ( ! empty( $no_duplicates ) ) ? $avia_config['posts_on_current_page'] : array(),
    								'post_type'		=> $params['post_type'],
    								'date_query'	=> $date_query,
    								'tax_query'		=> array( 	
    													array( 	
    															'taxonomy' 	=> $params['taxonomy'],
    															'field' 	=> 'id',
    															'terms' 	=> $terms,
    															'operator' 	=> 'IN'
    														)
    													)
    								);
    				}
                    else
    				{
    					$query = array(	
    								'paged'				=> $page,
    								'posts_per_page'	=> $params['items'],
    								'offset'			=> $params['offset'],
    								'post__not_in'		=> ( ! empty( $no_duplicates ) ) ? $avia_config['posts_on_current_page'] : array(),
    								'post_type'			=> $params['post_type'],
    								'date_query'		=> $date_query
    								);
    				}
    
    				/**
    				 * 
    				 * @since < 4.0
    				 * @param array $query
    				 * @param array $params
    				 * @return array
    				 */
    				$query = apply_filters( 'avia_blog_post_query', $query, $params );
    
    				$results = query_posts( $query );
    
                    // store the queried post ids in
                    if( have_posts() )
                    {
                        while( have_posts() )
                        {
                            the_post();
                            $avia_config['posts_on_current_page'][] = get_the_ID();
                        }
                    }
    			}
    			
    			/**
    			 * Using this element not in a page ( = is_single() ) returns a wrong pagination
    			 * 
    			 * @since 4.5.6
    			 * @param string $method
    			 * @param type $pages
    			 * @param type $wrapper
    			 * @return string
    			 */
    			public function handler_pagination_link_method( $method, $pages, $wrapper )
    			{
    				if( is_single() || ( 'get_pagenum_link' == $method ) )
    				{
    					$method = 'avia_sc_blog::add_blog_pageing';
    				}
    				
    				return $method;
    			}
    			
    			/**
    			 * Called when this element not in a page ( = is_single() ). 
    			 * Add our custom page parameter.
    			 * 
    			 * @since 4.5.6
    			 * @param int $page
    			 * @return string
    			 */
    			static public function add_blog_pageing( $page )
    			{
    				$link = get_pagenum_link( 1 );
    				
    				if( $page != 1 )
    				{
    					$link = add_query_arg( array( 'av_sc_blog_page' => $page ), $link );
    				}
    				else
    				{
    					$link = remove_query_arg( 'av_sc_blog_page', $link );
    				}
    				
    				return $link;
    			}
    		
    	}
    	
    }
    
Viewing 30 results - 3,241 through 3,270 (of 11,207 total)