André Amorim

Crafting Web Experiences


// All My Notes

  • GLOBAL: PHPCS, PHPCBF, and WPCS Coding Standards with VS Code

    # Download using curl # Give the execution permissions # Install WordPress Coding Standards # Apply the new coding standards # Update the default standard # Install the VS Code Extension PHP Sniffer & Beautifier: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab # Add these settings to the settings.json file of VS Code

  • Questions for New Project Definition

    What’s <project_name>? What’s the problem? How does <project_name> solve this? Who uses <project_name>? Where’s <project_name> now? How big is the market? What’s the competitive landscape? Details about competitors: When they started? How many people they have? Revenue How did they grow? What are they currently doing? Comparison with <project_name> What’s the strategy? How do we…

  • WordPress Guest Author with Code

    First, let’s create the custom metabox. Then, we need to register the guest author input field value. Now we can display the guest name.

  • WordPress Permalink Structure: “/custom-post-type/custom-taxonomy/post-slug”

    First, register your taxonomy and set the slug argument of rewrite to shows: Next, register your post type and set the slug to shows/%show_category%, and set has_archive argument to shows: Last, add a filter to post_type_link to substitute the show category in individual show permalinks: EDIT: Forgot the has_archive argument of register_post_type above, that should be set to shows. Reference: https://wordpress.stackexchange.com/a/108647

  • Layout System for WordPress Theming

    functions.php: Default Layout File(layouts/default.php): Usage on any WordPress Theme File (e.g. 404.php):

  • List Active Ports

    To filter by a port number:

  • Redirect “stage-” prefixed slug pages if exists on WordPress

    For testing/staging purposes, sometimes you need to create new block or content based pages before taking them fully live. To check or show them without making them publicly visible to visitors, you can add “stage-” prefix to that new private pages with the hook below. When you’re logged in, you’re automatically redirected to the new…