Code help recommendation
-
Ok I took your advice and placed it all in one line.
I have the search bar widget on the bottom of the page so we can try to widen up top to make that search option unavailable.
Is there a way with my current theme to show different categories/sections on the main page. Right now it just shows the latest posts I put up. But is there a way to show like the latest posts in the social pieces section as an example. To show the posts from the sports/pro wrestling section. I would like to show the top 2-3 latest posts from the different catagories.
-
This will hide the black band and search at the top of your site.
.site-bar { display: none; }Is there a way with my current theme to show different categories/sections on the main page. Right now it just shows the latest posts I put up. But is there a way to show like the latest posts in the social pieces section as an example. To show the posts from the sports/pro wrestling section. I would like to show the top 2-3 latest posts from the different catagories.
Not really in the way you want to show them. We can use CSS to remove certain categories of posts from the post listing on the main page, but we cannot really show them in sections by category. That is beyond CSS.
-
Now, let me back up a bit. If you used a Static Front Page on your site, you could use a couple of the Display Posts Shortcode and set them to display only a certain category and then set the number of posts you wish to show.
You could then also set up a Posts Page (Blog) and add that to your top menu and then visitors could also go there to see all the posts.
I should have through of that. I think I need more coffee. :)
-
Let me see if I understand. Will doing the display posts shortcode only work for 1 category?
I would like to post up each section: sports, movies, social topic pieces categories on display on the “main page” as opposed just having the blogs on the main page. I checked the video about the static webpage and I see it can change your home page to a specific page.
I’m not sure if I am making sense but if I am and I can’t do what I’m asking with my current theme. Is there a couple of other themes you can recommend me looking at to achieve this.
-
As opposed just having the latest*** posts*** on the main page.
lol I am not a coffee drinker but I’ll take some tea.
-
You could add multiple display posts short codes, one for each category you wished to show on the static front page. A sample code would look something like this.
[display-posts category="social-topic-articles" posts_per_page="3"]
For the wrestling.
[display-posts category="sportspro-wrestling-articles" posts_per_page="3"] -
Would each short code move up depending on what is the latest post? So if I drop a podcast episode and five minutes later I post a wrestling article would that move the whole sports/wrestling section over the podcast episode section or where ever I place the section it won’t jump other categories no matter what is posted. It would only go on top of the last post in that section.
-
I created a static front page. I’m not sure if I did it properly though. I made the home page from the Eastside with love.
I would like the short code display sections to be
Podcast episodes
Sports & pro wrestling articles
Movies/music/games reviews
Social topic pieces
I also would like to change podcast episodes from a page into a category so I can start adding my recent podcast episodes.
As far as the tabs on the top right below the header they will still be up there correct?
-
-
The shortcodes would show you latest 3 posts, or whatever number you decide on. With what you have mentioned, you will end up with 4 sections on the main page one below the other. You can add your own titles above the shortcodes and we can add some additional styling and such to get things to look the way you want them to.
For Podcast Episodes, what you will want to do is to make those podcasts into posts and then, if you do not have it already, create the Podcast Episodes category and assign that to your Podcasts.
The navigation at the top will still be there. You will have to replace the Podcast Episodes menu item with the category.
I would suggest adding the shortcodes, or at least one or two to the home page and then we can work from there once we can see them on the site.
If you do not want to play with your front page while it is live, what you could do would be to create a draft page and work out the shortcodes and then when then copy/paste the code into the main page when ready.
-
I created the draft page it is titled “home page construction”
I also created a new “category” tab for my podcast episodes. I usually do have them as posts the page that is up is more for archived episodes.
Is there a fast way to add the last 20 episodes and place them in the podcast episode category section so the category has life? Or do I have to manually scroll and find each podcast post and add the category individually.
The 2 short codes that you already created for the social topics and the sports/pro wrestling already work. I also added the titles I want placed over each section. After we get that all settled the customization does need to be worked on because it looks kind of plain and not eye catching enough when I was looking through a preview.
-
Is there a fast way to add the last 20 episodes and place them in the podcast episode category section so the category has life? Or do I have to manually scroll and find each podcast post and add the category individually.
WordPress has a Bulk Edit feature that you can use from All Posts and All Pages in wp-admin. Here is a direct link to All Posts in your wp-admin dashboard.
You can sort that list by Date by clicking on the heading for the date column. It will give you ascending or descending order.
If you have a common category assigned to all of the Podcasts, you can also filter by that. Otherwise, go through the list, check each podcast post you wish to add the category to, and then when you have them all checked, on the Bulk Actions dropdown, select Edit and then click Apply to the right of that dropdown. You can then assign and un-assign categories as you desire. When done, click Update at lower right and it will update all those posts.
-
Thank you I made the podcast category and quickly filled it up with the last several episodes. Now it’s time to work on this static front page. After that figuring out the best customization to go with it.
-
-
I need 2 more short code links for the podcast episodes and music/movies/game reviews
Once I get those short code links. I see already the posts in each category are too small. I would want them a bit bigger. I also notice they do not show any images attached to the post on the static page?
-
I also would like to know how to put the title for each category on the 3 each posts that stand out.
-
Look through the Arguments on the Display Posts Shortcode support page. You can specify the featured image size to be displayed. Each post will have to have a featured image set.
You can also get rid of the unordered list look by adding this argument.
[display-posts wrapper="div"]If you wish to show an excerpt from the post, you can add this argument.
[display-posts include_excerpt="true"] -
Sports & Pro Wrestling Articles
[display-posts category="sportspro-wrestling-articles" posts_per_page="3"]
[display-posts include_date="true" date_format="F j, Y"]
[display-posts image_size="thumbnail"]Music/Movies/Game Reviews
[display-posts category="music-movies-games-reviews" posts_per_page="3"]
[display-posts include_date="true" date_format="F j, Y"]
[display-posts image_size="thumbnail"]Social Topic Pieces
[display-posts category="social-topic-articles" posts_per_page="3"]
[display-posts include_date="true" date_format="F j, Y"]
[display-posts image_size="thumbnail"]I am trying to use these codes and then multiple posts pop up and its not 3 per category and I can’t figure out how to make the short code for my podcast category or music/movies/games section
-
With the image size short code I noticed it says thumb nail is there a way to make it bigger? What are the choices? I want it to be possibly 2-3x bigger than a thumbnail.
-
For each category, all the arguments have to be in one single display posts shortcode, like this for Sports &…
[display-posts category="sportspro-wrestling-articles" posts_per_page="3" include_date="true" date_format="F j, Y" image_size="medium"]Do that for the other two as well. On the image sizes, in the Arguments section of the support page, it lists the image sizes that can be used: thumbnail, medium or large. In the above, I used medium. Thumbnail is 150px tall or wide (there is a 150px square bounding box. Medium has a 300px bounding box, and Large has a 1024px bounding box.
- The topic ‘Code help recommendation’ is closed to new replies.