Tagged: featured content
- This topic has 5 replies, 2 voices, and was last updated 8 years, 9 months ago by Sakin.
-
AuthorPosts
-
July 7, 2015 at 9:28 am #60615StephenMember
I am updating/rewriting a custom legacy web site. I plan to use catch responsive pro as the basis of the new web site.
Before I launch in and and start customising with a child theme, I was interested to know whether it is possible to programmatically update the featured content images and associated text.
Thanks.
July 8, 2015 at 10:46 am #60669SakinKeymaster@Stephen: Programmatically you can alter anything as per your need. If you are using Catch Responsive Pro theme then I don’t understand why you need to change featured content image and associated text programmatically. You can simply select “Featured Content” type as “Featured Image Content” and upload your image and text as per your need. For more, refer to theme instructions page at http://catchthemes.com/theme-instructions/catch-responsive-pro/#featured-content
But if you really want to do it programmatically. Then you can build child theme and then copy
catchresponsive_featured_content_display()
function to your child themefunctions.php
file and edit it as per your need.July 8, 2015 at 11:26 am #60671StephenMemberThanks Sakin.
I want to change it programmatically as I was thinking of updating it based on an external (legacy, non wordpress) database where the featured content is changed by a proprietary external application.
I am new to wordpress, but very happy with complex custom web development – proficient in php, javascript, html, css etc. – I am currently trying to navigate my way around the whole wordpress theme customisation regime.
I actually have another question, (although I think your response may have helped me) – I would really like to be able to include some php/html in the title and content that overlay the featured slider. My reason… I would like to make that a search box where the user can specify few search options…… A hovering search box over the featured slider will work well in the application I am developing.
At the moment I have done a bit if debugging with the theme and can see where the catch_responsive_featured_slider() function is called when the featured page is customised, but I can’t (yet) see what actually executes the html constructed during the customisation.
I was keen to work out how to write a a bit of child theme code to override the default customer slider title and content display.
….but – I suspect your last post may give me a clue….. ie. the catch_responsive_featured_content_display() may be where I should go and investigate…?
Thanks.
July 10, 2015 at 10:40 pm #60829SakinKeymaster@Stephen: I have already given you the instruction for advance customization. I will explain it little more. First, you need to build child theme. Then you can copy the functions which you want to edit to your child theme
functions.php
file.
1. Functioncatchresponsive_featured_content_display()
is the final function which display the featured content. It checks which featured content type you have selected.
2. Functioncatchresponsive_post_content()
is the function which handles the featured post content. So, if you have selected Featured Post slider then you might want to check this. For page it will becatchresponsive_page_content()
, category will becatchresponsive_category_content()
and image will becatchresponsive_image_content()
July 11, 2015 at 11:38 am #60846StephenMemberGi’day Sakin, no dramas – got it sorted – child themes sorted – I just had to figure out the mechanics of how the various catchresponsive functions worked and how and when they were called……. it was the functions associated watch the catch_responsive_featured_slider() or more specifically the slide overlay text that I needed to sort out which I found to be constructed in the function catchresponsive_image_slider().
Thanks for your assistance in pointing me in the right direction.
Stephen
July 11, 2015 at 9:14 pm #60852SakinKeymaster@Stephen: Cool that you sorted it. Thanks 🙂
-
AuthorPosts
- The topic ‘Programmatically modify featured content?’ is closed to new replies.