Forum Replies Created
-
AuthorPosts
-
Philippe LemoineParticipant
Nevermind, it works now. I think it’s because I hadn’t activated my license in the dashboard that it didn’t work before.
Philippe LemoineParticipantFor the record, the error message I get when I try to update the plugin in WordPress’s dashboard is something like “the update failed: no update archive is available” (I’m translating from the French).
Philippe LemoineParticipantI actually resolved the problem on my own, using the query parameter. In case someone might want to do the same thing, here is the code of my version of archive.php, which uses the Grid widget to display the posts in categories, tags and authors.
<?php /** * The template for displaying Archive pages. * * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package vantage * @since vantage 1.0 * @license GPL 2.0 */ get_header(); ?> <section id="primary" class="content-area">
<header class="page-header"> <h1 id="page-title"><?php if( siteorigin_page_setting( 'page_title' ) ) { echo vantage_get_archive_title(); } ?></h1> <?php if ( is_category() ) { // show an optional category description $category_description = category_description(); if ( ! empty( $category_description ) ) echo apply_filters( 'vantage_category_archive_meta', '' . $category_description . '' ); } elseif ( is_tag() ) { // show an optional tag description $tag_description = tag_description(); if ( ! empty( $tag_description ) ) echo apply_filters( 'vantage_tag_archive_meta', '' . $tag_description . '' ); } else { $description = term_description(); if ( ! empty( $description ) ) echo apply_filters( 'vantage_taxonomy_archive_meta', '' . $description . '' ); } ?> </header><!-- .page-header --><?php if ( is_category() ) { $taxonomy = 'category'; $tax_name = single_cat_title( '', false ); } elseif ( is_tag() ) { $taxonomy = 'post_tag'; $tax_name = single_tag_title( '', false ); } elseif ( is_author() ) { $author = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); $query = 'author=' . $author->ID; }; echo do_shortcode('[siteorigin_widget class="LSOW_Portfolio_Widget"]<input type="hidden" value="{"instance":{"title":"","heading":"","heading_url":"","header_template":"block_header_1","block_type":"block_grid_6","posts":"post_type=post&tax_query=' . $taxonomy . ':' . $tax_name . '&date_type=specific&date_query={\"after\":\"\",\"before\":\"\"}&date_query_relative={\"from\":{\"value\":0,\"unit\":\"days\"},\"to\":{\"value\":0,\"unit\":\"days\"}}&orderby=date&order=DESC&additional=' . $query . '","taxonomy_filter":"' . $taxonomy . '","settings":{"layout_mode":"fitRows","pagination":"load_more","image_linkable":true,"image_size":"post-thumbnail","enable_lightbox":true,"post_data":{"display_title_on_thumbnail":true,"display_title":true,"display_summary":true,"excerpt_length":25,"post_meta":{"display_author":true,"display_post_date":true,"display_taxonomy":true,"so_field_container_state":"open","display_comments":false},"so_field_container_state":"open","display_taxonomy_on_thumbnail":false,"display_read_more":false},"per_line":2,"gutter":20,"responsive":{"tablet":{"gutter":10,"width":800,"so_field_container_state":"open"},"mobile":{"gutter":10,"width":480,"so_field_container_state":"open"},"so_field_container_state":"open"},"so_field_container_state":"open","filterable":false,"show_remaining":false,"post_link_new_window":false},"_sow_form_id":"1947376845aaa4a22a4b57623423779","_sow_form_timestamp":"1521462597114"},"args":{"before_widget":"","after_widget":"<\/div>","before_title":"<h3 class=\"widget-title\">","after_title":"<\/h3>","widget_id":"widget-0-0-2"}}" />[/siteorigin_widget]'); ?><!-- #content .site-content --> </section><!-- #primary .content-area --> <?php get_sidebar(); ?> <?php get_footer(); ?>I’ll change the status of this thread to “resolved”.
March 19, 2018 at 11:47 am in reply to: Use a post's Youtube video's preview image in Grid widget #29595Philippe LemoineParticipantThanks, this will do.
Philippe LemoineParticipantNevermind, I found another, better option for now, using the Grid widget.
Philippe LemoineParticipantP. S. I would also like to know how to center the title of the Posts Block if I want to. Right now it’s left-aligned, but I would like to try it when it’s center-aligned. Thanks in advance!
-
AuthorPosts