[Resolved] Queries on Blog and widget link

Home Forums Support [Resolved] Queries on Blog and widget link

Home Forums Support Queries on Blog and widget link

Viewing 15 posts - 1 through 15 (of 35 total)
  • Author
    Posts
  • #2382041
    Janani

    Dear Team

    I am almost completing my website. I have few questions that I would need your help with –

    1. I had created an element which was a jquery which opened my posts in a new page when I clicked on the post title from the blog page. Now, I have decided to change the design, so that the posts will open the normal way when clicked on from the blog page, rather than in a new page. Will I achieve this by simply deleting the element that I had created previously? Or do I need to modify the code in the element? The code is as follows given by your team earlier –
    <script>
    jQuery(document).ready(function($){
    $(‘.entry-title a’).attr(‘target’, ‘_blank’);
    });
    </script>

    2. I have created categories for my posts. Is it possible to give category links that would open up all the articles within that specific category in the blog page? How do I do that?

    3. In the Blog page, you can see that there are large gaps between the post titles. How can I reduce this gap and make it look more reasonable?

    4. I have a sign up form in my footer widget. How do I give a link that would lead to this sign up form from another page?

    Kind regards
    Janani

    #2382443
    Leo
    Staff
    Customer Support

    Hi there,

    Let’s handle one question per topic as suggested in our forum guidelines here:
    https://www.screencast.com/t/t4Y3VgrhIP

    Will I achieve this by simply deleting the element that I had created previously? Or do I need to modify the code in the element?

    I believe removing the code would work – have you tried setting the element to Draft to test?

    #2382644
    Janani

    Dear Leo

    Apologies, missed to see the instructions. Yes, the first query is resolved, thanks to your excellent support. Could you please help to resolve my another query as well?

    I have a sign up form in my footer widget. How do I give a link that would lead to this sign up form from another page?

    Kind regards
    Janani

    #2382813
    David
    Staff
    Customer Support

    Hi there,

    in your forms HTML you have this opening <div>:

    <div class="devshishu-subscriber-form">

    Give it a unique ID eg.

    <div id="devshishu-subscribe" class="devshishu-subscriber-form">

    You can then use the #devshishu-subscribe anchor link in your URL

    eg.

    https://your-domain.com/#devshishu-subscribe

    #2385342
    Janani

    Dear David

    Thank you very much, this worked perfectly!

    Could you pls help to answer my other query –

    In the Blog page, you can see that there are large gaps between the post titles. How can I reduce this gap and make it look more reasonable?

    #2385668
    David
    Staff
    Customer Support

    Try adding this CSS:

    
    :is(.blog, .archive) .inside-article > :is(.entry-meta, .entry-summary ) {
        display: none;
    }
    #2392301
    Janani

    Dear David

    Thank you, but tried adding this code and it did not work. Is there something wrong I am doing?

    #2392708
    David
    Staff
    Customer Support

    Where did you add the CSS?
    Was it in the customizer > additional CSS? IF so move it to the top of the CSS.

    #2392743
    Janani

    Dear David

    Thank you, this finally worked. I am grateful for your excellent support.

    Could you help in my last query before I close?

    I have created categories for my posts. Is it possible to give category links that would open up all the articles within that specific category in the blog page? How do I do that? I want these category links to come at the top of the blog page above the articles. Is it possible to do that?

    #2393099
    David
    Staff
    Customer Support

    If you’re not using the Block editor, then you can create a shortcode to display the category list.
    See this topic for the PHP Snippet:

    https://generatepress.com/forums/topic/create-wp_list_categories-block-in-mysite-com-blog-and-all-archive-blog/#post-1888697

    Then you can use a Hook Element ( i assume you used one for adding the search bar ) and hook in your new shortcode.

    #2410762
    Janani

    Dear David

    Thank you for your support, but it did not quite help me as I am a novice in website building. So could you kindly give me the step-by-step procedure for me to do it myself? For your information, I tried both the methods provided in the URL link which you gave me, but both did not work. Maybe because I did some fundamental mistakes in placing the codes – am not sure where to place what. Please help.

    #2410773
    Fernando
    Customer Support

    Hi Janani,

    To clarify first, are you using the current Block editor or the Classic editor? We’ll try to provide a step-by-step approach afterwards.

    #2412022
    Janani

    Sure Fernando, I use the classic editor, but mainly I used sections for building my website, so I am very comfortable with that. I also have code snippets plugin enabled for inserting any codes. I also know to use elements and hooks. So, these are the tools I generally use. Kindly now provide me the step-by-step process of how I can enable category-wise search in my blog archives page.

    #2412376
    David
    Staff
    Customer Support

    OK:

    1. In Code Snippets, add New Snippet and paste in this code:

    
    function getCategoryList() {
        ob_start();
        echo"<ul>";
            wp_list_categories('orderby=name&show_count=1&title_li=');
        echo"</ul>";
        return ob_get_clean();
    }
    
    add_shortcode('mycatelist', 'getCategoryList');

    2. You can then add this shortcode [mycatelist] to any page on your site and it will display your list of categories.

    See if that works, we can then discuss how to add it your Blog and how to style it.

    #2413015
    Janani

    Dear David

    Thank you very much. It worked!

    Now tell me how to add this to the Blog page with a similar style as in this web page.
    https://www.tarabrach.com/guided-meditations/
    Although these are videos in this linked page, how can I bring in such a category list in my blog with the same styling and design?

Viewing 15 posts - 1 through 15 (of 35 total)
  • You must be logged in to reply to this topic.