• Resolved Ally Lew

    (@ally-lew)


    Hi,

    I am trying to link my blog post (which is now under a category) via the home feature page (customizr theme special), but can’t seemed to find the way. I believed the featuring can only be done if I link to a page rather than a category. Am I correct?

    My purpose of featuring the blog post is to let my music fans to see my constant updates on my album preparation process. As I learned that pages are static and the only way I can have a blog post that can be chosen from the menu, is to link them under a same category.

    Is there any way I can feature my blog posts ( a category) under festure page of Customizr?

    You can go to allylew.com to toggle around:)THANKS!

Viewing 8 replies - 1 through 8 (of 8 total)
  • There’s a snippet that allows you to link to any URL here. Just substitute with your category page.

    You can also link a blog post (or a category) directly from the menu. Simply get the URL of the post and then use the “Links” option in Appearance > Menus (on the left of the screen, where it has Pages, Links and Categories).

    Thread Starter Ally Lew

    (@ally-lew)

    Hi ElectricFeet,

    I will really need your help to guide me through as I have no clue at all to read the snippet codings. I would want to know how to substitute my feature page to a category.

    Below is the snippet example I have copied, can you pls help me to decipher it? Thanks so much.

    dd_filter(‘tc_fp_link_url’ , ‘my_custom_fp_links’, 10 ,2);
    function my_custom_fp_links( $original_link , $fp_id ) {

    //assigns a custom link by page id
    $custom_link = array(
    //page id => ‘Custom link’
    2 => ‘https://www.my-custom-url-one.com’,
    9 => ‘https://www.my-custom-url-two.com’
    );

    foreach ($custom_link as $page_id => $link) {
    if ( get_permalink($page_id) == $original_link )
    return $link;
    }

    //if no custom title is defined for the current page id, return original
    return $original_link;
    }

    You need to put it in a functions.php file in a child theme. Read this page to get started. If you don’t feel comfortable with it, get someone to help you.

    (If you make a cut and paste mistake (as you did above), your site will just be a white screen, so you need to make sure you are able to recover via FTP etc. should that happen.)

    Thread Starter Ally Lew

    (@ally-lew)

    Ok thanks, let me try and read it. Thanks again!

    Thread Starter Ally Lew

    (@ally-lew)

    Hi Electric feet,

    I managed to get my friend to help me with the PHP files. Now its linked to the category that I wanted.

    Just wanted to check with you, I am now currently using the customizr child theme, do I need to switch back to the parent theme? As I am assuming the child theme is a ‘testing file’ or a ‘ mirror file of the parent theme’. I noticed the child theme doesn’t has the menu bars (but I have already added in). I am just worried that child theme is not a permanent theme I should run on in case things are missing again.

    Thanks,
    Ally

    The child theme is a fully functioning construct that pulls in code from the parent theme. It will be your base going forward. It’s not a test or a mirror, but rather an add-on, where you can add extra functionality without affecting the theme itself.

    It is absolutely and specifically designed with permanance in mind. Making changes in a child theme ensures that when you update the theme, you will not lose them. If you make changes that somehow mess things up, then you can revert to the parent theme temporarily while you put things right. It’s the best of all worlds.

    Glad you got it sorted ??

    Thread Starter Ally Lew

    (@ally-lew)

    Thanks so much.

    i cannot get this to work.the code given bellow is not working for me for some reason. could anyone give a more detaild instruction on how to edit the code

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to link home feature page to a Category?’ is closed to new replies.