Javascript – Use the Dropbox API to retrieve the latest file from the Github Pages site

I am currently trying to use the Dropbox API in a Github Web site to retrieve the most recent file in Dropbox and use its title to change the CSS background color. However, I can not figure out how to write the js to use the Dropbox API. I have the access token that I replaced in the code I specified with Insert_Access_Token_Here. The following is a test that should print my files in the console, but not. Can anyone tell me from scratch how to use the Dropbox API to at least get the name of the latest file? Many thanks


The error message I keep getting in the console is

net :: ERR_ABORTED 404

SEO – Google Search Console Error – Product pages with a product filter

OVERVIEW: I am using a product filter on my WORDPRESS website so that a user can search by brand / model / year / gear / drive / weight / etc.
(This is not a question for a plug-in developer, this is a Google bug / SEO question.)

I use a third-party website to enter product details such as gear, brand, model, and so on. Then this vehicle / product will be displayed on my website. Any changes to a vehicle / product will be made through a third-party website, not through my live website.

There are about 300 different products.

All product pages are given the path / products / in the URL, eg. B .: www.mywebsite.com/products/

This is how each product page looks like: www.mywebsite.com/products/2020-chevrolet-400s-2×2 www.mywebsite.com/products/2020-ford-300t-4×4 etc …

PROBLEM: Google Search Console displays multiple product pages as errors. Some come as a "404" error, but the page is live. Other errors such as "Submitted URL has a crawl issue". Again, the page is live.

I can use the Yoast plug-in to prevent the / products / folder from being indexed, but I'm not sure if this is a good idea.

Any suggestions?

Buffer Overflow – How are stack cans filled with unmapped pages?

I've read the Wikipedia article on the subject and it says that when you start a program, the canary is randomly calculated and stored in a local variable (which I assume was introduced by the compiler) filled by unassigned pages but I have problems understanding what that means. Is it because this global variable is mapped to a page other than the program's and therefore has different access flags? If not, why can not an attacker take a look at this value?

Upholstery setting for pages and posts (left and right side)

I have a question about adjusting left and right spacing for the content area of ​​all pages and posts on my WordPress site. I'd like to increase the spacing on the left and right sides of the content area of ​​each page / post on my site so that each section of text is narrower / less wide and therefore more readable.
Any support you can provide would be greatly appreciated!

Permalinks – Create an archive of category subcategories for custom post pages that differentiate between CPT

I have a problem, I have 4 different custom post types
readymade_public
readymade_private
collections_public
collections_private

And the structure is about like that
will work in a similar way

example.com/client-area/readymade/cushions/velvet-touch/z93 <- this will be a readymade_private CPT, the link will be created from client-area / readymade /% category% /% postname%, so cushions and velvet Touch are categories, Velvet-Touch is a sub category of pillows

example.com/client-area/readymade/cushions/velvet-touch/ <-an archive with a list of pages with the velvet-touch category that also belong to the CPT readymade_private, as the categories are shared with readymade_public.

example.com/client-area/readymade/cushions/ <- an archive with a list of all subcategories of pillows

example.com/client-area/readymade/ <- This will be a page, since readymade will only have cushions and tabletops, so I can do this with a static page

Keep in mind that this structure will be repeated, but without client scope and with the CPM of readymade_public, since everything will be private, but in public there will be a selection of duplicates of private (I do that with templates and acf When I create a public page, I only have one field in which I select the private equivalent and get the data from there, I know that this is a bit strange, but it has to be yes or yes with that structure.

There are also collections that work like Readymade, but for example have a jump less
example.com/client-area/collections/decoration/sevilla <- that would be collections_private and decoration is the% category%. In this case, there are no subcategories, but there are also duplicates without the client area that uses collection_public's CPT

What is the right way to create this structure? I mean, like the "list" archive pages that differentiate between CPT and even one that lists its own subcategories, I remember that I do not use a custom taxonomy by using the category taxonomy and adding it to the permalinks of CPT by I use the custom post type Permalinks plugin
I already have the permalink for the CPT of each category, and I even have a template that would loop the list of CPTs if you give them a CPT name and a category ID

Theme Development – Custom post pages use the correct template in preview mode, but display a different template after posting

I developed a WordPress theme. I've created a custom post type called functions.php called blog.

// Blog Post Type Creation
function te_blog_type() {
    register_post_type("blog",
        array(
            "rewrite" => array("slug" => "blogs"),
            "labels" => array(
                "name" => "Blogs",
                "singular_name" => "Blog",
                "add_new_item" => "Add New Blog",
                "edit_item" => "Edit Blog"
            ),
            "menu-icon" => "dashicons-format-status",
            "public" => true,
            "has_archive" => true, 
            "supports" => array(
                "title", "thumbnail", "editor", "excerpt", "comments"
            ),
            "taxonomies" => array("category", "post_tag", "blog_tag")
        )
    );
}

add_action("init", "te_blog_type");

It worked well.

I've also created a single-blog.php file as a template for each blog post.
When I preview the blog post. It uses the right template from single-blog.php. However, when I post a blog, index.php appears as a template. What caused that?

Database – pages from custom table

I have custom table "catalog" in WordPress database:

id|name|description|slug|price

I have a catalog template file and a catalog page where I show all the articles in the catalog table. But how can I display a single item from this list as a page?

domain.dev/catalog/ (this part works)
domain.dev/catalog/my-single-item-page (I can not figure out how to do it to work)

How can I use my-single-article-page as a dynamic variable?

slug = "my-individual-article-page";

I have this snippet in my file functions.php

    function add_query_vars_catalog_item_filter( $vars ) {
        $vars() = "catalog_item";
        return $vars;
    }
    add_filter( 'query_vars', 'add_query_vars_catalog_item_filter' );

    function catalog_rewrite() {
        add_rewrite_rule('^catalog/((w-)+)/?', 'index.php?pagename=catalog&catalog_item=$matches(1)', 'top');
    }
    add_action('init', 'catalog_rewrite');

but if I go to domain.dev/catalog/some-my-item, I have 404 page

I use this custom table because I generate form CSV. And in the future it will be easier to regenerate data

php – Use wc_enqueue_js only on specific pages

In my plugin, I try to add inline scripts with wc_enqueue_js only on the car side. The rest of the plugin is only executed on the shopping cart page.

The following code works fine, but I do not like the fact that I have to repeat if (! is_cart() ) return;, This may not look like a big problem, but my other plugin with a similar problem has several condition lines that depend on what the user selected in the plugin settings and that are mixed with multiple actions:

// Run plugin.
add_action( 'template_redirect', function() use ( $args ) { ajax_cart_autoupdate( $args ); });
function ajax_cart_autoupdate( $args ) {    
    if (! is_cart() ) return; // Only if it's a cart page.  
    // Do stuff.    
}

// Enqueue js script inline using wc_enqueue_js.
add_action( 'template_redirect', function() use ( $args ) { acau_enqueue_script ( $args ); });
function acau_enqueue_script( $args ) { 
    if (! is_cart() ) return; // Only if it's a cart page.  
    wc_enqueue_js( '    
        <<>>
    ' );    
}

The following does not work – the inline script does not appear in the HTML:

// Run plugin.
add_action( 'template_redirect', function() use ( $args ) { ajax_cart_autoupdate( $args ); });
function ajax_cart_autoupdate( $args ) {
    if (! is_cart() ) return; // Only if it's a cart page.
    // Enqueue js script inline using wc_enqueue_js.
    add_action( 'template_redirect', function() use ( $args ) { acau_enqueue_script ( $args ); });
    // Do stuff.    
}

function acau_enqueue_script( $args ) { 
    wc_enqueue_js( '    
        <<>>
    ' );    
}

The following works, but the inline script appears twice in the HTML code (one script just below the other). When I say echo 'test'; in the first line of the function acau_enqueue_script, it only appears once on the page:

// Run plugin.
add_action( 'template_redirect', function() use ( $args ) { ajax_cart_autoupdate( $args ); });
function ajax_cart_autoupdate( $args ) {
    if (! is_cart() ) return; // Only if it's a cart page.
    // Enqueue js script inline using wc_enqueue_js.
    add_action( 'wp_enqueue_script', function() use ( $args ) { acau_enqueue_script ( $args ); });
    // Do stuff.    
}

function acau_enqueue_script( $args ) { 
    wc_enqueue_js( '    
        <<>>
    ' );    
}

Is there a clever way to get it running without repeating page conditions?