This topic has 1 reply, 2 voices, and was last updated 9 years by sharmstr.

  • Author

    Tagged: ,

  • #79709
     Stephanus
    Participant

    Hi there,

    3 related things:

    1. I’m trying to add the tag “BSSM” to some of my posts and to then have these posts hidden from the search results when users visit my home page (www.happyandhealthy.co), which by default is the blog posts of my site.
    2. I want this tag to be hidden in my tag cloud (when used in widgets, etc.).
    3. I still want people to be able to view the posts that are tagged with ‘BSSM’ if they visit the following URL: http://www.happyandhealthy.co/blog/tag/bssm/, even though people won’t easily find this URL (and hence, these blog posts, which will only be shared with selected people).

    Here are two posts that I tagged with ‘BSSM’, but they are still showing on my home page (www.happyandhealthy.co). How do I hide / remove them?

    http://www.happyandhealthy.co/blog/recipe/crunchy-asian-quinoa-salad/
    http://www.happyandhealthy.co/blog/recipe/papaya-mozarella-basil-salad/

    I did a Google Search and came across the following: https://wordpress.org/support/topic/how-to-edit-php-files-in-a-child-theme

    According to this article, I should adjust the following code, but where and how to make the necessary changes to the php in my child theme?

    <?php
    // remove clients tagged archive (42)
    $my_query = new WP_Query(array(
    ‘tag__not_in’=>array(’42’),
    ‘category_name’=>’Clients’,
    ‘orderby’=>’title’,
    ‘order’=>’ASC’));
    ?>

    Would you please send me detailed step-by-step instructions showing:

    1. How to access the relevant .php file in my KLEO child theme (e.g. under Appearance or via FileZilla), and;
    2. How to edit this theme (i.e. modify the code provided above to help me achieve what I requested above) and what the correct code would be?

    (One more thing: the ’42’ in the example above confused me – what does this refer to – the tag ID?)

    Many thanks!

    #79742
     sharmstr
    Moderator

    Instead of maintaining custom copies of core files, there are two plugins you should try

    https://wordpress.org/plugins/wp-hide-post/
    https://wordpress.org/plugins/oomph-hidden-tags/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?