Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter progonkpa

    (@progonkpa)

    The child post did not have a ToC and had ToC disabled in its post, however the behavior was identical, meaning the table of contents (from parent) got appended at the start of the inserted post, instead of at the top of at the top of the parent post.

    Thread Starter progonkpa

    (@progonkpa)

    I sure can.

    {
        "fragment_prefix": "i",
        "position": "top",
        "start": "2",
        "show_heading_text": "1",
        "heading_text": "Contents",
        "enabled_post_types": {
            "post": "post",
            "page": "page",
            "custom_css": "custom_css",
            "documentaries": "documentaries"
        },
        "auto_insert_post_types": {
            "post": "post",
            "page": "page",
            "custom_css": "custom_css",
            "documentaries": "documentaries"
        },
        "show_hierarchy": "1",
        "counter": "decimal",
        "smooth_scroll": "1",
        "smooth_scroll_offset": "30",
        "width": "100%",
        "width_custom": "275",
        "width_custom_units": "px",
        "wrapping": "none",
        "title_font_size": "120",
        "title_font_size_units": "%",
        "title_font_weight": "500",
        "font_size": "95",
        "font_size_units": "%",
        "theme": "transparent",
        "custom_background_colour": "#fff",
        "custom_border_colour": "#ddd",
        "custom_title_colour": "#999",
        "custom_link_colour": "#428bca",
        "custom_link_hover_colour": "#2a6496",
        "custom_link_visited_colour": "#428bca",
        "lowercase": "1",
        "heading_levels": {
            "2": "2",
            "3": "3",
            "4": "4",
            "5": "5",
            "6": "6"
        },
        "css_container_class": "",
        "toc_loading": "js",
        "child_font_size": "90",
        "child_font_size_units": "%",
        "visibility": "1",
        "sticky-toggle-width": "auto",
        "sticky-toggle-height": "auto",
        "sticky-toggle-open-button-text": "Index",
        "heading-text-direction": "ltr",
        "fixedtoc": "0",
        "highlightheadings": "0",
        "shrinkthewidth": "0",
        "custom_para_number": "1",
        "heading_text_tag": "p",
        "counter-position": "inside",
        "sticky-toggle-position": "left",
        "sticky-toggle-alignment": "top",
        "headings-padding-top_units": "px",
        "headings-padding-bottom_units": "px",
        "headings-padding-left_units": "px",
        "headings-padding-right_units": "px",
        "sticky-toggle-width-custom": "",
        "sticky-toggle-height-custom": "",
        "headings-padding-top": "0",
        "headings-padding-bottom": "0",
        "headings-padding-left": "0",
        "headings-padding-right": "0",
        "exclude": "",
        "mobile_smooth_scroll_offset": "0",
        "restrict_path": "",
        "widget_affix_selector": "",
        "visibility_on_header_text": "0",
        "visibility_hide_by_default": "0",
        "toc-run-on-amp-pages": "0",
        "sticky-toggle": "0",
        "sticky-toggle-open": "0",
        "sticky-toggle-close-on-mobile": "0",
        "sticky-toggle-close-on-desktop": "0",
        "toc_wrapping": "0",
        "headings-padding": "0",
        "hyphenate": "0",
        "include_homepage": "0",
        "include_category": "0",
        "include_product_category": "0",
        "exclude_css": "0",
        "inline_css": "0",
        "add_request_uri": "0",
        "remove_special_chars_from_title": "0",
        "mediavine-create": "0",
        "goodlayers-core": "0"
    }
    

    I removed the post with the video, however, the video is still available here.

    I also tested some more, this time with a child post without a ToC and with ToC disabled in the post settings, however, the behavior is identical as before, somewhat to my surprise πŸ™‚

    Thread Starter progonkpa

    (@progonkpa)

    Here’s a video of the issue.

    Thread Starter progonkpa

    (@progonkpa)

    Of course @magazine3

    The name of the plugin is ‘Insert Pages’.

    Thread Starter progonkpa

    (@progonkpa)

    Edit: delete and re-install Polylang solved the issue for me.

    I have the same issue, had to disable polylang to stay online.

    Here is the output of wp_debug.

    Fatal error: Uncaught Error: Class "PLL_Lingotek" not found in /home/wicked1q/public_html/wp-content/plugins/polylang/modules/lingotek/load.php:13 Stack trace: #0 /home/wicked1q/public_html/wp-content/plugins/polylang/include/class-polylang.php(247): require_once() #1 /home/wicked1q/public_html/wp-includes/class-wp-hook.php(308): Polylang->init() #2 /home/wicked1q/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #3 /home/wicked1q/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #4 /home/wicked1q/public_html/wp-settings.php(480): do_action() #5 /home/wicked1q/public_html/wp-config.php(95): require_once('/home/wicked1q/...') #6 /home/wicked1q/public_html/wp-load.php(50): require_once('/home/wicked1q/...') #7 /home/wicked1q/public_html/wp-admin/admin.php(34): require_once('/home/wicked1q/...') #8 /home/wicked1q/public_html/wp-admin/plugins.php(10): require_once('/home/wicked1q/...') #9 {main} thrown in /home/wicked1q/public_html/wp-content/plugins/polylang/modules/lingotek/load.php on line 13
    
    Notice: Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/wicked1q/public_html/wp-includes/functions.php on line 5835
    
    Notice: Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/wicked1q/public_html/wp-includes/functions.php on line 5835
    
    There has been a critical error on this website. Please check your site admin email inbox for instructions.
    

    Some say “check your e-mail” but I receive none for this error.

    • This reply was modified 3 years, 4 months ago by progonkpa.
    • This reply was modified 3 years, 4 months ago by progonkpa.
    Thread Starter progonkpa

    (@progonkpa)

    I read your message and appreciate the feedback.

    I’d like to go through the troubleshoot together but don’t have the time the next few days.

    I’ll reply again when things ease down around here. I hope that’s ok.

    • This reply was modified 3 years, 5 months ago by progonkpa.

    I confirm that rolling back to 3.0.8 is a functional workaround.
    I used WP Rollback plugin for that.

    • This reply was modified 3 years, 10 months ago by progonkpa.
    Thread Starter progonkpa

    (@progonkpa)

    This line
    if (strpos($_REQUEST['cat'], ','))

    Needs to become
    if (isset($_REQUEST['cat']) && strpos($_REQUEST['cat'], ','))

    Thread Starter progonkpa

    (@progonkpa)

    Wow @rickymccallum87, that’s it πŸ™‚
    Tested and working.

    Afaik, these are all possible scenarios.
    http://localhost/?cat=cat1,cat2
    http://localhost/category/cat1,cat2/
    http://localhost/category/cat1/cat2/

    So I refactored the code to cover all scenarios.

    add_filter('get_the_archive_title', 'wpsf_multiple_categories_title', 10, 3);
    function wpsf_multiple_categories_title($title, $original_title, $prefix)
    {
        $cats_query_data = get_categories_query_data();
    
        if (!$cats_query_data['separator'])
            return $original_title;
    
        $category_slugs = explode($cats_query_data['separator'], $cats_query_data['args']);
        // Convert category slugs to title case category names
        $category_names = array_map(function ($slug) {
            return get_term_by('slug', $slug, 'category')->name;
        }, $category_slugs);
    
        return implode(', ', $category_names);
    }
    
    function get_categories_query_data(): array
    {
        if (!is_category())
            return ['separator' => 0];
    
        if (strpos($_REQUEST['cat'], ','))
            return ['separator' => ',', 'args' => $_REQUEST['cat']];
    
        global $wp_query;
        $category_name_args = $wp_query->query['category_name'];
    
        if (strpos($category_name_args, ',')) {
            return ['separator' => ',', 'args' => $category_name_args];
        } elseif (strpos($category_name_args, '/')) {
            return ['separator' => '/', 'args' => $category_name_args];
        } else {
            return ['separator' => 0];
        }
    }
    Thread Starter progonkpa

    (@progonkpa)

    Thanks @rickymccallum87, I wasn’t aware of this option. It works indeed as you described. It shows all posts from multiple categories while WP only displays the title of the first category.

    Adding to that, it only works in the plain permalink structure. It does not work with post name as permalink structure. At least that was what I saw when I tried.

    @soberbanda Child categories is something that would show all posts of all child categories but that isn’t my use case. One can go this route as a workaround but I will not go there as it will add unacceptable complexity imo πŸ™‚

    Thanks guys for the input. This functionality is not urgent atm. When I need it, I’ll create it.

    Thread Starter progonkpa

    (@progonkpa)

    @soberbanda sure.

    When you click a category, you see all the posts from the category you clicked.
    But what if you want to display the posts from 2 or more categories?
    How can one do that?

    I was hoping that WordPress provided a way to do that, that’s what I was talking about with my example localhost/?cat=1&cat=2.

    If WordPress doesn’t have a way of doing this, one can always fall back on plugins (recommendations?) or coding it.

    Thread Starter progonkpa

    (@progonkpa)

    I confirmed it works on a fresh install.

    A suggestion, perhaps it’s better to not nest the input and pull it up one level higher in the HTML because it fiddles with the default layout it seems.

    View post on imgur.com

    Kr,

    Thread Starter progonkpa

    (@progonkpa)

    I noticed now when I’m logged in as admin on the reading page (not edit UI), the checkbox is visible.
    While as anonymous user, I see a checkbox talking about comment form cookies.
    Does that ring a bell for you somewhere?

    Thread Starter progonkpa

    (@progonkpa)

    That video was surprisingly entertaining πŸ˜€

Viewing 15 replies - 1 through 15 (of 21 total)