Jorge Raigoza
Forum Replies Created
-
Never mind x2.
The correct filter is wpseo_sitemap_entry. This filter applies to all post and page elements.
Return the $url parameter for the elements that you want. For the elements that you do not want, return ” (EMPTY).
function sitemap_exclude_post( $url, $type, $post ) { if ( $post->ID === 1 ) { // Exclude return ''; } return $url; } add_filter( 'wpseo_sitemap_entry', 'sitemap_exclude_post', 1, 3 );- This reply was modified 9 years, 1 month ago by Jorge Raigoza. Reason: grammar and styling
Never mind. I misread the article. I always get confuse with the word Taxonomy:
- Category
- Tag
- Link Category
- Post Format
- Custom Taxonomies
Basically, I was trying to filter posts and pages using their ID instead of a taxonomy slug.
Is there any way to filter per post ID using PHP?
Forum: Plugins
In reply to: [Magee Shortcodes] breaks themesAs Chris mentioned, this plugin doesn’t play well with themes.
We have a non-bootstrap theme. When we load the plug-in, the whole layout goes out of place.
At the beginning I tough I could fix it… After reviewing the issue, I noticed a whole file causing the issues (magee-shortcodes/assets/bootstrap/css/bootstrap.min.css). It resizes and changes layout to ALL generic components, e.g. buttons.
Honestly, you should not do this for a plug-in.
Forum: Plugins
In reply to: [WordPress Access Control] Fix for new WP version (4.5)Closing topic