I'm developing a theme for wordpress and would like to know the best way to show highlights on the home page.
Examples:
I thought two ways:
Custom post types -a custom post "highlight" with metabox for image, text and link.
Theme Options - a page with options for each box.
What is the right way?
Neither. What you want can be achieved using either Wordpress' core functions and/or Custom Fields. Consider using Custom Meta Boxes if you have a client that requires a more intuitive setup, or installing something like the Types Plugin to do it for you.
This will allow you to attach your own variables to given Posts/Pages.
To gain access to a post's Custom Fields, click the Screen Options button at the top of the Post Editor to enable Custom Fields.
Personally, I would Enable Support for Thumbnails for your Highlights image, use The Excerpt for your Highlight copy, and use either The Title or a Custom Field for the heading.
This way, you can keep all your eggs in one basket rather than overcomplicating things with Custom Post Types or Theme Options Pages.
Look at the Plugin "Ether Content Builder"
You could use either of the methods you've suggested. In my opinion getting involved with lots of meta boxes on one specific page template for this is a total waste of time - there is only an image, a header and an excerpt linking to a post/page. Three posts (whether custom or not) will handle that with featured image, excerpt and the page/post title.
I also think doing a Custom Post type is too much just for three posts on the homepage. If you go the posts route just create a new post category called Home Highlights and put your three posts in there, pull them in via a custom loop built on WP_Query.
Yes you can go the Theme Options route too. If it's the client updating the site then it can look quite professional this way, I've started using a plugin called Options Tree after it came integrated with Super Skeleton, it makes it very easy to build your custom theme options which work just as well too.
A matter of opinion really, rather than a hard and fast 'this one is definitely better'!
Related
I'm looking to find a plugin or another as-simple-as-possible solution to create unique image sliders on individual posts in Wordpress. Ideally the plugin would be free or only require a one-time payment.
The type of system I'm looking for is this:
each post has its own slider with images unique to that post- no posts will have the same set of images
images are uploaded into the ACF gallery field on post pages
sliders are hard-coded into single.php, waiting to loop through gallery images (not using shortcode in the post)
the slider ui is customizable through a plugin interface in the wp back-end
I'm open to other suggestions for how to do this, although I prefer a solution that requires as little javascript as possible, as I'm on a time crunch and am not the best at writing it! This looks like a viable option if the right plugin isn't available.
Thanks!
I'm very new to WordPress (tbh, it's my first time working with it). And I need to make a website as my school project using CMS. Creating pages with templates is alright, but I have a lot of troubles with buttons. I found this website, and I can see it using WordPress. I need such buttons as on this page https://movie-chooser.co.ua/random-movie-2/ (they appear when you hover over the image). Is this a default option for buttons in WordPress? If not, is there a plugin for this or what is the way to add them on my images?
First Install Elementor plugin https://wordpress.org/plugins/elementor/
and go to page when you add button and open page with elementor
and do drag and drop any element like button, space, text editor etc.
You have several ways to achieve that:
Overwritting Wordpress CSS
Using a plugin
Create your own shortcode
1 - Overwriting Wordpress CSS
If you manage to display all the elements using wordpress template, and your only issue is to display buttons over the images, then it should only be a matter of CSS
2 - Using a plugin
The idea here is to find a plugin that help you to create/display the informations you need (maybe you'll need to add functionnality to basic post though custom fields or using a custom post type).
Once you find the right plugin, again if the plugin dosen't directly offert some settings on the design then you'll have to overwrite the plugin's CSS rules to display the elements as you want.
3 - Create your own shortcode
If you're new to Wordpress I wouldn't recommend this method as it is kind of advanced, unless you're comfortable with PHP/HTML/CSS (optionaly JS).
This is the more flexible solution as you can basically control anything, but it will require you to understand some core concepts of Wordpress like WP Query and how custom queries works.
The idea here is to create a shortcode.
THis shortcode refere to a custom made PHP function, in which you can create a custom request to fetch the informations you need to display from Wordpress database, and display it in an HTML structure that you decide.
THen angain, you'll just have to customize it though CSS.
Note : no need to create a whole plugin if you decide to create a shortcode, you can use the template functions.php file for that.
I am about to build a Wordpress theme for a non-blog website. I am familiar with the basic post/page concept and I used to set a static page being the front page.
Now I want the fron-page to change *its background image* and a little part of its content every few seconds (Here is an example of what I am trying to achieve.)
I already know how to develop the javascript and HTML part of that! I would like to know how to make those changeable items (background-image as well as the small content) to be managable in the Wordpress admin area (Since that's the whole point o a cms, right :-)).
How would you do that? Is there a plugin to connect custom contents like that? Or do I have to build my own plugin? I would appreciate your thoughts :-)
The rough steps to take:
Create a custom posttype
In the supports option enable thumbnail
Create a few posts with a featured image (and other data you want)
Fetch your posts using WP_Query
Loop your posts.
Do JS magic.
questions? ask.
I am designing a WordPress theme and would like to post recipes. The text (ingredients, etc.) will go into the main post window, but I would like to include a picture, which should become the background picture of the whole window. The usual Upload/Insert includes the picture into the post. Is there any better way of associating a picture to a post? Should I use the Custom Fields for this?
To make your life easy i recommend a plugin for that The Advanced custom fields
Its very easy to use. You can get full documentation here
This plugin always save my development time.
Hope it will help
Check out WP-Alchemy.
http://www.farinspace.com/wpalchemy-metabox/
It's incredible. It can be implemented into a plugin, or a theme. I have used it and it works great!
Otherwise, the term you are looking for is "Wordpress Custom Meta Box" throw that in google, and you will get more info than you probably wanted.
If you are more of a wordpress codex junkie, check out the add_meta_box function.
http://codex.wordpress.org/Function_Reference/add_meta_box
Is it possible to create small blocks of editable content on certain pages of a wordpress install?
I am thinking along the lines of little boxes that contain specific information that can be edited through the admin dashboard.
I'm sure it's possible, but you'd probably have to look in to the WordPress plugin API to hook in to the proper places and save it to the DB. Also check out jQuery's inlne editor plugin.