AndreasJa
Forum Replies Created
-
Forum: Plugins
In reply to: [Super Page Cache] Fallback cacheOk perfect, thank you for your fast responds @isaumya and an awesome plugin! Thanks.
Thank you @codeamp for the answer.
I ended up making the changes directly in the plugin code. Even though it’s not “update proof” it will work for now ??
If anyone else want to know:
Go to: wp-content\plugins\custom-layouts\includes\template\elements
-> class-custom-field.php
-> row 83 change to be:
$target = ' target="_blank" rel="nofollow noopener sponsored"';
Hello again! Are there no solution for this? Thank you in advance.
Forum: Plugins
In reply to: [Custom Layouts - Post + Product grids made easy] Order by Custom FieldMany thanks for the help Ross! This works great and I will mark as resolved, thanks again.
I saw your question here I hope It’s ok that I answer you. I do this a lot in my layouts/templates, so hope this helps:
– Set the custom field to be “Field Type: Url” in ACF.
– In your Custom Layouts Template:
+ Add element “Custom Field”
+ Set “Custom Field” to be be your custom field (search for it, should be without _ in the start)
+ Set “Data type” to be “Link”
+ Set “Label” to be your link text, for instance “Click”.Forum: Plugins
In reply to: [Custom Layouts - Post + Product grids made easy] Order by Custom FieldSo, I came up with a workaround by adding the custom field “list_number” to regual Posts as well and gave the field a Default Value “0” in ACF, and then used
$query_args[ 'orderby' ] = 'meta_value_num date';
to order by date when all the posts have the same number.Now the custom post types Products, Gifts, Toplists will order by the numbers I give them, and posts will order by date.
function layout_query_args( $query_args ) { // Modify the query args $query_args[ 'meta_key' ] = 'list_number'; $query_args[ 'orderby' ] = 'meta_value_num date'; $query_args[ 'order' ] = 'DESC'; // Always return in WP filters return $query_args; } add_filter( 'custom-layouts/layout/query_args', 'layout_query_args', 10 );
But, is there another better way to do this or should I stick with this solution? Thanks!
Forum: Plugins
In reply to: [Custom Layouts - Post + Product grids made easy] Order by Custom FieldHello!
Thank you for the reply and help.
I use ACF and I create the layouts via admin pages and insert shortcodes.
I tried it but as you said it applied to all my layouts and the one that do not have the custom field “list_number” did not show any content at all.
—–
Will try to explain how I use it, it’s on localhost right now so can’t show you.I have three custom post types called Products, Gifts, and Toplists. These are for products (a little bit like thisiswhyimbroke.com) and I use your plugin to display the products with different custom fields. (I will buy your search and filter plugin too soon to use on some places on the website)
But I also use your plugin to display regual post grids.
The “Products”, “Gifts” and “Toplists” custom post type grids I would like to orderby the custom field “list_number”, #1,#2,#3 etc.
But the regual grids with posts I want to order by Published Date. If this is possible.
I tried
function layout_query_args( $query_args ) { // Modify the query args $query_args['post_type'] = array( 'products', 'gifts', 'toplists' ); $query_args[ 'meta_key' ] = 'list_number'; $query_args[ 'orderby' ] = 'meta_value_num'; $query_args[ 'order' ] = 'DESC'; // Always return in WP filters return $query_args; } add_filter( 'custom-layouts/layout/query_args', 'layout_query_args', 10 );
and
function layout_query_args( $query_args ) { // Modify the query args global $post; if ( $post->post_type == 'products', 'gifts', 'toplists' ) { $query_args[ 'meta_key' ] = 'list_number'; $query_args[ 'orderby' ] = 'meta_value_num'; $query_args[ 'order' ] = 'DESC'; } // Always return in WP filters return $query_args; } add_filter( 'custom-layouts/layout/query_args', 'layout_query_args', 10 );
But that did not work.
Hope you understood my long text, and thank you again for the help!
Forum: Themes and Templates
In reply to: [Griffin] Theme not loading correctlyI have the same problem too.
I have noticed that when im browsing my site in incognito mode, the problem appears 100% of the times. But when im browsing ‘normal’ it never appears for me. So it seems that once Ive visited the site it is normal, but for a “new” user the overlapping occurs the first visit.
Any ideas? ??
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Problem with ALM gridI fixed it, dont really know what I did.. but it works ??
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Problem with ALM gridI totally understand! Can I email you the login? ?? Thanks
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Problem with ALM gridOkey, thanks ??
I tried to remove
<div id="teaser-holder" class="row">
completly, but it didnt work.How to make it the wrapper for the ajax load more content? I tried to put it in ajax-load-more.php at
"$ajaxloadmore = '<div id="ajax-load-more" class="...."
But it still breaks the row.Thanks for your help!
Forum: Plugins
In reply to: [Social Shares] Display in a Posts meta-data?I think i solved it. It works, but i dont know if its the right way to do it.
I used this code in my index.php where i wanted the “XX shares” to display.
<?php $meta_values = get_post_meta( $id, 'shares', true ); ?> <?php if ( get_post_meta( $id, 'shares', true ) ) : ?> <?php echo get_post_meta ( $id, 'shares', true ) . ' shares';?> <?php endif; ?>
Forum: Plugins
In reply to: [Kebo Social] Kebo Social not displaying social counts.Hi Peter!
I really love the plugin, very nice and clean look ??
But im having the same problem as n3ko, the social counts doesnt appear. Is there anyway to resolve this problem? I really want to use the plugin, but i need the count :/
Thanks!
/Andreas