• Resolved brokeandsavvy

    (@brokeandsavvy)


    I am completely new to WordPress, codes, plugins and everything else!! I am trying to have a grid of 6 or so recent posts show up on my homepage. Even a horizontal grid of three would be awesome. I want the featured image, Post Title that links back to the post, and an excerpt with either “more here>>” or just “….”

    Hopefully what I am looking for is possible easily, if someone can break it down for me that would be awesome!

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    The short answer is: yes, it should be possible with this plugin. If you’re completely new to WordPress, this might look advanced, but I’ll try to break it down in simple steps.

    1) Create a new page. The title can be anything, like Welcome.
    2) Set the page as your homepage: in the admin panel, under Settings -> Reading, set Front Page Display to static page, and choose the page you just created.
    3) Now back to the page. This is where the recent posts are going to be displayed.
    4) Go inside the text editor, by selecting the top right button that says “text”, not visual. Place the following:

    [loop type="post" columns="3"]
    	[content field="thumbnail"]
    	<a href="[content field='url']">[content field="title"]</a>
    	[content field="excerpt"]
    [/loop]

    At this point, there is no styling so the output might look a bit “rough”. Let me know when you’ve completed the above steps and all the content you want is displayed. Then, I can outline the steps to style each part.

    Also, please make sure to have the latest version of the plugin.

    Thread Starter brokeandsavvy

    (@brokeandsavvy)

    Thank you so much for your response!! I was going crazy trying to figure this out!!! We are much closer now..

    The only thing is right now all of my posts are showing not just the first three or six.

    Also, I realize now I would like the image to be clickable too? Is that possible? Or what makes the most sense in your opinion… to drive click backs.

    Seriously I figured there had to be a way to do this but I am still getting used to WP and coding so every answer I found on Google made no sense to me! Thanks again πŸ™‚

    Thread Starter brokeandsavvy

    (@brokeandsavvy)

    Another question for you if you don’t mind answering, How can I set up navigation buttons on the top of my page that will bring up all related blog posts? Ex. Fashion button brings up all posts tagged fashion

    No rush I am slowly trying to learn and build my site!!

    Plugin Author Eliot Akira

    (@miyarakira)

    Sure, I’m glad to be of assistance.

    To limit the number of posts, you can add the count parameter:

    [loop type="post" columns="3" count="6"]

    To make the images clickable, you could wrap both the thumbnail and the title with the post link:

    <a href="[content field='url']">
        [content field="thumbnail"]
        [content field="title"]
    </a>

    As for navigation buttons to display posts by tags, you could:

    • Create a page for each tag
    • For each page, place shortcodes to display recent posts by that tag
    • Go to Appearance -> Menus, and create menu items with the newly created pages
    Thread Starter brokeandsavvy

    (@brokeandsavvy)

    I know you are probably busy so a HUGE thank you for following up with me!! The code worked perfectly. Is it possible to center the image of my recent posts?? If it seems difficult I consider this portion of my question SOLVED!

    What short code would I use to show all posts tagged Beauty?

    [loop type="post" category="beauty"]
    [/loop]

    Then all I have to do when writing a new beauty post is tag in the WP “tags” section??

    Plugin Author Eliot Akira

    (@miyarakira)

    To center the image, you can try:

    <center>[content field="thumbnail"]</center>

    If this doesn’t work, it might need a different approach.

    To show posts with tags – it depends if the “tag” is a category or tag. In the latter case, it would look like this:

    [loop type="post" tag="beauty"]
        [content field="title"]
        [content field="excerpt"]
    [/loop]

    The loop shortcode by itself doesn’t output anything, so you need [content field="..."] inside, to display the fields you want. You can see the example in my first response how to link the titles to the posts.

    Great, I’m glad to hear things are working.

    Thread Starter brokeandsavvy

    (@brokeandsavvy)

    To center the image, you can try:

    <center>[content field=”thumbnail”]</center>

    Worked perfect!!

    Eliot one more *new* question and I swear I’ll stop bugging you! Can we create more space between the columns you helped me with first?? There are portions of the excerpts even when centered that almost touch the next column. or maybe I am just being picky hahaha!

    here is my site: http://www.brokeandsavvy.com

    The loop shortcode by itself doesn’t output anything, so you need [content field=”…”] inside, to display the fields you want. You can see the example in my first response how to link the titles to the posts.

    that makes sense but I tried with tag=beauty and Im getting all of my posts also tried category=beauty nothing there either…

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello – sorry for not getting back to you sooner.

    So, the space between the columns. I added a new parameter for this to make it easier – please see the latest update to version 0.7.9.

    [loop type="post" columns="3" pad="0px 10px"]
       ...
    [/loop]

    The first number is for top and bottom, second number for right and left.

    Also, the excerpt might look nicer aligned with justify instead of center:

    <div align="justify">[content field="excerpt"]</div>

    Finally, displaying posts by tag: I believe I fixed an issue with correctly filtering posts by tags. So, if you could try tag="beauty" it should work now.

    Thread Starter brokeandsavvy

    (@brokeandsavvy)

    Thank you so much for the updated plugin, that works beautifully!!

    I’m still having trouble with the tagged posts and such. I want the entire post to show up not just image, title, excerpt. If that makes sense…. Maybe I don’t even need your plugin for this function I just have to figure it out.

    Plugin Author Eliot Akira

    (@miyarakira)

    If you want the whole post to show up, it can be like this:

    [loop type="post" tag="beauty"]
        [content field="title"]
        [content]
    [/loop]

    When there’s no field specified, it displays the post content.

    However, as you said, it might be just about working with the theme you have. In fact, that would be the best solution, because usually there are paginations – so when you have many posts with a certain tag/category, they can be displayed in pages, with numbers for navigation.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Costom Code for NOOB!’ is closed to new replies.