Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter creed3000

    (@creed3000)

    modify your blog templates to suppress certain link output if a particular URL parameter is present.

    thats sounds bettter than what ive been trying however
    im new to coding … Could you give me an outline or example
    thank you for sharing this info !!!

    Thread Starter creed3000

    (@creed3000)

    yep thanks for the info
    also want to thank “alchymyth”
    the support here is really great

    Thread Starter creed3000

    (@creed3000)

    yes, i would just add it $query->set( ‘cat’, ‘-15, -16’ );
    i was just making it more complicated than need be
    yes if i hid main category i would hide sub category

    you’ve gone above & beyond
    your are a great source of wisdom !!! ( thank you )

    Thread Starter creed3000

    (@creed3000)

    ummmmmmm yes sir OMG ( it worked )

    but before i go & mark this resolved i will go ahead & ask
    if i want to hide additional sub categories
    i would edit this line

    $query->set( 'cat', '-15, -16' );

    i would add , -subcategory#, etc’ );

    and the last question ..
    what if i want to hide a main category ??

    you did a super job & are an awesome moderater !!!
    thank you so much for helping me out !!!

    Thread Starter creed3000

    (@creed3000)

    hello
    i did create the function.php
    & with the help of “alchymyth” i
    added in this code to hide post & sub categories

    <?php
    
    add_filter('widget_categories_args','custom_category_widget_args');
    function custom_category_widget_args($args) {
    $args['depth'] = '1';
    return $args;
    } 
    
    function exclude_homepage_categories( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '-15' );
        }
    }
    add_action( 'pre_get_posts', 'exclude_homepage_categories' );

    hide post of category from front page ( sucsess )
    hide post of sub categories from side bar main menu ( fail )
    any help would be useful & great !!

    Thread Starter creed3000

    (@creed3000)

    allright, thats some useful info
    thank you for taking the time to be so helpful

    ok, i created the functions.php
    and copied your code into it

    <?php
    
    add_filter('widget_categories_args','custom_category_widget_args');
    function custom_category_widget_args($args) {
    $args['depth'] = '1';
    return $args;
    } 
    
    function exclude_homepage_categories( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '-15' );
        }
    }
    add_action( 'pre_get_posts', 'exclude_homepage_categories' );

    the post from category 15 & all sub categories did dissapear from the front page ( which is great !!! ) however the sub categories still show in the side bar main menu

    So more help would be wonderful … ( thank you for your time )

    Thread Starter creed3000

    (@creed3000)

    are you using the custom menu? ( i think so )
    here is the blog ( brand new )
    https://psychic3000.com/wordpress/

    will be doing horoscopes, daily, weekly, monthly, etc
    daily horoscope will be main category
    then i will have 12 sub categories

    weekly horoscope will also be main category
    then i will have 12 sub categories
    12 sub caterories are zodic signs

    so i need to hide sub categories form main menu
    also need to hide post from horoscopes from front page

    thank you for the reply & trying to help

    Thread Starter creed3000

    (@creed3000)

    thank you for your reply
    & yes your are correct just different from your original question.
    i think i basic gave up, becuase i could not ( have not been able to get it to work ) so it looks like i jumped to hide category.

    which in all reality is the bigger issue for me. hide post from front page & hide sub categories from main menu side bar. anyway i took your advice & did create a child theme

    i have been able to install child theme
    did test to change background color of blog ..( it works )
    here is the code that im using in that child theme

    /*
    Theme Name:     twenty child 1
    Theme URI:      https://www.psychic3000.com/
    Description:    Child theme for the Twenty Twelve theme
    Author:         Creed masters
    Author URI:     https://www.psychic3000.com/
    Template:       twentyeleven
    Version:        3.4.2
    */
    /* Import layout */
    @import url(../twentyeleven/style.css);
    
    a{ color: #254655; }
    body{
    background: #727D82;
    }  
    
    header#branding{
    background: #29305C;
    color: #B3BDC1;
    }  
    
    header#branding h1, header#branding h2, header#branding a{ color: #B3BDC1; }  
    
    #respond{ background: #E7DFD6; }
    
    <?php add_action( 'pre_get_posts', 'exclude_category' ); ?>
    function exclude_category( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '-1,-1347' );
        }
    }
    add_action( 'pre_get_posts', 'exclude_category' );

    ive added the code from above with no reults ..
    im new tho this so i dont really know what im doing here
    creating the child theme & getting that to work was a huge step for me, so i need some big time direction & help

    do i put it here in the child theme css
    do i make another file in my cild theme folder ??
    heck will that code work to remove post from front page
    & what code do i need to hide sub categories from mian menu

    thankful for any advice & all help ..

    im trying to hide sub categories from main menu

    Thread Starter creed3000

    (@creed3000)

    thank you for your reply – however as i said just making the child theme was a huge step for me .. so im not sure what your saying i need to do. i thought the main reson to make child theme was so i can make all the mods thier ( so im confused )

    do i create another file ( A functions.php file )in that child folder or do i take that php code & insert it into the actual
    functions.php file of the parent theme ????

    will this code remove sub categories from my main menu ..
    <?php wp_list_categories('&title_li=&depth=1'); ?>

    i need simple instruction,
    im new to this but would like to learn
    So more help would be great … ( thank you )

    Thread Starter creed3000

    (@creed3000)

    thank you so much for the help
    but i must admit that i dont know where i would place the code
    i dont know what templete to place it ..

    function exclude_category( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '-1,-1347' );
        }
    }
    add_action( 'pre_get_posts', 'exclude_category' );

    also im not sure if i need to include

    <?php add_action( 'pre_get_posts', 'exclude_category' ); ?>

    again thanks for the help !!!

    Thread Starter creed3000

    (@creed3000)

    bump

    Thread Starter creed3000

    (@creed3000)

    bump

    Thread Starter creed3000

    (@creed3000)

    bump

    Thread Starter creed3000

    (@creed3000)

    thanks for the reply
    but im still have problems

    i did what you said & set the field for # of events to show per page to 1 > & yes on the blog it does only show 1 event but the rss feed show more than 1 event. ( i want the Rss feed to display 1 event at a time. these are monthly events. so i want rss feed to display only 1 event the one thats upcoming. i do not want it to display jan + feb + mar+etc. just jan, then just feb etc )

    the rss feed display all events withing that cat

    here the link to blog >
    https://psychic3000.com/wordpress/?tribe_events_cat=full-moon-spells

    here is page that rss feed is on
    https://www.psychic3000.com/moon_spells.html

    i have 1 rss feed that displays all events for the month
    i want the other rss feed to display next event for that cat

Viewing 14 replies - 1 through 14 (of 14 total)