anurag.deshmukh
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Shortcode in WidgetsI have made changes in last line. The code that you provided, has last line where shortcode gets closed still content has been added.
Try with above code provided and let me know if it works.
Forum: Fixing WordPress
In reply to: Shortcode in Widgetsand welcome to my website. My name is Faye McKee and I set up Soothing Soul Holistic Therapies in 2017.
seems you need to show above content too in shortcode. Please try with this once.
[time-restrict-repeat type="daily" ontime="00:00:00" offtime="11:59:59"]Good morning[/time-restrict-repeat] [time-restrict-repeat type="daily" ontime="12:00:00" offtime="17:00:00"] Good afternoon[/time-restrict-repeat] [time-restrict-repeat type="daily" ontime="17:00:01" offtime="23:59:59"] Good evening and welcome to my website. My name is Faye McKee and I set up Soothing Soul Holistic Therapies in 2017.[/time-restrict-repeat]
Forum: Fixing WordPress
In reply to: Shortcode in WidgetsCan you please show me how and where you added shortcode ?
Forum: Fixing WordPress
In reply to: Shortcode in WidgetsAdd below code in functions.php and then you will be able to add shortcode directly in Widget.
add_filter('widget_text','do_shortcode');
Forum: Fixing WordPress
In reply to: Assistance to center the navTry with this one.
.menu {text-align:center;} .main-navigation ul{float:none;} .main-navigation ul li{display: inline-block;float: none;}
Forum: Fixing WordPress
In reply to: How to Remove Author Tag from being visibile to Discord?Did you tried removing the function ?
Forum: Fixing WordPress
In reply to: Need some help developing an archive pageThe code that is written for displaying thumbnails will show all featured images that are in post, this means if posts were posted in 2017, that images will also be displayed as there is no year parameter passed.
If we need to show featured images for current year only, we need to change existing query (with what provided above) and have to pass year parameter.
Forum: Fixing WordPress
In reply to: Need some help developing an archive pageFor left hand side, you can play around with wp_get_archives() function where you can pass parameters for Monthly, Yearly archives. Source
All categories used on the site : You can use wp_list_categories(). Source
For Right side, you can query to fetch posts for current year using WP_Query.
$current_year = the_date( 'Y' ); $args = array( 'post_type' => 'post', // or any custom post type 'date_query' => array( array( 'year' => $current_year, ), ), ); $query = new WP_Query( $args ); while ( have_posts() ) : the_post(); if ( has_post_thumbnail() ) { the_post_thumbnail(); } the_title(); endwhile;
You can take care for the structure as per your need.
Forum: Fixing WordPress
In reply to: How to Remove Author Tag from being visibile to Discord?Is this been displayed on single/detail page ? If so you can check in template-parts/post/content.php (may be different as per your theme)
function would have been called inside ‘entry-meta’ class say for example ‘twentyseventeen_posted_on()‘ which comes in span with class name as ‘byline’.
Remove that function. Let me know if that works.
Hello @kirasiris,
If you want to display list of custom taxonomies that are related to particular post on your single page, you can try with below code :
<php global $post; $terms = wp_get_post_terms($post->ID, 'portfolio_tags'); if ($terms) { $output = array(); foreach ($terms as $term) { $output[] = '<a>slug .'" href="' .get_term_link( $term->slug, 'portfolio_tags') .'">' .$term->name .'</a>'; } echo join( ', ', $output ); } ?>
Let me know if this works for you.
[Moderator Note: Code fixed. To ensure your code is usable by others, always enclose your code in
`backticks`
, or use the ‘code’ button.]- This reply was modified 7 years, 4 months ago by anurag.deshmukh.
- This reply was modified 7 years, 4 months ago by anurag.deshmukh.
- This reply was modified 7 years, 4 months ago by bcworkz.
Forum: Plugins
In reply to: [AMP] Google Ad Sense not working with AMPSilly mistake I have committed and now I have corrected it and got the issue resolved.
I haven’t included required script in amp.