This is in a way a followup of this question : Jetpack Publicize: Sharing only on Twitter for a category
I am currently working on a website in which one of the category only serves as a way to curate news on the net and then, share it on the front page and on Twitter.
The post itself is empty, I use a custom field to receive the URL from the user, grab a few things from the target website, update the permalink and save. Upon saving, SNAP publishes the post on Twitter.
My issue is that it is not using the permalink but the url of the post itself (which is absolutely empty). Having a look into the plugin's code, I saw that it was using post metas (most notably urlToUse, snap_MYURL) but couldn't determine if it was a priority issue or something else.
I also try to adjust my code to set these meta values to the url I want, to no avail.
Is there a way I could set my custom functions or the SNAP plugin so that the permalink is used ?
No answer after a week, neither here nor from SNAP's support. No problem.
The ugly patch I used :
Jetpack Publicize for all the Twitter updates
SNAP for the Facebook ones thanks to their ability of posting based on a specific category
It's bloated and I'd love to understand but, sometime, you have to ship
Related
I am a complete newb to wordpress. I am trying to help a friend out. She asked me to help her move her wordpress instance to another hosting provider.
I have done that for the most part. My issue is the original provider implemented a not-so-obvious way of an isotope filter on some UI elements.
Specifically the object is a company. Each company has a logo, the name of the company, a short description and a contact name / email.
These companies service states / areas and the idea behind the page is to select the state and only the companies for that state are visible.
From the brief searching I have done - there seems to be an overwhelming amount of plugins to support this.
I have tried creating a simple post with a featured image and adding in the text in the excerpt.
My problem is the links. I don't want the links to go back to the post - rather I want the links to go to a custom URL.
Is there a plugin that will allow me to define a custom post type (to include categories) and then filter on it similar to Isotope type of filtering?
There are many free plugins but if you are using the Elementor page builder. I am not advertising my product but as I saw your requirement matches a plugin that I am selling in the market.
The frontend filtering feature is not yet available to the released version but will be released soon. It basically allows you to build a custom grid as you like.
Is it something similar?
https://demo.geekygreenowl.com/elementor-387/
You have to create a custom post, there should be a custom field(custom URL) as well.
Or, You may create a WordPress query. https://developer.wordpress.org/reference/classes/wp_query/
also, coding will be required for filtering
I have been working on a site created by another developer. I have been fixing the site to make it more visually appealing. I am also responsible for adding new events and pictures which i self taught myself to do.
I have a situation where I have a page with the following permalink:
http://www.cic-nj.org/events/
The problem is that this link goes to a page that does not show the edits that i am making under that page and there is no other page listed that shows the info it actually displays.
this is what I have in the editor box on wordpress that I want it to show.
enter image description here
this is what appears when url is used or when i click view
enter image description here
I have been sure to click update and renewing page to view it. it's like its going to a ghost page i can not edit.
Can anyone point me in the right direction on this?
Thanks in advance...
You are experiencing "slug collision": more than one thing in your WP install has the same slug.
The problem that you have is events is a custom post type, with a slug set to events - therefore the url http://www.cic-nj.org/events/ is directing to the listing of events. This is an automatic feature of WordPress. (Note - you can see more details to support this conclusion by the fact that you've got individual events accessible at url's such as http://www.cic-nj.org/events/blue-apron-info-session/ )
Note that custom post type slugs will always take priority over a page / post slug.
You have a couple of options:
If you want a page to display the content that you've created, the page's slug / permalink must be different than events
If it's acceptable, you can rename the slug of the "events" custom post type to something different. This has the potential consequence of losing SEO "juice".
If it's acceptable, you can remove the custom post type, if you aren't going to use them any longer.
NOTE: It may be tempting to ask "how do I remove the custom post type", or "how do I change the post type slug". Those are different questions, and if you need to ask, they should be asked in a different question - not added as a comment below.
I'm trying to put the FB comments box on the bottom of each of my products pages on my site. I have managed to do this but when set to a static url it says the same comments on every product. I deleted the url and now it kind of works but says the plugin is in compatabilty mode.
Heres whats in my products template:
My site is trickscooter.co.uk so you can see. The comments box is at the bottom of every product.
I want people to be able to ask questions on the item shown so I can answer them so all can see.
PS - It says this:
Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit 'href' as suggested in the comments plugin documentation to take advantage of all plugin features.
Thanks !
The static URL won't do for the 'href' parameter as that parameter tells Facebook which comments to show. If you always use the same URL, of course you get always the same comments. You should have a unique url per product and use that dynamically.
If you generate the href parameter dynamically, you need to be aware that you will loose comments if your page is accessible under different domains.
The best way is to configure a 'facebook domain' (e.g. 'www.foo.example') and use that to generate your href attribute for Facebook comments.
If I misunderstood you please explain your current embedding code and what you tried. If you like the answer, please mark it as 'solution'.
Can a post be hidden from home page, archive view, category lists etc. and viewable only if you have a direct link to it? The blog doesn't have registered readers and is open to public so that would be a mean of hiding some posts from public view without using the password protection.
I asked this question in Wordpress section and the idea there was to use conditional code so I'm asking the question here as well to get closer to the code.
If I used conditioning, would I have to input each post's ID separately to PHP file for archive, categories, search and such?
EDIT:
After reading a bit more all over, I had an idea of creating a private category and then use some kind of conditioning so that posts from that category are hidden. According to Codex, certain category can be hidden from, for example front page but I don't know if there's a way to hide it altogether except when you have a direct link.
Creating a "Private" category is a good solution. It is quite possible to hide this category altogether except via direct link. You just have to "block all the exits" with conditional code.
The default WordPress theme displays posts via the Post Loop. See http://codex.wordpress.org/The_Loop, especially the section entitled "Exclude Posts from Some Category". Just find all the places in your theme's PHP files (e.g. index.php) where this loop is used, and add the conditional code. You'd also need to filter your category list and blog archives in the side menu. Don't add filtering in single.php, otherwise the private post won't display on its own page.
You'd probably want to add a similar condition to filter search results so that private posts aren't leaked via the blog's search tool. There may be more "exits" I haven't thought of, but I'll be sure to update as I do. I'm glad to look at specific code if you so desire.
Understanding WordPress' post query and loop really opens up a world of possibilities for customization.
I found the simplest way - just use Simply Exclude Wordpress plugin. It has the option to exclude each post (or tag, for that matter) from front page, archive, search or feed. It works flawlessly. You can still view the posts by using direct links.
(Not actually an answer that includes code but a working solution nonetheless.)
I have my permalinks in WordPress set to the Month and Name setting. This generates URLs like /blog/2009/09/my-post-name. Every time a post is updated, it changes the posting date, which can potentially change the permalink address.
This is wreaking some havoc on my site, as I'll have banner/button ads throughout that point to the permalink. When a post from August is updated in September, all of the ads become broken links until I discover this and change it.
Is there any way to make the original posting date stay static, despite any updates? I'm looking for something like a plug-in or an overlooked setting, as I have multiple authors with varying degrees of computer literacy.
Thanks for any help!
Cory
Update:
Apparantly this is behaviour that others aren't experiencing, so I'm attaching a screen shot of exactly what's happening. Top image is before saving, bottom image is after saving.
(source: opl.on.ca)
Are you sure updating a post changes the permalink? I don't have this behaviour in my installations. What do changes a permalink is changing the post date.
In database, acoording to this schema, we have post__date and post__modified, two different attributes: used in create an update action. If you're having your post-date modified without modifying it directly
Updating a post date in Wordpress http://img18.imageshack.us/img18/3440/wordpresspostdate.png
then I'm afraid some plugin may be changing it's value.
Reading your description, I'm assuming you're using static links to your banners. Try to use a simple plugin that creates these links based on your post id: some simple routine would do it. You can get some information using get_post for example.
<?php
$my_id = 7;
$post_id_7 = get_post($my_id, ARRAY_A);
$slug = $post_id_7['post_name'];
?>
... or even easier with get_permalink. You need just your post id.
<?php
echo get_permalink(7);
?>
So, at least if your permalinks are changing without a reason and you dont know how to fix them, at least you can build them dinamically.
Just read the codex documentation and Function Reference to see what's avaiable to make your life easier!
I run the same permalink settings and don't have trouble with post updates changing the permalink. There are separate editor settings for the permalink and a user has to specifically change the permalink from that editor, which is right under the post title in the text editing box in the post editor. That's a WP thing to keep permalinks from getting broken all the time.
Maybe you should try using a few static pages? That way you can have both a clean permalink: mysite.com/mypermalink/ that won't change, if in fact your post permalinks are changing from a plugin that you need to use.