Articles of description

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?

Change Site Title and Description html tags if not home page

For the purpose of good HTML structure, accessibility and SEO I’d like to change the site’s title and description from H1 and H2 to P when appearing on any page other than the homepage. A conditional statement logic would be something like; when not homepage change site title and description to Site Title and Description […]

Get custom taxonomy description with paragraph tags

I am printing the description for a custom taxonomy of artists with the following code: $terms = get_the_terms( $post->ID, ‘artists’); if ( $terms ) { // loop through artists (could be multiple) foreach ( $terms as $term ) { $termid = ‘artists_’ . ($term->term_id); echo ‘<p id=”artist-bio”>’; echo $term->description; echo ‘</p>’; } } This works […]

Why doesn't YoastSEO allow me to set the title/description for the home page?

For some reason, YoastSEO set my home page to the first blog post. So the home page canonical, title, and description are set to the values of the first blog post. And when I tried to set the home page’s title/description, I got this screen instead of the form fields to set the values of […]

Image with description side by side

I’m making a personal website for a client and I want it to be easy to edit. I’m trying to replicate the data the client had on a previous personal website made in pure html, and it looks like the image below: I want to add an image with a description about it side by […]

How I can get image description/title/alt for gallery image?

I’m displaying a gallery image but I also want display the caption for image. I can get the info that we insert when us upload a image in WordPress Dashboard like “Title/Caption/ALT/Description”. I want get anyone and display. <?php $gallery = get_post_gallery_images( $post ); foreach( $gallery as $image_url ) : ?> <div class=”item” style=”background-image: url(‘<?php […]

How come my first blog post and my home page have the same title?

I am putting together a new blog and for some reason the home page took the title and description of the initial post. Is there a way to just set the home page title/description separately? I am trying to edit it via YoastSEO, but I get this screen when I try to set my Home […]

How to display a description of a given category from a custom taxonomy

I have a taxonomy called tcp_product_category. In the admin panel I have created a few terms within this taxonomy. On the homepage I want to display the description of one of those terms with the slug all-products. For all normal categories I use this code: <?php echo category_description( get_term_by(‘slug’, ‘guide’, ‘category’)->term_id ); ?> This doesn’t […]

Getting a div content of a post in wordpress?

How can I fetch a div content from a post? Using the_content() can fetch all the data but instead of that, I need specific content from the div only. So far, all I could do was get the link of the post as the div content. Here is was I am trying to do: <?php […]

How to use different short description in shop page and in product page in woocommerce

What I would like to have is the sentence “Entre em contacto connosco para saber preços Aqui” just in product page, not in shop page. Please take a look in this page: Does anybody can help me? Thanks in advance Miguel