Forum Replies Created

Viewing 30 posts - 1 through 30 (of 33 total)
  • Author
    Posts
  • in reply to: use some code before output text #1409576

    Wow! Nice! Thank you very much!

    in reply to: use some code before output text #1409564

    It needs for fix hanging prepositions. prepositions — little words in russian. it using before words and when it last word in string it makes reading harder. i found this code here: https://qna.habr.com/q/282126
    it is php code.

    Sorry for delay.
    Check private field for site accesses.

    If you pleased I will expand the question.
    I need both dates under title: creation date and last modified date with little text before each.

    On screenshot under title is categories, but I’m not sure, possible i will hide it by theme blog setting (if it matter).
    what i need

    in reply to: sort the displayed articles by popularity #1403333

    @Guenni007 What is combo widget? How to use it?

    in reply to: recent posts from parent and same category #1403109

    i understand. but specific category is not good solution because when i have many articles or change category it will not be work correctly.
    May be you can tell me where (in which file) i can put some code (i will hire smb) to solve my problem?

    in reply to: sort the displayed articles by popularity #1402910

    Post views. We are using external counters, but it is difficult to use it with wortdpress core.

    I found a code for resolving my problem, bit i’m not sure hoe to use it correctly with Enfold. May be you can help me?

    To count the post views, the first thing you have to do is to add the following code to your WordPress Theme functions.php
    <?php
    /*
     * Set post views count using post meta//functions.php
     */
    function customSetPostViews($postID) {
        $countKey = 'post_views_count';
        $count = get_post_meta($postID, $countKey, true);
        if($count==''){
            $count = 0;
            delete_post_meta($postID, $countKey);
            add_post_meta($postID, $countKey, '1');
        }else{
            $count++;
            update_post_meta($postID, $countKey, $count);
        }
    }
    ?>
    And now we will call this function in the single.php to update the count value in the Database.
    <?php
        customSetPostViews(get_the_ID());//single.php
    ?>
    Now to show all the popular post in the descending order by post view count. use this code:
    <?php//popular post query
        query_posts('meta_key=post_views_count&posts_per_page=5&orderby=meta_value_num&
        order=DESC');
        if (have_posts()) : while (have_posts()) : the_post();
    ?>
        <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php
        endwhile; endif;
        wp_reset_query();
    ?>
    in reply to: how to put some code before title in a simgle post #1401777

    It works! Thank you very much!

    in reply to: how to put some code before title in a simgle post #1401763

    Hi, Mike! Thank you for your attention.
    With ALB no problem it works great with shortcode.

    Problem with classic editor. As I wrote I’m using general layout Logo And Main Menu at the left sidebar. This is importand as I understand, because when using general layout Logo And Main Menu at the Top Header your code works great. But I need to see breadcrambs before title with left sidebar general layout.

    I made 2 screenshots (changing general layout).
    general layout logo menu on top header https://i.postimg.cc/9RkFgjTr/for-breadcrambs.png — your code works perfectly, but i’m using another layout.
    general layout logo menu left sidebar https://i.postimg.cc/bdGvDscb/for-breadcrambs-no.png — your code not work, but needed.

    Please, help.

    in reply to: how to put some code before title in a simgle post #1401659

    I`ve tried to add code https://pastebin.com/2HHVQ9bs (from this topic) to functions.php of my child theme, but nothing happend.
    As I understand this code replacing default breadcrambs (BC) with Yoast BC, but with logo-menu in left-sidebar style default BC not showing and thats why nothing changed.
    May be possible to add little bit of code as I wrote in my first message of this topic?

    in reply to: cant open 2nd page of search results #1401020

    I downloaded the latest version of the theme and rewrote the files of what I had on top. I didn’t touch anything else.
    S/FTP details provided. Thank you for support!

    in reply to: cant open 2nd page of search results #1399555

    Just checking up. Do you have any ideas to fix the problem? Thank you.

    in reply to: cant open 2nd page of search results #1398747

    Yes, I wrote it in first message of this topic. plain links works perfectly. But what to do for fixing issue? No idea?
    Thank you very much for your attention. You are the best.

    in reply to: cant open 2nd page of search results #1397712

    Oh, guys. No, it is not showing correctly now.
    As i show you in video (reply February 5, 2023 at 5:24 pm) search results contained 2 pages. When you clicking to 2nd page it start to show 3 pages (because it still not search results page it became main page).
    You can check yourself: main page contained 3 pages. Search results of query “testovaia” contained 2 pages.
    See video. I can record one more if you need.

    in reply to: cant open 2nd page of search results #1397002

    sure. thank you!

    in reply to: cant open 2nd page of search results #1396764

    No, guys. You are wrong. Main page of the Enfold default little bit same as search results page.
    Let look closer. I put link to screencast video in private. This is problem of main theme. When you click to second page of search results you will come to 2nd page of main page, not to 2nd page of search results.

    in reply to: Search icon mobile version #1396673

    it works!
    thank you very much!

    in reply to: Search icon mobile version #1396662

    Please

    in reply to: Search icon mobile version #1396633

    Hi there!
    Thank you. It must be what I want.

    I add code (copying from forum, not email) both function and quick css. But something went wrong.

    May be it can help to understand what happend:

    I keep site with changes for your inspect.

    • This reply was modified 1 year, 10 months ago by mischael1.
    • This reply was modified 1 year, 10 months ago by mischael1.
    in reply to: cant open 2nd page of search results #1396498

    By the way. I found this bug years ago, when I first time buy your theme. This is not fresh issue.

    in reply to: cant open 2nd page of search results #1396497

    Yes, sure. You can do what you need.

    in reply to: cant open 2nd page of search results #1396364

    Yes, tried. Disabling all plugins dont resolve problem.

    • This reply was modified 1 year, 10 months ago by mischael1.
    in reply to: cant open 2nd page of search results #1396292

    done
    nothing happens. still showing main page — not 2nd page of search results

    in reply to: Search icon mobile version #1396255

    is there no way to put it on top with left sidebar logo layout?
    may be copy/paste some code from another layout?

    in reply to: Change post date from creation to editing #1341881

    yes, you are right! updated to 4.9, correct code.
    one more thing: I copied postslider.php file to \wp-content\themes\enfold-child\shortcodes\. Is it correct?

    in reply to: Change post date from creation to editing #1341826

    Need assistence. I havn`t this code in this file.
    You write i need to find
    $meta_content .= "<time class='slide-meta-time updated' {$markup}>" . get_the_time( get_option( 'date_format' ), $the_id ) . '</time>';
    But in my file is:
    $meta .= "<time class='slide-meta-time updated' $markup>" . get_the_time( get_option( 'date_format' ), $the_id ) . '</time>';
    Should I replace $meta with $meta_content or keep $meta ? And replace $markup with {$markup} or keep $markup ?

    • This reply was modified 2 years, 10 months ago by mischael1.
    in reply to: Make fields * required for images #1341822

    This is not good solution, but it works. Possible it will be usefull for somebody.
    In this code script every second checking fields alt and copyright and if one of them empty it disabling Insert button.
    Put it into \wp-admin\admin-footer.php

    <script>
    $(function(){
    
    setInterval(function(){
    		
    		var a = $('.compat-field-av_copyright_field input')
    		var b = $('#attachment-details-alt-text')
    		if(a[0].value === '' || b[0].value === '')
    			
    		     $('.media-toolbar-primary button').attr("disabled",true);
    		else if(a[0].value !== '' && b[0].value !== '')
    		     $('.media-toolbar-primary button').attr("disabled",false);
    
    }, 1000
    
    )
    }
    )
    </script>
    in reply to: Change post date from creation to editing #1341229

    Yes! It works! Thank you!
    But i see one more place, where posts still sowing ordered by creation date. https://disk.yandex.ru/i/hyOIpP8FtqioKQ ← main page – see privat field
    This is Blog Posts element of Advaced Editor. I used your trick for customizing order for this element by this code:

    if(!function_exists('avia_custom_query_extension'))
    {
        function avia_custom_query_extension($query, $params)
        {
            global $avia_config;
            if(!empty($avia_config['avia_custom_query_options']['order']))
            {
                $query['order'] = $avia_config['avia_custom_query_options']['order'];
            }
    
            if(!empty($avia_config['avia_custom_query_options']['orderby']))
            {
                $query['orderby'] = $avia_config['avia_custom_query_options']['orderby'];
            }
    
            unset($avia_config['avia_custom_query_options']);
    
            return $query;
        }
    
        add_filter('avia_masonry_entries_query', 'avia_custom_query_extension', 10, 2);
        add_filter('avia_post_grid_query', 'avia_custom_query_extension', 10, 2);
        add_filter('avia_post_slide_query', 'avia_custom_query_extension', 10, 2);
        add_filter('avia_blog_post_query', 'avia_custom_query_extension', 10, 2);
        add_filter('avf_magazine_entries_query', 'avia_custom_query_extension', 10, 2);
    
        add_filter('avf_template_builder_shortcode_elements','avia_custom_query_options', 10, 1);
        function avia_custom_query_options($elements)
        {
            $allowed_elements = array('av_blog','av_masonry_entries','av_postslider','av_portfolio','av_magazine');
    
            if(isset($_POST['params']['allowed']) && in_array($_POST['params']['allowed'], $allowed_elements))
            {
                $elements[] = array(
                    "name" => __("Custom Query Orderby",'avia_framework' ),
                    "desc" => __("Set a custom query orderby value",'avia_framework' ),
                    "id"   => "orderby",
                    "type" 	=> "select",
                    "std" 	=> "",
                    "subtype" => array(
                        __('Default Order',  'avia_framework' ) =>'',
                        __('Title',  'avia_framework' ) =>'title',
                        __('Random',  'avia_framework' ) =>'rand',
                        __('Date',  'avia_framework' ) =>'date',
                        __('Author',  'avia_framework' ) =>'author',
                        __('Name (Post Slug)',  'avia_framework' ) =>'name',
                        __('Modified',  'avia_framework' ) =>'modified',
                        __('Comment Count',  'avia_framework' ) =>'comment_count',
                        __('Page Order',  'avia_framework' ) =>'menu_order')
                );
    
                $elements[] = array(
                    "name" => __("Custom Query Order",'avia_framework' ),
                    "desc" => __("Set a custom query order",'avia_framework' ),
                    "id"   => "order",
                    "type" 	=> "select",
                    "std" 	=> "",
                    "subtype" => array(
                        __('Default Order',  'avia_framework' ) =>'',
                        __('Ascending Order',  'avia_framework' ) =>'ASC',
                        __('Descending Order',  'avia_framework' ) =>'DESC'));
            }
    
            return $elements;
        }
    
        add_filter('avf_template_builder_shortcode_meta', 'avia_custom_query_add_query_params_to_config', 10, 4);
        function avia_custom_query_add_query_params_to_config($meta, $atts, $content, $shortcodename)
        {
            global $avia_config;
            if(empty($avia_config['avia_custom_query_options'])) $avia_config['avia_custom_query_options'] = array();
    
            if(!empty($atts['order']))
            {
                $avia_config['avia_custom_query_options']['order'] = $atts['order'];
            }
    
            if(!empty($atts['orderby']))
            {
                $avia_config['avia_custom_query_options']['orderby'] = $atts['orderby'];
            }
    
            return $meta;
        }
    }
    

    //.
    But looks like it not work properly. If I using order_by Modified it sowing posts from 2020 max, but with order_by Default showing posts from 2021.
    Is it possible to make same changes for Blog Posts as we made for Magazine?

    p.s. I try to find same string in /enfold/config-templatebuilder/avia-shortcodes/BLOG/blog.php but i cant.

    in reply to: Change text on GDPR notification #1341094

    Yes it was changed in that section. Fixed. Thank you!

    in reply to: add wishlist button to products in grid. #748478

    Guys, you don`t understand me. Question is not about plugin.
    Question is HOW to ADD ANYTHING into your layout? There is can be text or picture.
    Don`t look at plugin it is just my privat wish.

    in reply to: add wishlist button to products in grid. #746966

    I want to add to the site to compile a list of goods that liked by the buyer.
    This is the plugin that I pointed out in a private part of the message. Button add products to the list displayed by the shortcode. I want to add it in one row with the “add to cart” and “show default” (see picture in my previous post). How can I do it?
    In the end, the question is: how to add shortcode in the row where the buttons of the product?

Viewing 30 posts - 1 through 30 (of 33 total)