Okay
  Public Ticket #2173485
Latest Blog Updates
Closed

Comments

  • angiemorais started the conversation

    Hello!

    This space (attachment 27) shows the latest blog posts. I have two questions:

    1) I would like the layout of the posts to be the same as it appears on the Blog page. (attachment 28). How do I get everything in the same design?

    2) It should show the posts in the order they were posted, right? I wish it were in order. Looks like it's showing randomly ...


    Thank you!

  • angiemorais replied

    I was able to resolve question 1.
    Thanks!


    It still has to solve question number 2.

  •  675
    Neuron replied

    Hi,

    You asked me in a ticket how to make them order random, please remove that line that I have explained.

    - https://neuronthemes.ticksy.com/ticket/2164503/

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • angiemorais replied

    Can't one get random and the other in order? It's two different things ... Blog and Store ... = (

  •  675
    Neuron replied

    Sure, you just need a bit more codingsmile.png

    So, if you want the random order in shop instead of the snippet I've provided add the below one.

    if ($neuron_posts_type == 'product') {
    $args['orderby'] = 'rand';
    }

    If you want it for post:

    if ($neuron_posts_type == 'post') {     
          $args['orderby'] = 'rand';
    }

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • angiemorais replied

    What should I change in this code so that the posts appear in order?

    if ($neuron_posts_type == 'post') {     
    $args['orderby'] = 'rand';
    }
  • angiemorais replied

    And where should I insert this code so that the posts appear in order? 

    ....

    Actually, I'm confusing it with what we did on the other ticket.

    Summing up:
    1) I want the products to appear randomly on the home page and the "store" menu.

    2) I want the blog posts to appear in order.

    Please have patience to explain to me what I should do in each case? LOL

  •  675
    Neuron replied

    Hi,

    Can you please provide me with your wp-admin, I will add it for you. Make sure to tick private.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  •   angiemorais replied privately
  •  675
    Neuron replied

    I've added the code to make products appear randomly and posts to appear in date order.

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.