[Resolved] Blog Settings

Home Forums Support [Resolved] Blog Settings

Home Forums Support Blog Settings

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

    I have been eliminating a lot of redundant and unnecessary code, and it looks like my blog got messed up somehow. Please help me with the following:

    For the blog page, I want the post date, by line, and categories showing underneath the title (which is how it currently displays). The problem that I have is that the category also displays below the meta items on the blog post. I do not know how to remove this. You can see my blog settings here https://www.savacations.com/wp-content/uploads/2021/10/Blog-Page-Setup.jpg

    Additionally, the search icon widget is showing on two lines and I don’t know how to fix it.

    For the single posts, everything is mostly fine, but the categories are appearing on the meta line below the title (as I want it) and at the bottom of the post above the tags (which I don’t want). See here for an example https://www.savacations.com/where-to-stay-in-santiago-chile-centro-providencia-or-las-condes/.

    For the archives (author, category, and tag), it’s the same as the blog page above. See here for an example https://www.savacations.com/category/south-america-travel/.

    I am using the following snippets that I got from this forum over time…

    For the archive pages

    add_filter( 'generate_header_entry_meta_items', function() {
        return array(
            'date',
            'author',
    		'categories',
        );
    } );

    For the single posts

    // set entry header post meta
    add_action( 'wp', function() {
        if ( is_single() ) {
    
            add_filter( 'generate_header_entry_meta_items', function( $items ) {
                return array(
                    'date',
                    'author',
                    'categories',
                );
            } );
        }
    } );

    I tried to use the option_generate_blog_settings (which may fix all of my problems) but got an error on line 3 code see here https://www.savacations.com/wp-content/uploads/2021/10/Option-Generate-Blog-Settings.jpg

    Thanks,

    #1952496
    Ying
    Staff
    Customer Support

    Hi Alan,

    The problem that I have is that the category also displays below the meta items on the blog post. I do not know how to remove this

    Your screenshot shows the Display Categories box is checked, you just need to uncheck it:
    https://www.screencast.com/t/f0sAiWmMfN

    the search icon widget is showing on two lines

    It’s caused by this CSS, can you check if you added it anywhere in your site?
    https://www.screencast.com/t/42WZyCrZ9

    #1952550
    Alan

    If I uncheck the categories box, it disappears everywhere. See here https://www.savacations.com/wp-content/uploads/2021/10/Unchecked-categories-box.jpg.

    Any reason I am getting an error message on line 3 for the generate_blog_settings snippet?

    Also, if I remove that css, it affects the trustpilot box on this and all itineraries https://www.savacations.com/tours/quito-8-day-galapagos-seaman-journey-cruise-northern-southern-islands/ (see below the Why Book with Us? widget box on right hand side).

    #1952599
    Ying
    Staff
    Customer Support

    If I uncheck the categories box, it disappears everywhere.

    I see, then add this snippet as well:

    add_filter( 'generate_footer_entry_meta_items', function() {
        return '';
    } );

    Any reason I am getting an error message on line 3 for the generate_blog_settings snippet?

    I don’t seem to see an error, it looks right to me. Can you copy and paste the entire code snippet here?

    I’m not sure this CSS affects the link you shared at all, since this page is set to no sidebar, I don’t see the sidebarclass on this page:

    .sidebar .widget :last-child {
        margin-bottom: 1.5em;
    }

    https://www.screencast.com/t/HPmLOFsgSD2

    #1952616
    Alan

    This is the code snippet…

    add_filter( 'option_generate_blog_settings', 'lh_custom_search_results_page_settings' );
    function lh_custom_search_results_page_settings( $options ) {
        if ( is_search() ) {
    	$options['read_more_button'] = true;
    	$options['date'] = true;
    	$options['categories'] = true;
    	$options['tags'] = true;
    	$options['comments'] = false;
            $options['infinite_scroll'] = true;
    	$options['infinite_scroll_button'] = true;
    	$options['masonry_load_more'] = 'More search results';
    	$options['post_image'] = true;
    	$options['post_image_position'] = 'post-image-above-header';
    	$options['post_image_alignment'] = 'post-image-aligned-center';
    	$options['column_layout'] = false;
    	$options['featured_column'] = true;
    	$options['masonry'] = false;
        }
      
        return $options;
    }
    #1952638
    Ying
    Staff
    Customer Support

    Just tested this code on 3 or my sites, all of them are activated successfully.
    https://www.screencast.com/t/Mt5TupKuW8w

    Can not replicate this issue on my side.

    Can you try disable all other plugins except GP premium to test?

    Let me know 🙂

    #1953837
    Alan

    Ok, I will need to speak with my developer about these issues…

    Thanks,

    #1953852
    Ying
    Staff
    Customer Support

    No problem 🙂

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