top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to deactivate all plugins when not able to access the administrative menus?

+5 votes
234 views
How to deactivate all plugins when not able to access the administrative menus?
posted Sep 14, 2015 by Vrije Mani Upadhyay

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

I want to display all the existing categories in my Wordpress page in the bottom of the content and the selected category will be in bold style, as follows:

For example, for an existing post if I selected category2 of 3 existing, then it show like this

category1 category2 category3

<div class="entry-meta">
<span class="term-links">
<?php foreach ( get_the_terms( $post->ID, 'category') as $term ) : 
?>
<a href="<?php echo esc_url( get_term_link( $term->term_id ) ) 
?>"><span class="<?php echo $term->slug ?>"><?php echo $term->name ?>
</span></a>
<?php endforeach; ?>
</span>

<style>
.term-links .category2 {
display: inline-block;
font-weight:bold;
</style>

In the above code only display the selected category, not showing the all category. How can I do this?

0 votes

I have 4 categories. For each category I will show 5 recent post. I will have category such as breakfast, dessert, lunch and savory food. There will be a "See All" link for each category, so when the user click on "see All" link, can see all post of the particular category. Currently my code looks like this, but I am stuck with the "See All" link. I don't know how to link it to main category.

<?php 
get_header();
?> 
<!-- recipe -->
<section class="recipe-wrap">
    <?php
    /*
     * Loop through Categories and Display Posts within
     */
    $post_type = 'recipe';
    $category_link = get_category_link($cat->cat_ID);

    // Get all the taxonomies for this post type
    $taxonomies = get_object_taxonomies( array( 'post_type' => $post_type ) );

    foreach( $taxonomies as $taxonomy ) :

        // Gets every "category" (term) in this taxonomy to get the respective posts
        $terms = get_terms( $taxonomy );

        foreach( $terms as $term ) : ?>

    <div class="recipe-category owl-carousel-slide">
        <div class="row">

            <h2><?php echo $term->name; ?><a href="#">see all</a></h2>

            <div class="recipe-category-carousel owl-carousel owl-theme">

                <?php
                $args = array(
                        'post_type' => $post_type,
                        'posts_per_page' => 10,  //show all posts
                        'tax_query' => array(
                            array(
                                'taxonomy' => $taxonomy,
                                'field' => 'slug',
                                'terms' => $term->slug,
                            )
                        )
                    );
                $posts = new WP_Query($args);

                if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?>

                <div class="item recipe-box">
                    <a href="<?php the_permalink(); ?>">
                        <img src="<?php echo(types_render_field('artwork', array('raw' => true) )); ?>">
                        <p><?php the_title(); ?></p>
                    </a>
                </div> 

                <?php endwhile; endif; ?>
                    </div>
                    </section>
                <?php endforeach;
            endforeach; ?>
            </div>
        </div>
    </div>
</section>
<!-- /recipe -->
<?php 
get_footer();
?>
...