Wordpress show future, scheduled posts - wordpress

I am using a newsletter plugin - meenews to extract my posts.
By default it only gets items that are Published and not the future ones.
Ideally I would like to show up and coming events, not ones that have already passed.
Is there a way in my functions.php for my theme that I can tell it to put all posts as published, or what would be a better way?

Never mind - found this plugin 'The Future is now'
Sometimes you just have to ask out loud :P

Related

Wordpress how to generate list of revisions (post and pages) for public

I need to implement to Wordpress something like Public Revisions. The idea is that for every post and page there'll be a list of revisions (public, not only for logged-in) that allows reader to click to display previous version of post or page. So, I guess there should be a loop to check if there is a revision and print them while there are some. Making the list clickable, and showing the revisions would be awsome.
There was a plugin to do that, but it's abandoned and it doesn't work anymore. In fact, you can't even get it from the official list of plugins for WP.
Please help me achieve it the best (easiest) possible way. Unfortunately, my knowledge of PHP is only basic.
Dunno if you still need it but perhaps you could have a look at this?
https://developer.wordpress.org/rest-api/reference/post-revisions/#list-post-revisions
Seems like you could retrieve the data and create a page with it.

How to create Child Plugin for wordpress

Actually I have changed some code in WordPress Store Locator. I want it to remain when plugin will update. So I want to create a child plugin for that. Any ideas on how I could manage it?
This varies plugin to plugin, and it sometimes isn't even possible, other times plugins have documentation to extend them easily (such as WooCommerce and Gravity Forms). Some of them create Action Hooks with do_action() that let you extend the functionality easily. A common example is updating a post after a Gravity Form is submitted with their gform_after_submission hook.
Effectively, it depends on what you want to do, and how the plugin implements the functionality you want to change. If they add text with a Closure or Anonymous Function, it will be harder to modify said text, and you may have to look at something strange like doing a run-time find and replace using Output Buffering, typically on the template_redirect hook.
If you want to remove something a plugin does, you can often unhook it with remove_action. This can be a bit tricky depending on how the plugin is instantiated, sometimes its as simple as:
remove_action( 'some_hook', 'function_to_remove' );
Other times it's more complicated like:
global $plugin_class_var;
remove_action( 'some_hook', array($plugin_class_var, 'function_to_remove') );
Those are the basics of extending (or even 'shrinking'?) a plugin's functionality, and it's not always doable appropriately. Unfortunately the narrow answer to your question is outside of the scope of what we can provide from StackOverflow.
From here, you'll need to figure out exactly what you want to do with the plugin, and dig through the plugin's files to see if there's an appropriate hook or function you can use. If you're still stuck, you'll need to post a new question (don't update this one) with your exact desired result and anything you've tried, and the relevant code that goes along with it. "I want to change a plugin without editing core files" isn't nearly specific enough. "I want to replace an icon with a custom icon in this plugin, here's what I've tried" is specific enough to possibly answer.
Good luck!
I just went through myself and I had so many changes that I couldn't just override the actions.
I created this tool that allows you to create a child plugin like a child theme. You can make updates to the plugin and still update it without losing your changes.
I'm posting this here because it relates and hopefully becomes useful to the next person who runs into this issue.
https://github.com/ThomasDepole/wordpress-child-plugin-tool
As per WordPress standard, it's called plugin's addon.
if the plugin has provided any action to update that functionality then you can use it with your addon (child plugin).
Here I am sending a link for reference.
https://developer.wordpress.org/reference/functions/add_action/

How to solve it-updating plugins in wordpress?

I have made modifications in several of the plugins in wordpress. But
these plugins are now outdated. I have to submit the project to the
client. The client is asking me to update the plugins. But the problem
is that when I would update plugins, the changes that I made in
plugins would have gone away. So, I want to ask is there any concept
of child plugin in wordpress and if so, how to create it; so that my
changes would remain intact.
I don't know which plugins are you using so I am giving an example of WooCommerce Delivery Date plugin. I have disabled updates for that plugin and I have used below code to achieve it :
/* Function which remove Plugin Update Notices – WooCommerce Delivery Date*/
function disable_plugin_updates( $value ) {
unset( $value->response['woocommerce-delivery-date/woocommerce-delivery-date.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
Just edit the version of the plugin to more than the latest version :
Go to wp-content/plugins/your-plugin/your-plugin.php
generally your-plugin.php is the main file of the plugin and it is having version in the top commented line.
Edit the version of the each plugin
Otherwise install a plugin your admin that will disable updates. Get this plugin from here : https://wordpress.org/plugins/disable-wordpress-updates/
If you're looking to keep a good name, I'd find a way to achieve making the necessary changes without modifying plugins in the first place (this is a bad practice, as I'm sure you know). When people purchase your product or services, they want to know they're not getting a "bad egg" or a "lemon deal"; and that their investment is actually an investment and not a complete waste of effort, money and overall time.
Updates are important! What if they are handling sensitive information on their site? What if their host requires a specific plugin to be a certain version?
Make your change in another way, write your own plugin, include the functionality in a child-theme; you can even handle certain "modifications" by using jQuery to manipulate elements in the DOM (include it in your child theme).
Just don't do something regrettable as some others have suggested. This is only going to last until the next update is released and lead to trouble, a bad reputation, or legal action. Integrity is all a man has. If you throw it away, you're worthless.

Invisible/Conditional link to draft pages

While writing new blog posts I occasionally hit keywords, that I want to write an other post in the future about. The post didn't exist right now, but creating a link (or anything that will become a link later) while writing the post, would make it a lot easier to reference to the future post than adding links later manually when the new post really exists.
I already thought about using drafts for this scenario and just create an empty post, but I couldn't find a plugin for displaying conditional invisible links to draft and visible links to finally published posts.
Any ideas how to address this issue?

Wordpress: how to limit post-nav to specific category?

I'm setting up my first Wordpress site. I have limited knowledge and understanding of its inner working. (Bear that in mind, please)
I setup 3 different pages that show posts based on their categories.
Though, once your reading one post, from either pages, the Next Post/Previous Post navigation still cycle thru all the posts regardless of their categorie.
I would like to limit this navigation to posts within the category of the page the reader is reading from.
Is that at all feasable and if so, can you help me out understanding how to do it?
Or if there is a plugin that does that?
Thanks
That's covered in the WP docs. Set in_same_cat to true.
https://developer.wordpress.org/reference/functions/next_post_link/
If the links are already in your theme, you'll need to edit them.

Resources