Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1426823

    Hello, I’m sending a snippet from the loop-search file

    if( 'blog-meta-date' == avia_get_option( 'blog-meta-date' ) )
    						{
    							$meta_time  = '<time class="date-container minor-meta updated" ' . avia_markup_helper( array( 'context' => 'entry_time', 'echo' => false ) ) . '>';
    							$meta_time .=		get_the_time( get_option( 'date_format' ) );
    							$meta_time .= '</time>';
    
    							$meta_info['date'] = $meta_time;
    						}
    
    						if( get_post_type() !== 'page' && 'blog-meta-comments' == avia_get_option( 'blog-meta-comments' ) )
    						{
    							if( get_comments_number() != '0' || comments_open() )
    							{
    								$meta_comment = '<span class="comment-container minor-meta">';
    
    								ob_start();
    								comments_popup_link(
    												"0 " . __( 'Comments', 'avia_framework' ),
    												"1 " . __( 'Comment' , 'avia_framework' ),
    												"% " . __( 'Comments', 'avia_framework' ),
    												'comments-link',
    												__( 'Comments Disabled', 'avia_framework' )
    											);
    
    								$meta_comment .= ob_get_clean();
    								$meta_comment .= '</span>';
    
    								$meta_info['comment'] = $meta_comment;
    							}
    						}

    Now the structure is Date, separator, comments.
    I’m not sure how to change the structure to Category, Date, Author
    I would greatly appreciate your help.

    Best regards

    #1426876

    Hey nebuddlho,

    Thank you for the inquiry.

    You can try this filter in the functions.php file to adjust the order of the post meta info.

    
    add_filter('avf_post_metadata_array', function($meta, $context) {
        global $post;
    
        $cats = '';
    
        $excluded_taxonomies = array_merge( get_taxonomies( array( 'public' => false ) ), array( 'post_tag', 'post_format' ) );
    
        /**
         *
         * @since ????
         * @since 4.8.8						added $context
         * @param array $excluded_taxonomies
         * @param string $post_type
         * @param int $post->ID
         * @param string $context
         * @return array
         */
        $excluded_taxonomies = apply_filters( 'avf_exclude_taxonomies', $excluded_taxonomies, get_post_type( $post->ID ), $post->ID, 'loop-index' );
    
        if ( ! empty( $taxonomies ) ) {
            foreach ( $taxonomies as $taxonomy ) {
                if ( ! in_array( $taxonomy, $excluded_taxonomies ) ) {
                    $cats .= get_the_term_list( $post->ID, $taxonomy, '', ', ', '' ) . ' ';
                }
            }
        }
    
        $meta_cats  = '<span class="blog-categories minor-meta">' . __( 'in', 'avia_framework') . ' ';
        $meta_cats .=	trim( $cats );
        $meta_cats .= '</span>';
    
        $meta_info['categories'] = $meta_cats;
    
        $meta_author  = '<span class="blog-author minor-meta">' . __( 'by', 'avia_framework' ) . ' ';
        $meta_author .=		'<span class="entry-author-link" ' . avia_markup_helper( array( 'context' => 'author_name', 'echo' => false ) ) . '>';
        $meta_author .=			'<span class="author">';
        $meta_author .=				'<span class="fn">';
        $meta_author .=					get_the_author_posts_link();
        $meta_author .=				'</span>';
        $meta_author .=			'</span>';
        $meta_author .=		'</span>';
        $meta_author .= '</span>';
    
        $meta_info['date'] = $meta['date'];
        $meta_info['author'] = $meta_author;
        $meta_info['comments'] = '';
    
        return $meta_info;
    }, 10, 2);
    

    Best regards,
    Ismael

    #1426892

    Hello, thank you for the reply. I have tried adding the code but the meta information in search results is still the same.

    #1427092

    Hi,

    Thank you for the update.

    We may need to access the site in order to properly test the modification. Please provide the login details in the private field and make sure that the Appearance > Theme File Editor is accessible.

    Best regards,
    Ismael

    #1427140

    I am sending the details below

    #1427195

    Hi,

    Thank you for the info.

    Please provide the login details in the private field and make sure that the Appearance > Theme File Editor is accessible.

    The Appearance > Theme File Editor is not accessible, so we’re not able to edit the functions.php file. Please enable the editor back so that we can test the modification further. The documentation below should help.

    // https://developer.wordpress.org/apis/wp-config-php/#disable-the-plugin-and-theme-file-editor

    You should set DISALLOW_FILE_EDIT to false.

    define( 'DISALLOW_FILE_EDIT', false );
    

    Best regards,
    Ismael

    #1427234

    I am not sure how to enable the editor as the function is not doing anything, I will attach ftp details

    #1427524

    Hi,

    Thank you for the info.

    The S/FTP account seems to be invalid. Please try to edit the wp-config.php file, then add this code around line 66.

    define( 'DISALLOW_FILE_EDIT', false );
    

    Just below this line.

    $table_prefix = 'wp_';
    

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.