Articles of text

How to change default text for specific post type

Prelude: Let’s say the text “Comments are closed” is a default WP String and you wanna change that text string to something else like “Hello World!” if is_singular(‘post-type’) is true. Issue: Now, I do know that there is a plugin called Say What? which does this exact thing, you just have to provide the string […]

How do you render posts from outside wordpress?

I’m trying to display posts outside of the wordpress system (another system is pulling from the mysql database). However, the posts stored in the database seem to be void of <p> tags and different from what was entered in text mode (or visual mode). For example, entering this in the editor <h3>Subheadline</h3> <p>Sentence here with […]

Test wrapping cutting words in half on my WP site

How do I solve my problem with text wrapping in my columns on: I would like to have the text wrapping happen and dividing the words correctly (please note that the text is in Danish)

Can't get text to wrap around image

I’m trying to get the text to wrap around my image on my about page here About But as you can see the text just sits at the bottom of the image, how can I make it wrap around the image and be up top at the start of the image to the right of […]

Implement a slideshow-like frontpage with text overlays

I am looking for a WordPress solution – may be the appropriate theme or a combination of theme/plugin/widgets… – for the following: the front page of the site should present a series of fullscreen “slides” through which the visitor can scroll, either horizontally or vertically each slide has a separate background image overlayed over the […]

If the_post_thumbnail(); is this – echo this text

I’m using the_post_thumbnail(); (aka featured image) to show a news source logo. If I use that image, I’d like to output the name of the news source. For example: if the_post_thumbnail is “new-york-times.jpg” echo “New York Times” elseif the_post_thumbnail is “cbs-news.jpg” echo “CBS News” etc… Any help writing this code is greatly appreciated!

How to query an out put value?

I have this custom query that Im working on and I need to be able to query output values as well as actual stored values. Example: $string = “This is #*&^% a test”; $string = preg_replace(‘/[^(\x20-\x7F)]*/’,”, $string); $string_clean = $string So if I echo $string_clean, I’ll get this: This is a test Which is fine, […]

If custom image header does not exist display text header

I’ve added a theme options page to my site (in my functions.php file): add_custom_image_header(”, ‘admin_header_style’); My header.php contains this code, which displays the Featured Image as the banner. If a Featured Image isn’t provided it uses the uploaded image banner from the custom image header. <?php //Custom header // Check if this is a post […]

Trimming a custom field to a length

I have a custom field added through the Advanced Custom Fields Plugin. I am trying to trim the content of the field down to a set number of words. I have tried to use the excerpt filter and setting a custom length see code bellow but It’s not working, thought? // set the length of […]

Adding a line of text to php code

My wordpress theme has a button to turn breadcrumbs on or off. I want to leave the breadcrumb turned off and place a line of text where the breadcrumb would display on all pages except the home page. You can see the breadcrumb here: I see in the sub_page_header.php where the breadcrumb is called […]