Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
- if (strpos($url,'stage') !== false){
- the_content(
- sprintf(
- wp_kses(
- /* translators: %s: Name of current post. Only visible to screen readers */
- __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'martitheme' ),
- array(
- 'span' => array(
- 'class' => array(),
- ),
- )
- ),
- wp_kses_post( get_the_title() )
- )
- );
- }
- else{
- $category = single_term_title("", false);
- $current_category_array = get_queried_object();
- $ID = $current_category_array->term_id;
- echo $category;
- echo $ID;
- $args = array(
- 'post_type' => 'etapi',
- 'category_name' => $category,
- 'cat' => 46
- );
- $loop = new WP_Query($args);
- while($loop->have_posts()): $loop->the_post();
- $title = the_title();
- $link = get_permalink( get_page_by_title( $title ) );
- ?>
- <div class="folderContainer">
- <a href="<?php echo $link; ?>"> <img src="http://localhost/marti/wp-content/uploads/2022/09/Folder-icon.png" alt="" class="folder hvr-float-shadow"> </a>
- </div>
- <?php
- endwhile;
- wp_reset_query();
- }
Advertisement
Add Comment
Please, Sign In to add comment