Tag Info

Hot answers tagged

3

I was curious about this and checked the Codex on keyboard shortcuts, but didn't find it mentioned there. I searched and found out that this seems to be already solved, e.g. here and here. I haven't tested out these other plugins so I'm not sure how they solve it, but I decided to take on the challenge and see how this could be solved ;-) So here's my ...


2

I managed to solve this myself. Instead of using register_sidebars() to register the sidebars all together, I simply used the singular register_sidebar() in a for loop, so that it registered a sidebar for every matching page. All one would need to do to get this working is change the template name (in my case template-generic-sidebar) to their own template ...


1

Hameedullah's answer is more elegant, but doesn't eliminate the before and after items. To do that, you need to filter get_edit_post_link instead, and return null. function wpse_remove_get_edit_post_link( $link ) { return null; } add_filter('get_edit_post_link', 'wpse_remove_get_edit_post_link');


1

You could use this search and replace tool: search and replace by interconnectit Apart from that you could put some redirects in your htaccess, but really the search and replace works great.


1

For me the problem would be to use a plugin that uses evil() eval() to evaluate string as PHP, in the first place ;-) This part is from the PHP manual: Caution The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option ...


1

I would not try to get too tricky and hide pages from users. What happens if they try to create a page with the same slug? I think it would just create confusion and more problems than it would solve. When you create the pages, store their IDs, not slug. Let users then change those through your options screen. This is similar to how WordPress tracks your ...


1

The WP function get_attached_media() should provide the info you need. If used in this way... $media = get_attached_media( 'image' ); ... the $media var should contain the wp_post objects for all attached images. Function documentation in the WP Codex: https://codex.wordpress.org/Function_Reference/get_attached_media



Only top voted, non community-wiki answers of a minimum length are eligible