Forum Replies Created
-
AuthorPosts
-
Wow! Nice! Thank you very much!
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.May 18, 2023 at 2:00 pm in reply to: move post date from post bottom to top after h1 post title #1407841Sorry 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).
@Guenni007 What is combo widget? How to use it?
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?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(); ?>
It works! Thank you very much!
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.
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?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!Just checking up. Do you have any ideas to fix the problem? Thank you.
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.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.sure. thank you!
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.it works!
thank you very much!Please
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.
By the way. I found this bug years ago, when I first time buy your theme. This is not fresh issue.
Yes, sure. You can do what you need.
Yes, tried. Disabling all plugins dont resolve problem.
- This reply was modified 1 year, 9 months ago by mischael1.
done
nothing happens. still showing main page — not 2nd page of search resultsis there no way to put it on top with left sidebar logo layout?
may be copy/paste some code from another layout?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?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, 8 months ago by mischael1.
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>
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.
Yes it was changed in that section. Fixed. Thank you!
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.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? -
AuthorPosts