Tag Info

New answers tagged

0

You can use http://php.net/manual/en/function.http-response-code.php to set the response header, and you just need to find the lines in the theme's header.php. Unfortunately, these items are set by header.php so you will have to run the code on all pages of a traditional theme, but I would do something in the header.php near where the meta is currently being ...


0

You can check to see if the length of the excerpt is longer than the max count. if(strlen($excerpt) > $count){ $excerpt = substr($excerpt, 0, $count) . '…'; } … is the correct ellipsis character to use.


0

Figured it out! The culprit was the plugin "Add Categories to Pages" which one of my editors had added to the site. In addition to registering post_tag and category for the page post type, it also modified the archive.php and tag.php queries to only look in the post and page types---yet another solution for the issue of including posts, pages, and ...


0

Referenced from https://codex.wordpress.org/Post_Status_Transitions#.7Bstatus.7D_.7Bpost_type.7D_Hook the hook named "{status}_{post_type} Hook". This hooks is fired, when custom post type "community" is giving the status "publish" = is published. Hook will give post_id and post object as parameters to the callback function. And wp_set_post_terms, requires ...


0

Mobile theme plugins typically sniff the user agent and just switch out your main theme for a bundled "mobile friendly" generic one. In the process, any shortcodes registered in your theme are no longer recognised, and they just display as plain text. Check out the plugin documentation, or contact the developer, and see if they can offer any insight. I ...


1

The WP_Query documentation on the codex specifically says: 'attachment' - an attachment. Whilst the default WP_Query post_status is 'publish', attachments have a default post_status of 'inherit'. This means no attachments will be returned unless you also explicitly set post_status to 'inherit' or 'any'. I am not sure why it was working before ...


1

This is actually more php related. Best will be to add your term names in an array and then use implode to convert it to a comma separated string $my_tags = get_the_tags(); if ( $my_tags ) { foreach ( $my_tags as $tag ) { $tag_names[] = $tag->name; } echo implode( ', ', $tag_names ); }


0

Redirect- If you did a proper redirect, there is no content on the pages you're redirecting from. So there's no issue with the content being duplicate. Tags/Categories- If the categories and tags serve a function and add value, then they're not really duplicate content. So choose categories and tags wisely. I wouldn't delete old ones because there might be ...


0

noone likes to change urls - it's an extra headache. However, google tries to be liberal, so it tries best, to accomodify your changes and not to loose your SEO, and if you redirect 301, then everything should be ok, however i think so. Of course, you should make redirection, because duplicate content is very very bad.



Top 50 recent answers are included