Support » Theme: ProfitMag » Options “Sort order” and “featured” for “Category post one”

  • Hi there!

    at last I found the theme that suits most of my recommendations: Profitmag! Thanks!!

    I have an issue and I wonder if you can provide a solution for me?

    In the Customizer I can adjust the “right sidebar” and select a category for “Category Post One”. that’s fine and very useful, but: The FIRST posts of a category will be displayed. I would like to have the latest posts…

    Also it would be usefull to have an option to only display “featured posts”.

    any ideas?

    Thanks Enno

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @ewx

    As much as we would love to help you, we are having difficulty to understand your issue.

    Could you please explain what “Category Post One” refer to?

    Also can you post your site URL and the screen shot of your problem so that we could properly inspect and provide solutions.

    Best Regards!!

    Thread Starter Enno

    (@ewx)

    Thanks for your fast reply!!

    Please go to customizer -> Theme Options -> Right Sidebar
    There is the first option named “Category Post One”

    Site is not live right now so no URL. sorry.

    Hello @enno,

    The contents in the category post one is rendered form the sidebar default template ( sidebar.php ). To display the section with your latest posts, you will need to modify the post query with the help of child theme. For reference on child theme, see the link here : https://codex.wordpress.org/Child_Themes.

    You can also automate the task with Child theme generator plugin.

    After creating and activating the child theme, create a new file sidebar.php and paste in the following code block in it :

    https://gist.github.com/anonymous/5b3c4986fa05072bad201653de1aebf9

    This will replace the section with latest posts.

    Hope this Helps,

    Best Regards !!

    Thread Starter Enno

    (@ewx)

    Thanks a lot! I will try this!
    Regards
    Enno

    Thread Starter Enno

    (@ewx)

    Hi!
    Your tipp displays the most recent posts.
    Unfortunately the chosen category is ignored… ;(

    And there is always one more post than defined in “counter”.
    If I enter “number of Posts = 3” there will be 4 posts displayed.
    I could live with that but that the category is ignored is not good.

    Would you be so kind and have a look at it?

    Thanks
    Enno

    Hello @enno,

    We are actually having trouble understanding your request correctly.

    We assumed that you wanted to remove the category and display the latest post for the specific section so we had provided the code accordingly.

    Please explain your requirement further so that we could help you with updated code accordingly.

    Best Regards !!

    Thread Starter Enno

    (@ewx)

    Hi there! I am sorry for causing you trouble…

    I did not want to have it replaced I rather thought of a new field in the customizer like * sort by date ascending
    * sort by date descending

    regards
    Enno

    Hello @ewx,

    The options you are looking for are not currently available in the theme.

    However, as you are using the child theme approach for the customization of the theme, you can choose to add your own custom Customizer controls and settings through your child theme’s functions.php file.

    Also, you will require some knowledge on Theme Customizer to properly use and implement it on the theme. Please go through some helpful links below that will help you give some insights on using and modifying customizer options in the theme:

    https://codex.wordpress.org/Theme_Customization_API

    https://themetrust.com/how-to-create-custom-controls-for-wordpress-theme-customizer/

    Also, for future reference, you can also post your queries in the theme’s official support forum to get dedicated and swift support from : http://themepalace.com/forum/profitmag/

    Hope this helps,

    Best Regards !!

    Thread Starter Enno

    (@ewx)

    Thanks for your fast reply!

    I am not very experienced in PHP and wordpress programming. That’s the reason why I am dependant on a good theme.

    Actually I expected something like “Oh, yes you’re right! The sort-option is missing. It’s a small change for us and we will add it to the theme so you will have the option on next theme update.”.

    Please understand me right: I do not want to be ungrateful and of course I know you do not charge anything for the support! But I thought taht you will classify my request as an option to improve the existing theme.

    Anyway: Thanks for your support and ideas and helpful links. I will try if I can set up my childtheme for my needs.

    Regards
    Enno

    Thread Starter Enno

    (@ewx)

    From Line 46 the following addition must be done:

    ” ‘cat’ => $cat,”

    $args = array(
     'posts_per_page' => $no_of_posts,
     'orderby'        => 'most_recent',
     'cat'            => $cat,
     );

    Then the defined category in the customizer will be respected.

    Screenshot of Customizer Sidebar Right Profitmag

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Options “Sort order” and “featured” for “Category post one”’ is closed to new replies.