This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.jpg, .jpeg, .png, .gif, .bmp, .svg, .mp4, .avi, .mkv, .mov, .wmv, .flv, .mpeg, .3gp, .webm, .ogv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Did filter Check | |
Plugin URI: https://gist.github.com/laxmariappan/d49b5930875d1d8f134173742f37774d | |
Description: Check how did filter works | |
Version: 1.0 | |
*/ | |
add_filter('lax_plugin','plugin_title_change'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import loader hook | |
import { useLoaderData, Link } from "@remix-run/react"; | |
export let loader = async () => { | |
const result = await fetch("https://wordpress.org/news/wp-json/wp/v2/posts"); | |
const posts = await result.json(); | |
return posts; | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function ErrorBoundary({ error }) { | |
console.log(error); | |
return ( | |
<Document> | |
<Layout> | |
<section className="p-6"> | |
<div className="relative items-center w-full px-5 py-12 mx-auto md:px-12 lg:px-24 max-w-7xl"> | |
<h1>There was an Error</h1> | |
<p>{error.message}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function Layout({ children }) { | |
return ( | |
<> | |
<Header /> | |
{children} | |
<Footer /> | |
</> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Document({ children }) { | |
return ( | |
<html lang="en"> | |
<head> | |
<meta charSet="utf-8" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1" /> | |
<Meta /> | |
<Links /> | |
</head> | |
<body className="bg-gray-100"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function App() { | |
return ( | |
<Document> | |
<Layout> | |
<Outlet /> | |
</Layout> | |
</Document> | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styles from "./tailwind.css"; | |
//Link the stylesheet | |
export const links = () => [ | |
{ rel: "stylesheet", href: styles }, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npx create-remix@latest | |
//Hit enter to confirm the installation | |
? Where would you like to create your app? (./my-remix-app) `remix-wp` | |
//The default name is my-remix-app, you name your app here. I’ve named it remix-wp | |
//The next step would be choosing the app server. |