List posts with embedded videos - wordpress

is there a way to list posts which have embedded videos in the content. Newly added posts needs to be automatically added to the list also.
I am using Wordpress.
Thanks

The best approach would be to create a category for the posts with the video and then query that category. Can you do that?

For this I feel that
You need to create one time function which will execute on some hook and will search through your content for the links related to videos(video site url's).
If any post having that link it will assign category to that post.

Related

How to access an ACF field on a category from within pre_get_posts in functions.php to modify archive query

Long title, but what I'm trying to accomplish is
1) Adding a Post Object field to the Add/Edit Category page to specify a single post to use as a featured/sticky post for that category. As far as I can tell there's no way to do this (featured category post). Have used https://wordpress.org/plugins/category-sticky-post/ in the past but seems dead and starting to act buggy.
2) Display that post on top of the respective archive page 1, and then start with the normal loop for that category. This is working perfectly.
3) Where I'm stuck is how to exclude that featured post from the query so we don't get duplicates. I'm trying to do this in a pre_get_posts function in functions.php to modify the query so it functions like a normal archive page otherwise.
If you know of an easier way to simply set a featured article for a category I'm open to suggestions. I know sticky for main homepage loop but nothing for archive pages.
You may need more info but that should be a good starting point. Using ACF Pro (latest)
Thanks for the help!
You can use the ignore_sticky_posts property while querying posts using WP_Query to exclude the sticky/featured posts.
Reference: WP_Query

Category Listing Page with posts filtered to selected tag on Wordpress Blog

I'm working on a Wordpress 3.4 project. I have categories and then several tags, and also one custom taxonomy as types.
Wordpress is fantastic as far as it handles all the taxonomy page, but I'm unable to figure out how to have pages where I have categories listing page (with pagination) specifically filtered to a selected tag or custom taxonomy.
So basically I want Categories, but then again, I also need to have a categories page with all posts filtered to specific tag, and then with pagination.
I have tried to figure out how to do that, but unable to find the exact doc or help. The issue is also with the URL, as how it will be formed?
Any idea how to fix that one, or any plugin to get this things done?
I think these two codex pages will help you along your way.
http://codex.wordpress.org/Class_Reference/WP_Query
and
http://codex.wordpress.org/images/1/18/Template_Hierarchy.png
You can use WP_Query to query posts based on tags and categories/custom taxonomies and much more.
If you look at the template hierarchy you'll see you can use special template files for tags and taxonomies too. Just remember to flush your permalinks if you're not seeing these templates being used if you create one.

Page Template Custom Options

I have a little question. I am making a wordpress template that uses custom page templates. Now i ran into a problem. I want to create a page with a intro text and blog posts that come from a certain category. When a user creates a new page, I want them to be able to select the category from witch the posts are shown. Kinda like a drop down box with category's from where they can select the category they want. Does anyone maby knows a tutorial where I could learn how to do this ?
I mean something like this: http://imageshack.us/photo/my-images/10/naamloosea.jpg/
I already searched google but I could only find tutorials on how to make a template options page.
Thanks in advance,
Bob
You would want to create a Meta Box to save the category as a custom field entry within Pages. In here you could list the categories within a select box. You could then use this in the page template to pull in the posts from that category as you wish. I'll see if I can dig out a decent tutorial for this.
I did a quick search and found the following plugin for WordPress that may be of use... http://wordpress.org/extend/plugins/map-categories-to-pages/

WordPress- have a specific type of "page/post" as "testimony". Possible? If so, how?

I'm implementing our school's website using WordPress as CMS. So far, it works well and I'm 80% done. Our website is basically 11 WordPress pages and a blog.
Now, there is one feature i'm not sure how to resolve. We want to have "testimonies" of past students to be displayed across WordPress pages, in a specific area of the page. They will either be videos or written text with an image.
They will be embedded on regular WordPress pages either a specific video for a specific page, or just random testimony video for a given page.
Is it possible to do that with WordPress? If so, how?
Thanks for any hints.
Alex
There are quite a few Wordpress plugins which handle testimonials gracefully:
http://wordpress.org/extend/plugins/search.php?q=testimony
You should be able to do this with categories. Create a testimony category and and then create a new template called 'testimony-page.php'. In that template, put a separate loop that pulls a random testimony from the database. Voila, page in a page.
If you feel like building this yourself, it can be handled with custom post types. Here is a great guide that will give you a lot of useful information: http://www.smashingmagazine.com/2012/11/complete-guide-custom-post-types/
I like to use this plugin:
http://wordpress.org/extend/plugins/more-types/
To manage my custom post types.
To query posts from a new post type, use something like:
query_posts({
'post_type' => 'testimonials'
});
So, if you wanted to add testimonials to your site, you'd query them like above with whatever parameters you need, and do a simple loop to output the posts.

Creating relationships between posts in WordPress

Is there a way to create an exlicit relationship between two posts in WordPress regarless of what categories those posts might be in?
The idea is that within the post template it would be obtain and list the related posts for the current post.
I'm guessing you could achieve this using tags to group posts together, but that seems to be a hi-jacking of the tag system for a purpose for which is wasn't designed.
Any ideas?
Would adding post IDs as meta data help? I had written a quick hack to display the Digg box for posts that were submitted to Digg. I was manually adding a digg_url meta field with the Digg URL. Perhaps you could add multiple related__post fields and add some code to iterate through all and render post links? Are you looking for a more automated solution?
Maybe I didn't catch the point, but Categories are not just there for that purpose?
I may have miss understood the question. But tags, archives and categories are there to "connect" posts, on the basis of that common connection.
Other than that, I can only see ...
Manually linking posts from with the text of a blog post or
Using plugins. Two I user are similar posts (http://rmarsh.com/plugins/similar-posts/) and SEO Smart Links (http://www.prelovac.com/vladimir/wordpress-plugins/seo-smart-links)
Similar posts if highly configurable and allows the blog to automatically suggest "related posts" and SEO Smart Links, links (in post) words or phrases to related posts.
All the best
stephen

Resources