Wordpress post with no URL / viewable web page - wordpress

Is it possible to configure a WP post so that it has no URL / viewable web page. At that point it would essentially become a reusable content snippet that must be referenced elsewhere, from another page or post, but could not be linked to as its own page.
Thanks,
Keith

This plugin seems to achieve what you want. Searching the plugin repository with the term "Snippet" yielded this plugin.
You could also hack together something using custom page templates and pages.

Related

Does Wordpress list all pages for crawlers?

I created a page on a Wordpress site that was for internal use only and triggers some backend code. Within a few days I started seeing hits on that page from "bingbot".
I'm not using any kind of sitemap plugin. How are crawlers finding this page?
I know the robots.txt file can block them but I want to make sure they don't show up for crawlers that don't respect this. I still want to have the page publicly accessible if someone types in the URL.
What needs to be done in Wordpress to make sure a page can't be discovered except by typing in the URL?
Any given URL is potentially "discovered" once the post is published and if there's a link to it from elsewhere on your site. There's no guaranteed way to prevent search engines from indexing a URL.

Enabling Jetpack Slideshow plugin on a website

I've been creating a separate blog page on a custom website and using the Wordpress REST API to pull the post data onto the site. I've been following this documentation on how to pull the posts. My problem now is to find a way to make the Jetpack slideshow plugin working on the website.
Instead of the plugin, it displays:
This slideshow requires JavaScript.
Nothing on the documentation mentioned on how to enable the plugin. I'm hoping you all may know a solution.
Thanks.
Found a quick solution, I've simply copied the scripts and stylesheet that the jetpack plugins used and placed it on the external webpage.
It works but not sure if this is the best solution.

Headless CMS: Wordpress Rest-API – Add links to existing posts/pages

We want to use the Wordpress Rest-API to build a page decoupled from the backend. A few things still bother us though:
Within the wordpress backend one can add links in the content editor of a page or a post and one gets normally a list of all existing pages and posts of the same page to link to them. By decoupling the backend it does not know the exact urls to other pages and we need to provide this. Is there a possibility to tell wordpress what links are available?
Thanks in advance.
Cheers
For those looking for the answer:
There are two URL settings under Settings > General.
WordPress Address (URL) should be the URL for your api site. Like api.whatever.com.
Site Address (URL) should be the URL for the frontend. Like www.whatever.com.
This allows the internal linking to work properly in the Editor while keeping the backend site on a separate URL from a headless frontend.
I'm not sure what you're trying to ask. The WordPress REST API just provides a way to access posts, etc. from somewhere else part from the web site side (e.g. themes, etc). Pages would still be accessible from the admin backend and the JSON/REST API: https://developer.wordpress.org/rest-api/reference/pages/
Specifically with WordPress you could ensure that you're not rewriting the permalinks. That way they are all still site.com/?p=post-id
That way it's easy to parse fetch the new pages. Then replace the hrefs with whatever your frontend needs.
You could use the ID to fetch the slug of the new post immediately.
Or you could even keep a mapping in your presentation layer of IDs to your own slugs.
Changing the site_url doesn't work for me.
Since I also have a wordpress theme with custom rest controllers
Plus the wp-json breaks if I change the site url
My backend is hosted at digital ocean app
My frontend is hosted at vercel
I fixed it by using a wordpress plugin called make-paths-relative
But since my backend doesnt know where my frontend is I added one change within the plugin at:
frontend/class-make-paths-relative.php line 123
I added a constant FRONTEND_URL which i define in the wp-config
$relative_link = FRONTEND_URL.$link;
This changes both the permalink within my backend of a post, page or cpt
And changes internal links as wel, links within the content editor
I made a request to the plugin author as well

Redirect forum link from wordpress post to another page which has a template with iframe pointing to the actual forum

Okay so... I have a wordpress post in which I have a link to my forum.
The forum is integrated with the wordpress design in an iframe. I would like to go from the article page to the forum page and open the link from the article in the forum page's iframe (in which the forum is loaded).
The forum page is /forum/ thats how wordpress displays it but actually the forum is hosted under /Forum/
I don't want people going directly to the forum without the design which is http:/ /website.com/Forum/
I hope this explains it.
Lets say I have a wordpress post with a sidebar and in the sidebar I have links to my recent forum threads for example one url:
http :// website. com/Forum/showthread.php?tid=4
I created a wordpress template page called Forum.php within which I have iframe that goes to http :// website. com/Forum/
The wordpress page which i applied the forum.php template to is http :// website. com/forum/ notice the small f.
So when you go to http://website.com/forum/ it loads the forum.php which has an iframe ID=frmid and src=http://website.com/Forum/
How would I have my links inject into http :// website. com/forum/ (forum.php iframe ID=frmid) and load properly seamlessly?

Easily incorporate blog feed into site

I built a site for a client not too long ago and built it fairly standard. Now she has a Wordpress blog and would like an area on the main site to have links to the most recent blog posts. Is there an easy way for me to pull a list of the most recent posts into this content area without having to chop the page up into a Wordpress template?
You want to place the WP feed on the static site? Maybe Developer's Guide - Google AJAX Feed API - Google Code
http://wordpress.org/extend/plugins/feedlist
I have a WordPress blog integrated into my hand-coded site. I use SimplePie to display my latest posts on my website's home page. I wrote a blog post about how to do this - Displaying WordPress posts on a separate web page. Hopefully that will work for you as well. Let me know if you need more information or help.

Resources