Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter JoJota

    (@jojota)

    Hi @emranemranx,

    I am already familiar with css customization, but I think the best way is to change the layout of the theme beforehand using hooks and not applying custom css rules to overwrite the theme layout. If there is another way, please let me know.

    Also I can’t find any documentation relating the modern theme. Is there a list refering to which hooks are in use when using the modern theme?

    Hi @ahmed2340,

    try to download a fresh copy of the customizr theme and replace it with your current version, maybe you have made some unintentional changes, which prevent the original theme from loading. If this works, you can activate your child theme to proceed with your modifications.

    Hi @doclalor,

    I used the tc_tagline_text to modify the tagline of the header. I am not sure if you want to change that part. If so, I solved this by following the templates path templates/parts/header/parts/tagline and created a new tagline.php in my child theme for further customization.

    Thank you @jjbte for that fast response. I got it working now. My mistake was not modifying the $wp_query correctly.

    Hi @jjbte,

    I am trying to achieve the same thing, as I want to display a query of multiple posts with a custom template.

    Currently I use the following code in my functions.php to hook to the loop of my template and modify the query:

    //setup hooks in the template_redirect action => once the main WordPress query is set
    add_action( 'template_redirect', 'hooks_setup' , 20 );
    function hooks_setup() {
        if (is_page(987236)) { // is tag page
            add_action( '__before_loop'     , 'tagpage_query' );
    	add_action( '__after_loop'      , 'tagpage_query', 100 );
        } else {
    	return;
        }
    }
    
    function tagpage_query() {
        global $wp_query, $wp_the_query;
        switch ( current_filter() ) {
        	case '__before_loop':
        		//replace the current query by a custom query
    		    //Note : the initial query is stored in another global named $wp_the_query
    			$tagpage = get_page_by_path( 'tag', 'OBJECT', 'page')->ID;
    			$args_for_query4 = array(
    				'post_type' => 'page',
    				'nopaging' => true,
    				'post_parent' => $tagpage,
    				'order' => 'ASC',
    				'orderby' => 'title',
    			);
    			$wp_query->posts = new WP_Query($args_for_query4)->posts;
    			$wp_query->post_count = $query4->post_count;
    			break;
        	default:
        		//back to the initial WP query stored in $wp_the_query
        		$wp_query = $wp_the_query;
    	        break;
        }
    }

    All the posts are displayed on the page, but I can’t figure out where to put your czr_fn_render_template code to get the grid pattern.

    Have you ever worked this out? Any help would be much appreciated. Thanks!

    Edit: Fixed it, problem was typo.

    Hello,

    I am trying to achieve the same. I created a new layout as shown here: https://presscustomizr.com/snippet/changing-the-global-column-layout-of-the-customizr-theme/

    My content should have the width of span10 and two invisible sidebars of span2 to center the content. But the problem is that the right sidebar is not shown properly, instead it floats to the left. How can I fix this? My code:

    add_filter('tc_global_layout', 'my_custom_layout' );
    function my_custom_layout( $layout ) {
        $my_layout      = array(
            'r' => array ('content' => 'span10' , 'sidebar' => 'span2'),//sidebar on the right
            'l' => array ('content' => 'span10' , 'sidebar' => 'span2'),//sidebar on the left
            'b' => array ('content' => 'span8' , 'sidebar' => 'span2'),//both : two sidebars
            'f' => array ('content' => 'span10' , 'sidebar' => false),//full width : no sidebars
        );
    	
        //sets new values for content and sidebar (checks if there are new values to set first)
        foreach ($layout as $key => $value) {
            $layout[$key]['content']   = isset( $my_layout[$key]['content']) ? $my_layout[$key]['content'] : $layout[$key]['content'];
            $layout[$key]['sidebar']   = isset( $my_layout[$key]['sidebar']) ? $my_layout[$key]['sidebar'] : $layout[$key]['sidebar'];
        }
        return $layout;
    }
    Thread Starter JoJota

    (@jojota)

    Thanks for your reply. I already tried styling with css, but it looks like that the dates don’t have single classes. I am using the weekcalendar [weekscalendar weeks=1 ics=xxx] and the html output for the first day looks like this:

    <tr class="week week1">
      <td class="day1 hasevents ">
        <div class="event history inprogress confirmed calics vevent">
          <div class="details1">08:00  - 11:00 Important meeting</div>
          <div class="details2">my location,&nbsp;duration:&nbsp;3 hours</div>
        </div>
      </td>

    Adding .eventdate to my style.css didn’t change anything.

    .eventdate {
    	font-weight: bold !important;
    }

    Is there only one class for the event date and the event title? Or am I missing something?

    Thread Starter JoJota

    (@jojota)

    Thank you for your reply. I added the code, but unfortunately it didn’t work out. It seems like Chrome sometimes just ignores part of the picture and displays the text as if the picture is not there.

    Thread Starter JoJota

    (@jojota)

    Fixed it. Another Plugin’s fault.

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