Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1360786

    Hello
    when i call “Category Opera” i see posts from “Category Opera” BUT i see also “Impress”, “GDPR-Declaration” and about ten other posts which dont belong to the “Category Opera”.
    In fact: “Impress” and “GDPR” are not even posts – they are pages.

    I created a page called “Opera”
    I added the masonry element
    I picked “Show posts from Category”–> “Opera”

    [av_masonry_entries link='category,1' wc_prod_visible='' wc_prod_hidden='hide' wc_prod_featured='' prod_order_by='' prod_order='' date_filter='' date_filter_start='' date_filter_end='' date_filter_format='yy/mm/dd' period_filter_unit_1='1' period_filter_unit_2='year' sort='yes' query_orderby='date' query_order='DESC' caption_elements='title excerpt' caption_styling='' caption_display='always' size='fixed masonry' orientation='' image_size='masonry' gap='large' columns='2' av-medium-columns='' av-small-columns='' av-mini-columns='' items='12' paginate='load_more' color='' custom_bg='' overlay_fx='grayscale' animation='active' img_scrset='' lazy_loading='enabled' id='' custom_class='' template_class='' av_uid='av-l6gb8e5x' sc_version='1.0']

    This is the content of my functions:

    <?php
    //$avia_config['imgSize']['square-custom'] = array('width'=>300, 'height'=>300); // small image for blogs
    //$avia_config['imgSize']['square2'] = array('width'=>400, 'height'=>400); // small image for blogs
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */
    function enqueue_parent_theme_style() {
          wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style');
    
    /* Proper way to enqueue styles and scripts
     */
    function theme_name_scripts() {
    	wp_enqueue_style( 'style-name', get_stylesheet_uri() );
    }
    add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
    
    /* Activate Avia debug mode */
    add_action('avia_builder_mode', "builder_set_debug");
    function builder_set_debug()
    {
    	return "debug";
    }
    add_filter( 'widget_text', 'do_shortcode' );
    
    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
    if ( $args['title'] == 'Blog - Aktuelle Neuigkeiten' )
    {
    $args['title'] = get_the_title($id);
    $args['link'] = get_permalink($id);
    $args['heading'] = 'h1';
    }
    
    return $args;
    }
    

    I can solve it by deleting the “wrong pages”, than flushing the permalinks, then adding the pages again (best with a new slug).
    But is only possible with a small number of pages

    I cant not show you live since i am an Xampp.

    Eva Simone

    • This topic was modified 2 years, 4 months ago by evas49.
    • This topic was modified 2 years, 3 months ago by Mike.
    #1361200

    Hi evas49,

    We apologize for the delayed response.
    I can’t seem to reproduce the same issue on my end.
    Can you try switching to the parent theme? and see if it helps fix the issue.
    Also, try deactivating plugins and see if it may be caused by some plugin conflict.

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Posts in wrong category’ is closed to new replies.